WordPress 'Maximum Execution Time of 30 Seconds Exceeded' Error
A script ran too long. Raise the time limit or fix the heavy task causing it.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
PHP stops any script that runs longer than the allowed time, often 30 seconds.
Quick fix: raise the limit
In your hosting panel's PHP settings, raise max_execution_time (for example to 120 or 300). On some hosts you can add to .htaccess:
php_value max_execution_time 300
This only works where PHP runs as an Apache module, and may cause a 500 error otherwise, so check with your host.
Find the cause
- A large import, backup or migration: run it in smaller parts.
- A plugin calling a slow outside service. See our conflict guide.
- A heavy database. See our database guide.
Related
Memory limits cause similar crashes. See our memory guide. Gateway timeouts: see our 504 guide.
Free tool for this problem: Site Health Checker
Related guides
- YouTube Video Embed Not Working or Showing an Error on Your Website
- WordPress XML Sitemap Gives 404 or Is Not Generating
- Changed the WordPress Address (URL) and Now the Site or Login Is Broken
- wp-config.php Explained: The Settings That Matter and How to Edit Them Safely
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.