WordPress errors

How to fix a WordPress maximum execution time error

A WordPress maximum execution time error means PHP stopped a request after its execution-time allowance was reached. Identify what was running before changing the allowance. An import that needs smaller batches and a plugin stuck repeating work require different repairs.

Time: 30-60 minutes for diagnosis Level: Hosting settings and guided checks
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

Find out what stopped the task before retrying

An import or backup that stops halfway through can leave you unsure whether to start again. Before retrying, establish which time limit ended the request and what work already completed. The steps below help you gather that evidence, reduce the task where supported and involve the host when the controlling limit sits outside WordPress.

WordPress Site Health Server information including the PHP time limit row
Record PHP time limit in the Server panel, then have the host confirm which limit ended the failed request. The unchanged 2021 screenshot shows sample values and an old PHP version; do not copy them as recommended settings. A separate hosting or proxy timeout can still stop the request earlier. Credit: WordPress Documentation Team, CC0.

Confirm which timeout occurred

Find the exact message in the hosting PHP log or recovery email. Maximum execution time of ... seconds exceeded identifies a PHP limit. A browser timeout or a 504/524 response can instead come from another server waiting for a response. Send the message and test time to your host so they can identify the layer that stopped the request.

Record the action: a backup, product import, editor save or ordinary page view. Check whether the job is still running or has already written records before starting it again. If a payment was involved, inspect the order and gateway records first using the payment-error guide.

Preserve data and try a smaller supported workload

Take a backup through hosting if the dashboard backup process is the one failing. For an import or bulk edit, use a staging copy and test a small sample. Select a smaller batch size if the tool documents that control.

Use the tool's resume function or duplicate-matching rules after a partial import. Do not split a CSV blindly if its rows depend on one another, such as variable products and their variations. For a backup, ask the backup provider whether its supported process can divide the work or run through hosting instead.

If a normal page started timing out after one plugin change, use the plugin conflict guide. A larger time allowance is not a substitute for correcting a loop or a failed external-service request.

Check and change the PHP time allowance when justified

Open Tools > Site Health > Info > Server and record PHP time limit if displayed. Ask your host to confirm the effective value for the failing web request and any separate server or proxy timeout. The plugin's documentation should explain its requirement; use that and the host's supported limits to choose a value.

  1. In hosting, select the affected website and open its PHP settings. cPanel accounts that expose it use Software > MultiPHP INI Editor; choose the domain in Basic Mode.
  2. Find max_execution_time and record the current number of seconds. Use a bounded value agreed with the host for the specific job, then save or apply the change. Do not select 0, which removes this PHP limit.
  3. Reload Site Health or ask support to verify that the new value applies to this domain. If the setting is unavailable or unchanged, let the host make the supported change instead of adding directives to random files.
  4. Run one controlled test and inspect its completion record. A larger PHP limit will not override an earlier timeout imposed by another server.

Investigate repeated failure instead of extending again

If the task still stops, give the host and plugin maintainer the job type, sample size, failure time and error. Ask whether the operation is waiting on an external service, blocked by a server limit or repeatedly processing the same data. Use private debug logging if they need WordPress-level evidence.

Avoid adding php_value lines to .htaccess without the host's instructions. Their validity depends on how PHP is run and unsupported directives can produce a 500 error.

Verify the result and restore temporary settings

Check the output, not just the disappearance of the error. Count imported records, inspect representative items or confirm the backup can be opened and contains the expected files and database. Check for duplicates created before the earlier failure.

Return a temporarily raised allowance to its recorded value once a one-off task is complete, unless the host confirms an ongoing requirement. Turn off diagnostic logging, then test the dashboard and a public page. Document the batch size or corrected plugin version that completed the job.

Reference material

PHP documents execution-time limits and other server timeouts. cPanel describes its MultiPHP INI Editor controls.

Get help with the next step

If a routine task keeps timing out or a partial import needs untangling, ask BugShield to assess the problem. Tell us what ran and what completed so we can plan the next step without duplicating work.

Questions answered

How to fix a WordPress maximum execution time error FAQs

Will increasing memory fix an execution-time error?

Memory and execution time are separate limits. Confirm the exact error and change only the setting relevant to it. A memory increase does not itself extend the PHP time allowance.

Does a timeout mean the import saved nothing?

No. Earlier records can already exist. Inspect the import log and created items, then use documented resume or duplicate-handling controls before retrying.

Why does a 504 remain after raising the PHP limit?

Another server can stop waiting before PHP's allowance expires. Ask your host to identify the server or proxy timeout and the slow operation behind it.

Should I set max_execution_time to 0?

No. That removes this execution limit. Use a bounded supported value for a justified task and investigate repeated failures instead of allowing indefinite execution.

Can I change the setting without editing files?

Yes, when your hosting panel exposes PHP settings or MultiPHP INI Editor. If it does not, ask support to make and verify the change for the affected website.

Need a hand with your WordPress site?

Tell us what happened and where you got stuck. A BugShield developer can help you work out the next step and confirm a price for the fix.

Explore help with this issue

Accessibility settings

Adjust how this site looks and moves. Your choices are saved in this browser.