Easily increase maximum execution time for a WordPress site

Many time users receive a message such as “Maximum execution time of 30 seconds exceeded” or “Maximum execution time of 60 seconds exceeded”. This error means that it is taking longer time for a process to complete and it is timing out, as well it means it reaches the maximum time limit set by your hosting server. So, how to to fix this error?

The actual time limit varies across hosting companies, however most of the times the maximum execution time is set between 30 – 60 seconds because that’s usually enough for a good PHP script to run.

Way #1: Edit file wp-config.php:

Add the following to wp-config.php:

set_time_limit(300);

Way #2: Edit file .htaccess:

First make sure you back up .htaccess before you edit it.

To fix the error, you will need to manually edit your .htaccess file and add a simple line of code.

Simply connect to your website using an FTP client.

Your .htaccess file is located in the same folder as your /wp-content/ and /wp-admin/ folders.

php_value max_execution_time 300

Way #3: Edit php.ini

The php.ini file is a configuration file that defines settings for PHP on your server. On many WordPress hosting platforms, you may not see it inside your WordPress folder.

In that case, you can create a new php.ini file inside your WordPress root folder. After that, edit the php.ini file and add the following line.

max_execution_time = 300

In most cases, increasing maximum execution time using either of these two methods will resolve the error. However if it doesn’t, then you need to contact your WordPress hosting provider for assistance.

We hope this article helped you fix the fatal error: maximum execution time exceeded in WordPress.

More details about wordpress errors and tracking them on WordPress website:
https://wordpress.org/support/article/common-wordpress-errors/

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

9 + fourteen =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

20+ Cool WordPress Slider Plugins

For WordPress website owners WordPress slider plugins is a great way to feature content like images, videos etc. on e.g. front pages where the space is limited. Slider typically work as a stack of preloaded content that transition in and becomes visible for the visitor. There are many ways to do this and often cool animated transitions are used to catch the attention of the visitor.