Fix WordPress Fatal Error: Maximum Execution Time Exceeded – WordPress Tutorial

By | June 2, 2020

The default maximum execution time of a php script is 30 seconds. If a php script is not finished in 30 seconds, this error will occur. In this tutorial, we will introduce how to fix this error.

We will introduce you two ways, you can select one to do.

Method 1: Edit your .htaccess file

If you have installed Yoast SEO or WP File Manager plugin, you can edit .htaccess online. Here is the tutorial.

An Easy Way to Edit WordPress .htaccess with Yoast SEO Plugin

Create Filefolder and Upload Files with WP File Manager

Otherwise, you have to use a ftp client to connect your site server to edit .htaccess file, which is not a good choice.

You can add code below in your .htaccess file.

php_value max_execution_time 300

This code will set php maximum execution time to be 300 seconds.

Method 2: Edit php.ini

If you can edit php.ini file, you can set php maximum execution time easily.

max_execution_time 300

edit php.ini file to set php max_execution_time

After you have edited php.ini file, you must restart apache, tomcat, nginx or other server application to make it work.

Leave a Reply

Your email address will not be published. Required fields are marked *