How do you increase the maximum execution time?

To protect web servers from abuse, there is a time limit set for how long a PHP script can run.

The actual time limit varies across hosting companies, however most of the times the maximum execution time is set between 30 – 60 seconds.

When a script reaches the maximum execution time limit, it results in maximum execution time exceeded error.

There are a number of ways to fix this error:

Method 1 - edit file  wp-config.php

Add the following to wp-config.php:


Method 2 - edit file .htaccess

Add the following to .htaccess:

php_value max_execution_time 300

Method 3 - editing php.ini

Add the following to php.ini:

max_execution_time = 300



Are you still experiencing problems? Contact us at
Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.