How to Fix Fatal Error: Maximum Execution Time Exceeded in WordPress in 4 steps (Two methods)

Table of contents

No heading

No headings in the article.

WordPress is a Content Management System primarily coded using the PHP programming language. PHP scripts have a maximum execution time to keep your site healthy, for example, if there were no maximum execution time, Attackers could use never-ending scripts to abuse your website’s server and make your data insecure. In most cases, the MAX EXECUTION time is set between 30 and 60 seconds, which was calculated to be enough to run a good PHP script.

William Penn said, “Time is what we want most, but what we use worst”. LOL 😀😀😀😀. My bad 🤦‍♂️, I am wasting time already, let’s continue.

When the maximum execution time is exceeded, it raises the maximum execution time exceeded error.

HOW TO FIX MAXIMUM EXECUTION TIME EXCEEDED ERROR FROM CPANEL Method1: Editing the .htaccess file

Step1: Login into your cPanel, navigate to the File Manager, then to the folder the WordPress was installed.

Step2: By default, the .htaccess file is hidden, you need to change the settings to show hidden files.

settings_LI.jpg

Then, show hidden files

show hidden_LI.jpg

Boom… The .htaccess is now visible

htaccess_LI.jpg

Step3: Edit the .htaccess file by adding the following snippet php_value max_execution_time 300

edited htaccess.JPG

Step4: Save the changes

You can increase the time if needed.

Method 2: By using the MultiPHP INI Editor.

Step1: In the cPanel, Navigate to MultiPHP INI Editor.

Multiphp.JPG

Step2: Open the MultiPHP Editor, then select the domain name.

inside multiphp_LI.jpg

Step3: You will be able to see the interface below, after selecting the domain. Adjust the max execution time to 300. Although this can be increased if needed.

time config_LI.jpg

Step4: Navigate to the bottom of the page, and click APPLY to save the changes.

Now you see the fatal error is not as Fatal as it appears. LOL.

See ya.