PHP "Maximum execution time exceeded" error

For hosting customers · Updated 2026-10-29

On this page
  1. Symptoms
  2. Causes
  3. Fix
  4. Still not working?

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

  1. The time limit is lower than the task needs (imports, image processing, large exports).
  2. The script waits for something — an external website or API that does not answer, or a locked database table.
  3. Large uploads take longer than Max input time to arrive.

Fix

1. Raise the time limit

  1. Open PHP (section Advanced).
  2. Under PHP settings, enter Max execution time (seconds), for example 120 or 300 (allowed: 10 to 3600).
  3. For large uploads also raise Max input time (seconds).
  4. 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.
Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.