How to Fix Fatal Error Maximum Execution Time Exceeded in WordPress

Michael Oldborn

" Maximum Execution Time Exceeded " Error and The Solution

Maximum Execution Time Exceeded

You may have got this error “Fatal error: Maximum execution time of 30 seconds exceeded” once, at least, while updating a WordPress theme or plugin.
This error usually occurs because of either your Php code takes a long time to run properly or your wordpress hosting server reaches its maximum time limit.

Why The " Maximum Execution Time Exceeded " Error Appears?

Hosting companies, in general, set a time limit on how long PHP script will run against bad use. This time limit may be different depending on your hosting company. However, maximum execution times are generally limited from 30 to 60 seconds, which is enough to run a php script.

Visual 1
How to Fix Maximum Execution Time Exceeded

How To Fix " Maximum Execution Time Exceeded " Error?

Method One

Although this error is considered as fatal error by users, it can actually be resolved in a few steps. Here, the point is to be able to know when and where the error occurred. Depending on this situation, WordPress might send you a message like in visual 2.

Visual 2
Time Exceeded
This is a message that comes with WordPress 5.2 in regards with security. if this error is caused by a plugin, you will receive an e-mail about it.
Visual 3
Maximum Execution Time Exceeded

In addition, WordPress also sends a link so that you can log-in using “Recovery Mode”.

Visual 4
Maximum Execution Time Exceeded

You can delete or disable the plugin that cause the error. You can also correct this issue without even deleting or disabling the buggy plugin. To do so, you need to manually edit the ” .htaccess ” File and add a line of code.

You should to access to your server, where your theme and WordPress files are being stored and to do that, you may use a FTP Clients.

Visual 5
Maximum Execution Time Exceeded

After you access to the .htacess file in your server, then you need to copy paste this snippet code “php_value max_execution_time 300″ in this file and they save it.

Visual 6
Maximum Execution Time Exceeded

With this code, the maximum execution time is set to 300 seconds. Visit your website now. If you still get the same error, then set it to 600 and then give another try.

Second Method

This error can also be resolved by modifying the php.ini file. this php.ini file is the configuration file that defines the php settings on the server.
This file may not be found on the some WordPress hosting servers. So you may need to create a new php.ini file in the WordPress base folder.

After you create the file, add the following snippet code.

max_execution_time = 60

and then make sure you saved it.

In general, the two methods also eliminate this error. However, if the two methods did not solve the problem, we suggest you to contact to your wordpress hosting provider.

If you like our article, please subscribe to our youtube channel and check out our wordpress related videos.

Why is WordPress Security Important

If you have any questions about this article or other topics, please click the button below. Your questions will be answered soon.

Quality And Fast Hosting

If you want an affordable, reliable and fast WordPress server, just go ahead and click on the button and get a package as needed.

Leave a Reply

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

Archives