Website support, maintenance and fixes for UK businessesCall 0208 088 8371info@websupportservices.co.uk

HomeWordPress errorsMaximum execution time exceeded in WordPress: how to fix it

Maximum execution time exceeded in WordPress: how to fix it

This fatal error means a PHP request ran for longer than the configured execution time and PHP stopped it. The immediate fix may involve the limit, but a slow or stuck plugin task should be investigated before simply allowing scripts to run for longer.

The message you might see

Fatal error: Maximum execution time of 30 seconds exceeded

Different wording, or a file path in the message? Paste it into our free error finder to see which plugin or theme it comes from.

What maximum execution time exceeded means

A message such as "Fatal error: Maximum execution time of 30 seconds exceeded" means PHP terminated a script after it reached the configured max_execution_time. PHP documents the common default as 30 seconds, although hosting providers can choose a different value.

The limit exists to stop poorly behaved scripts from occupying server resources indefinitely. Hitting it does not prove that the limit is too low. A normal task can genuinely need more time, but a plugin can also become stuck, process too much data in one request or wait on work that should have been split into smaller jobs.

Common causes of WordPress execution time errors

Long running imports, exports, backups, image generation, search and replace jobs, ecommerce synchronisation and some update routines can approach execution limits. Security scans and optimisation plugins may also perform expensive work, particularly on large sites or slower hosting.

A plugin bug, repeated database query or inefficient loop can create the same fatal error during an otherwise simple page load. If the error started after a plugin update or only occurs on one admin action, that is more useful evidence than the 30 second figure alone.

Server conditions matter too. A database slowdown, overloaded hosting account or external API delay can make a previously reliable task take longer. Diagnose the request before permanently increasing the timeout.

How to fix a WordPress max execution time error safely

Before editing files or the database, take a full backup of both website files and the database. Then reproduce the issue carefully and keep each test reversible.

  1. Identify the exact page, task or scheduled action that times out. Note any plugin named in the fatal error and any change made immediately before the problem began.
  2. Update or temporarily disable the suspected plugin if the fault is isolated to it. Retest before changing server limits.
  3. Check the current PHP max_execution_time in your hosting control panel or PHP information supplied by the host.
  4. If the task is legitimate and the host permits the change, increase the limit conservatively in the active php.ini, for example:
max_execution_time = 60

Some managed hosts do not allow customers to change this directive directly, so use the host's supported PHP settings instead of adding random directives to .htaccess. PHP also provides set_time_limit(), but changing application code should be left to code you maintain and understand. Do not set unlimited execution time on a live site merely to suppress the error.

When to stop and get help with execution time errors

Stop if a normal front end page needs an unusually long timeout, if the error returns at progressively higher limits, or if the failing task involves payments, orders, bulk database changes or unfamiliar custom PHP. Those patterns need root cause diagnosis rather than a larger number in a configuration file.

Web Support Services offers an Emergency Fix for £249 per incident, with a response within 2 working hours. For ongoing updates, backups and monitoring, care plans start from £59 a month.

Common questions

Answers to the questions we hear most about this.

Why does WordPress say maximum execution time of 30 seconds exceeded?

PHP stopped the request because it ran longer than the configured max_execution_time. A slow legitimate task or faulty plugin code can both cause the same error.

Can I increase max_execution_time in WordPress?

The setting belongs to PHP, not WordPress itself. On some hosting you can change it through the PHP control panel or php.ini. Managed hosts may set their own limit.

Should I set max_execution_time to 0?

Not as a general fix on a live site. In PHP, 0 means no execution time limit in contexts where the setting is honoured, which can allow a faulty script to run indefinitely. Find the slow task first.

Site down or showing an error?

Call us now. Emergency Fix is £149 with a response within 2 working hours, and no fix means no fee.

Get website support