How to Fix : Maximum execution time exceeded error in WordPress

250 0
250 0

Ever got a message from WordPress saying that “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 60 seconds exceeded”? It usually appears when you try to upload/update a comparatively huge theme or plugin into WordPress. This is due to the time set by your server to run PHP scripts which prevents WordPress from executing larger operations.  Some hosting providers set it high while some set it too low that we have to increase the limit ourselves. There are different ways to fix this issue and are quite simple.



Fix method 1 : Editing .htaccess

You can fix the Maximum execution time exceeded error by editing your .htaccess file and adding a one line command to it. The .htaccess file is used for decentralized management of web server configuration. You can find it in the root directory where you installed your WordPress website(where your wp-admin and wp-content folder is located).

Access the .htaccess file using your FTP client or the control panel provided by your host.

Open the file and put this code :

php_value max_execution_time 200

This will set the max execution time set by your server to 200 seconds, if you want more you can change the value to 300 or 400 as you wish.


Fix Method 2 : Editing wp-config.php

If editing your .htaccess file did not fix the problem the next solution is to edit the wp-config.php file located in your WordPress root folder. Open the file and add the following:


As before 300 is the time in seconds which you can edit.

Important: If you are making changes in wp-config.php, then add this line above the “/* That’s all, stop editing! Happy blogging. */” comment or otherwise it wont execute.


Fix Method 3 : Install WP Maximum Execution Time Exceeded plugin

If you don’t have access to wp-config.php file or .htaccess file the next best thing you can do is to install this WP Maximum Execution Time Exceeded plugin and activate it. That’s all, the plugin sets maximum execution time to 300 seconds by default.


Hope this tutorial help you resolve the maximum execution time exceeded error. If the problem still persist one way is to edit the php.ini file which is not usually accessible to users. You can contact your hosting provider to help you out with this.


In this article

Join the Conversation