You’ll usually hit this while importing products or posts, running a backup plugin, applying a large update or regenerating thumbnails. Sometimes the page just goes blank or shows “There has been a critical error”, and the full message is in the error log.
What the error means
Every PHP script has a maximum run time set by max_execution_time. PHP’s default is 30 seconds, and the number in the message is the limit currently set on your site. When the script passes it, PHP kills it with a fatal error and the operation is left unfinished.
One detail matters: on Linux this limit counts the script’s own processing time, and mostly excludes time spent waiting for database queries or remote connections. So the error usually means genuinely heavy work. A long wait on an external service more often ends in a 504 Gateway Timeout.
Common causes
- Importing a large CSV or XML file in one go.
- A backup plugin compressing the whole site inside a single request.
- Processing huge images, or regenerating thumbnails for the entire library.
- A plugin stuck in an endless loop, or two plugins conflicting.
- A low
max_execution_timeon the site. - The account’s resources being busy with other processes, so a heavy task takes longer.
How to fix it
- Find what was running: remember the action that triggered it and read the full message in cPanel under Metrics › Errors. A path containing
wp-content/plugins/plugin-namemakes that plugin the first suspect. - Raise the limit in the panel: open Software › Select PHP Version, go to the Options tab and set
max_execution_timeto 120 or 300. Or use Software › MultiPHP INI Editor, pick the domain in Basic Mode and change the same value. More on php.ini. .htaccessalternative: if the panel option isn’t there, add this line to.htaccessin the site root, and remove it if a 500 error appears:
php_value max_execution_time 300
- For a single task, raise the limit in code, for example in your own import script:
set_time_limit( 300 );
- Split the work: break the import file into smaller files, use the importer’s batch setting, and regenerate thumbnails in stages.
- Disable the culprit if you’re locked out of wp-admin, by renaming its folder in Files › File Manager.
- Move long jobs to cron: PHP on the command line has no time limit by default, so tasks run through Cron Jobs generally avoid this error. See fixing WP-Cron.
If raising the time limit just turns it into a memory error, follow the fix for memory exhausted in WordPress.
Prevention
- Don’t run full backups or big imports inside a normal page request.
- Trim heavy plugins and enable caching, as in speeding up WordPress.
- Use the newest PHP version your plugins support; PHP 8 runs code faster.
- Resize images before uploading instead of making the server do it.
On ArabyHost
You can change max_execution_time and memory_limit per site in cPanel, opened in one click from the Araby Panel, and choose PHP 8.1, 8.2 or 8.3. Each account has its own resource limits through LVE, so splitting a task into batches works better than pushing the time limit very high. The Araby AI assistant reads the error log and names the plugin or file responsible, and our WordPress hosting plans come with LiteSpeed Cache.
FAQ
What value should max_execution_time be?
30 to 60 seconds is enough for normal pages. Raise it to 120 or 300 seconds temporarily for imports or big updates, then lower it again: a high value lets a broken script burn resources for longer.
Why does the error point to a WordPress core file, not the plugin?
The message shows where the script happened to be when time ran out, not necessarily what made it slow. Look at what you were doing at the time, and at any plugin folder name in the path.
Can I just set it to 0?
0 means no time limit. Avoid it on a website: an endless loop would keep running and eat your account's resources. Raise the limit moderately and move long jobs to cron instead.