How to Increase PHP Time Limit for a Wordpress Site?

No results found. Try again with different words?

Search must be at least 3 characters.

    How to Increase PHP Time Limit for a WordPress Site?

    What Is The PHP Time Limit?

    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.

    1. Most Recommended: Just Contact Your Host
    Increasing the PHP Time Limit is complex and the process that differs from hosts to hosts. So it is always better to get it done from someone who knows it well. So just get in touch with your hosting company and they will be happy to do it for you.

    2. Increasing PHP Time Limit via PHP.ini file
    Many small shared hosted servers do not allow users to access the PHP.ini file. If you are granted access, you can directly increase the PHP Time limit through this file. If you wish to extend the limit to 300 seconds, you can enter the following line of code or update if it exists already:

    max_execution_time = 300;

    3. Alternative to editing PHP.ini through wp-config.php
    This is another alternative to the PHP.ini method. Simply add / edit the following line in the wp-config.php of your WordPress

    set_time_limit(300);

    4. Modifying the .htaccess file
    Some of you might have the .htaccess file where you can simply add / edit this line of code to increase the time limit.

    max_execution 300

    P.S: 300 in the above code samples mean 300 seconds. Feel free to change this to any appropriate number.

    Was this article helpful?
    Did not find a solution? We are here to help you succeed.

    Related Docs

    Scroll to Top

    Download is Just A Click Away!

    Be among the first to try the beta version of Astra’s Header Footer Builder. Filling the form will ensure you’ll be the first to learn about updates and features.

    Download is Just A Click Away!

    Enter your email address and be the first to learn about updates and new features.