Blog

We are a team of results-driven creative geniuses at PMGS Digital Agency that are enthusiastic about expanding your business and have the skills to do it.

Homeblogfix-fatal-error-maximum-execution-time-exceeded-wordpress

How to fix Fatal error: maximum execution time exceeded in WordPress

How to fix Fatal error: maximum execution time exceeded in WordPress

Does WordPress surprise you with Fata error: Maximum execution time of 30 seconds exceeded error popping up on your screen when you try to update any plugin or theme on WordPress?

When it takes too long for the PHP code to run on WordPress and reaches the maximum time limit that is given by your WordPress hosting server the error might occur. The limit of time is also equally important since it helps you avoid abuse of server resources.

We’ll teach you how to solve the fatal error: maximum execution time exceeded in WordPress in this blog article.

Why maximum execution time exceeded error occurs?

PHP is the most common used programming language for WordPress. A time restriction is established for how long a PHP script can execute to prevent web servers from misuse.

The exact time limit varies by hosting provider, however most of the time the maximum execution duration is set between 30 and 60 seconds because it is generally enough time for a solid PHP script to operate.

When a script hits the maximum execution time limit, the maximum execution time exceeded error is returned.

maximum execution time exceeded error message wp

Fixing maximum execution time exceeded error

WordPress may display the following error message to your website visitors depending on when and where the mistake occurs.

technical-difficulties

This is a feature of WordPress 5.2’s fatal error prevention. You may also receive an email informing you of which plugin (if one was responsible for the mistake) caused the issue.

technical issue email

This mail will also include a link that will redirect you to the WordPress recovery mode.

recovery mode

Once there, just deactivate or uninstall the plugin that is generating the issue.

If you don’t want to remove a plugin, you can fix the underlying reason of the problem.

To correct the mistake, manually modify your.htaccess file and add a single line of code.

Simply use an FTP programme to connect to your website.

Your .htaccess file resides in the same directory as your /wp-content/ and /wp-admin/ files.

If you use FileZilla as your FTP client, for example, you can locate it under the ‘Remote Site’ area on the right-hand column.

htaccess file infilezilla

When you’ve found the.htaccess file, right-click it and select the ‘View/Edit’ option. This opens the file in a text editor.

view edit htaccess file

Then add the line below to the bottom of your .htaccess file:

htaccess

You can see how it will look if you are using your Notepad as the text editor.

adding code to htaccess file

Save it after you finish.

This code just increases the maximum execution time to 300 seconds (5 minutes). Now you can see is the error has been resolved on your website.

If the problem persists, try raising the value to 600.

Modifying your php.ini file is another way to resolve the maximum execution time exceeded problem in WordPress.

The php.ini file is a configuration file on your server that defines PHP settings. You may not see it inside your WordPress folder on many WordPress hosting sites.

In such scenario, you can add a new php.ini file to the root folder of your WordPress. Then, in the php.ini file, add the following line.

php-ini

Remember to save and upload your changes to the server. You may now check your website to see whether the error has been resolved.

Increasing the maximum execution time using one of these two ways will usually resolve the problem. If it does not, you must contact your WordPress hosting provider for assistance.

If you think this article was useful to you, then stay tuned with us and subscribe to receive our blogs. If you wish to stay connected with us on social media, you can find us on Facebook, Instagram and LinkedIn