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:
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: