How to Increase PHP Time Limit for a WordPress Site?

The PHP Time Limit is the amount of time that your site will spend on a single operation before timing out. When an operation reaches the time limit set, then it will return a fatal error that looks like this:

Fatal error: Maximum execution time of xx seconds exceeded...

The default value for PHP time limit on most hosts for the PHP Time Limit is 30 seconds. You can increase this limit by following any of the methods mentioned below.

Method 1: Edit file .htaccess:

Add the following to .htaccess (Make sure you back up .htaccess before you edit it):

php_value max_execution_time 300

Method 2: Edit file wp-config.php:

Add the following to wp-config.php:


Method 3: Editing php.ini

Add the following to php.ini:

max_execution_time = 300

Read more about Maximum execution time exceeded on