How to Increase maximum execution time for a WordPress Site?

You may receive the below error for your Wordpress while installing/updating themes or plugins. This issue occurs when your WordPress's PHP code takes a long time to run and reaches the maximum time limit set for your hosting account.

Fatal error: Maximum execution time of xx seconds exceeded

By default, the maximum execution time to execute a PHP code is set between 30 – 60 seconds on cPanel. It should be enough for a PHP script to run. There are three different ways to increase Wordpress maximum execution time in cPanel.

Increase PHP limit from PHP.ini file

If you have the access to the php.ini file, you can modify the maximum execution limit. If you don't find max_execution time on your php.ini file, you can add the below line to your php.ini file.

max_execution_time = 200;

Increase PHP limit from wp-config file

You can also increase the PHP time limit from the WordPress config file called wp-config.php. Just add or edit the following line to modify the PHP time limit.


Increase PHP limit from .htaccess file

If you feel comfortable increasing the maximum execution time for PHP code from .htaccess, you can add or edit the below code to your .htaccess file.

max_execution 200

We have used 200 seconds for the example. You can enter the seconds as per your requirement.

Related Articles

How to reset WordPress admin user's password?

There are several ways to reset WordPress admin user password in WordPress. A simple method is to...

How to restore your WordPress website from backup?

This article describes step by step guidance on how to restore WordPress website from backup. You...

How to find Database details of your Wordpress in cPanel?

This article is for you if you are a Wordpress beginner and don't know how to find your Wordpress...

How to install Woocommerce on your Wordpress?

If you have installed the Wordpress and want to run an online store, we highly recommend you to...

How to enable WordPress Maintenance mode?

You can set a wordpress maintenance page when updating your website. Such updates could be...

  • 0 Users Found This Useful

Was this answer helpful?