What this problem looks like
Shared hosting often caps PHP at 30 seconds. WordPress backups, WooCommerce imports, and migration plugins regularly exceed that. Raising the limit helps, but optimising the job is the durable fix.
Timeouts during front-end page loads suggest a slow database query or external API call in a plugin. Timeouts during admin tasks suggest batch processing that should run from CLI or cron instead.
Step 1: Pinpoint when the timeout happens
Check debug.log and the on-screen error for the file path. Backup plugins, All-in-One WP Migration, and product importers appear often. Front-end timeouts may implicate search or related-posts plugins.
Step 2: Raise max_execution_time in hosting
In cPanel MultiPHP INI Editor set max_execution_time to 120 for normal sites or 300 for imports. Save and retry the task. You can also add these lines to wp-config.php in your site root, next to wp-admin and wp-content, if your host allows it:
@ini_set( 'max_execution_time', '300' );
set_time_limit( 300 ); Step 3: Run heavy tasks via WP-CLI
CLI scripts are not bound by web server timeouts. These commands need SSH access and will not work inside File Manager. For large search-replace or imports:
cd /path/to/wordpress
wp search-replace 'old' 'new' --all-tables
wp cron event run --due-now Step 4: Reduce plugin batch sizes
In backup and import plugin settings, lower rows per batch. WooCommerce product imports often have a batch size field. Smaller batches finish within 30 seconds on strict hosts.
Step 5: Optimise database and cron
If you have SSH access, run wp db optimize from the WordPress root, or use an optimisation plugin on staging. Disable wp-cron on high-traffic sites and trigger real cron from hosting every five minutes to prevent piled-up jobs that timeout together. Add this to wp-config.php in your site root, next to wp-admin and wp-content:
define( 'DISABLE_WP_CRON', true ); When to stop DIY and hire help
Recurring timeouts on page loads, not just imports, often mean a poorly written plugin query. BugShield profiles slow WordPress sites and fixes timeout root causes at a confirmed price without hourly billing surprises.