Coding Agency for Web Development » WordPress Development » How to Fix the Max Execution Time Error on WordPress: Uninstalling the Culprits (Part 1)

How to Fix the Max Execution Time Error on WordPress: Uninstalling the Culprits (Part 1)

READING TIME: MIN

In our previous 2-parter, we brought you ways to deal with the theming “package could not be installed” error, and so your favorite WordPress agency for development is back to fight the Forces of Error yet again – and this time, it’s a “Fatal” error!

Less dramatically, this is what’s known as the ‘max_execution_time’ error, and it’s actually a garden variety error that you will invariably encounter during your WordPress life.

As for the ‘fatal’ part of the error, that’s WordPress’s turn to be dramatic for the most part. The site will live, and without much trouble, although until you resolve the issue, your site’s frontend may display a message to users about non-availability due to technical reasons – and that is suboptimal, the equivalent of a ‘CLOSED’ sign. In big red letters, no less.

The Error Itself and Why it Happens

To mitigate abuse of server resources, all of our WordPress websites have a maximum time limit for execution – in other words, for processing server requests. The PHP scripts that make up the majority of a WordPress site are analyzed by this limit to ensure that they don’t keep running forever and hog the server. In reality, this kind of unending script is very often even utilized by cybercriminals seeking to compromise the security of a website.

  Ready, Set, Call-To-Action ~ The Secrets of the WordPress CTAs

Besides PHP, there are all sorts of elements, plugins, and themes for instance, which can also run longer than they were meant to, and bring the server to a crawl – in fact, plugins cause this error the most because, well, plugins are what people install the most of, and because we seem to be getting our plugins from every sort of developer who we can’t always vet.

The error message usually appears on your dashboard, and the text is in the form:

“Fatal Error: Maximum execution time of <x> seconds exceeded”

Where x is usually a value between 30 and 60 (seconds), a limit that is imposed by most web hosts, and it is a safe amount of time to expect a script to finish processing within. 30 seconds work for most good scripts, but to give them your code a little more leeway, you can use up to 60 seconds. There’s also the case where your website is actually so resource-intensive that the scripts easily take much longer to execute and still pose no danger to the server. In such a scenario, maybe you could first consider a more capable server setup.

Alternatively, perhaps your hosting provider has just set too small a number for the max time limit for a site of your magnitude, and you could just have them change the value for your website.

  10 Indications You Need a Professional WordPress Maintenance Service

When Does the Error Appear?

Most of the time, when we try to upload a new plugin or theme or update for WordPress, the page will display relevant information and the Success / Failure status. Similarly, it displays the execution time error sometimes. Another way of detecting the error is when, as we mentioned above, the site’s frontend shows that it is unavailable to users. And lastly, there’s the email that WordPress sends you, elaborating on the fatal error and what caused it.

Fixing the Execution Time Limit Error

There are a few ways to restore your working website from this error. At any point in this process, feel free to consult your WordPress agency for development for expert and customized guidance, so let’s jump right in!

Uninstall the Offending Element

This is the quickest way to fix the error, which involves uninstalling the item in question that is taking longer to finish executing. Proceed with the following steps:

1. Uninstall the last item (or WordPress update) you’ve installed since it is most likely the cause.

2. If the error persists, check the error email for information about the element that caused the error.

3. Finally, use the trial-and-error method, deactivating and reactivating each plugin, till you find the offender.

Uninstall the plugin via the dashboard, or via FTP, whichever you’re more comfortable with. Then there’s the link you’ll receive in the aforementioned email – a link that takes you to “Recovery Mode’. In Recovery Mode, you’re taken to the admin dashboard and you can uninstall problematic themes or scripts, or plugins. This way gets rid of the error, but you will have to replace the element you just removed with something similar, and, more importantly, the execution time limit stays untouched.

  How to Improve the Readability of Your WordPress Website's Blog Posts?

Conclusion

In part 2, we’ll look at ways to remedy exactly that, with the use of plugins and by editing files to increase the execution time limit.
We hope you’ve found this tutorial useful in your quest to slay WordPress errors, so we’ll see you next time with the other ways to restore your WordPress website to pre-error glory!

Tags:

Vipe Team

Author Vipe Team

Our tireless team who creates high-quality WordPress-related content for you 24/7/365.