PHP "Maximum execution time exceeded" error
On this page
PHP stops a page that runs longer than its time limit (max_execution_time), so one slow request cannot hold the website forever. Imports, backups and updates inside an application often need longer.
Symptoms
PHP Fatal error: Maximum execution time of 30 seconds exceeded in …on the Errors page (section Advanced) or in~/logs/php-errors.log.- An import, backup plugin or update stops half way, or a page ends in a 500 error after a fixed time.
Causes
- The time limit is lower than the task needs (imports, image processing, large exports).
- The script waits for something — an external website or API that does not answer, or a locked database table.
- Large uploads take longer than Max input time to arrive.
Fix
1. Raise the time limit
- Open PHP (section Advanced).
- Under PHP settings, enter Max execution time (seconds), for example
120or300(allowed: 10 to 3600). - For large uploads also raise Max input time (seconds).
- Click Save settings.
The Ready-made buttons fill in tested values: WordPress 120 s, WooCommerce / large shop 300 s, Large uploads 1800 s.
Values saved here take priority over php_value max_execution_time lines in .htaccess.
2. A script that waits
If the error line points to a function that connects somewhere (curl_exec, file_get_contents of a URL, fsockopen), the other side is slow or blocked. A higher limit only makes visitors wait longer; fix the plugin's settings or the external service instead.
3. Long jobs: use a cron job
Jobs that run for many minutes do not belong in a web request: each one holds a PHP process of your account, and visitors wait while they are all busy. Run them from Cron Jobs (section Advanced): a cron job runs PHP from the command line, where the web time limit does not apply. A cron job may run for up to 6 hours. See Cron job not running.
Still not working?
- If the time in the error does not change after saving, the application sets its own limit with
set_time_limit(). Look for a timeout setting in the application or plugin. - If your host has turned on the AI assistant, click Explain with AI on the Errors page.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- PHP "Allowed memory size exhausted" error
Fix "Fatal error: Allowed memory size of 134217728 bytes exhausted" by raising the PHP memory limit in the control panel, and know the account limit above it.
- Upload fails: file exceeds upload_max_filesize
Fix "The uploaded file exceeds the upload_max_filesize directive in php.ini" and other upload size errors by raising the limits in the control panel.
- Cron job not running (or not doing anything)
Your scheduled cron job does not run or seems to do nothing. Check the schedule, command, paths and PHP binary, and log the output to see the error.