How to Fix the WordPress “Fatal Error: Maximum Execution Time Exceeded” Print

  • 0

Solving WordPress errors can seem difficult, especially for new users but in reality, this is not the case—most WordPress errors can be solved quickly and easily. The Maximum execution time exceeded error is very common. It can show up while you’re doing something as simple as updating WordPress, themes, or plugins. When it shows up, the error is followed by a message similar to this:

 
Fix the WordPress fatal error
 

Fortunately, this WordPress fatal error has a very straightforward fix. In this article, we’ll show you a couple of different solutions you can try, such as:

 
 
 
 

Solving the Error

Maximum execution time (max_execution_time) is a time limit on how long a PHP script can run. It is a way hosting providers can limit the use and abuse of server resources, especially for shared hosting. The actual default value depends on the hosting, but it-s usually set to 30 (i.e. 30 seconds). If a script exceeds the time limit, you will receive the Maximum execution time of X seconds exceeded error. The easiest solution to this problem is increasing the time limit. Changing it to 300 seconds (5 minutes) is often more than enough. If that doesn’t help, you can try setting even higher values for maximum execution time.

 

Before you proceed, some of these solutions will involve editing native WordPress files, so make sure to backup your site beforehand.

 

Increasing the max_execution_time Value

We will show you four different ways to increase the max_execution_time by adjusting the values set in native WordPress files. The first two methods are for cPanel users while the other two are for FTP client users.

 
  • Editing the max_execution_time value in cPanel

Log in to cPanel using your credentials. Navigate to the Software section and click on the MultiPHP INI Editor.

 
MultiPHP INI Editor
 

In the new window, select your domain from the dropdown menu, locate the max_execution_time PHP directive, and change the value associated with it to 300.

 
Select your domain
 

To finish, press the Apply button at the bottom.

 
  • Editing the php.ini file in cPanel

There’s another way to change the same value in cPanel. If you are already logged in, navigate to the Software section and click on MultiPHP INI Editor.

 
MultiPHP INI Editor
 

In the new window, find and select the Editor Mode tab on the top and then choose your domain from the dropdown underneath. In the field below that, insert the following line of code:

 
max_execution_time = 300;
 

If the field already contains code for max_execution_time then simply replace the value with 300.

 
Replace the value with 300
 

To finish, click the Save button.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution