wonderful world of websites WWW

WordPress Critical Error

The WordPress critical error screen is when your website has basically had a meltdown as something has gone wrong. It can be scary when it comes up, as it can mean quite a few different things and it doesn’t actually tell you what’s gone wrong. But it can also be easily solved, so let’s look at some solutions.

wordpress critical error

The first thing to do is to check your email, as sometimes you will get an email detailing the error. Now to you it may seem like a big jumble of code, but you need to look within the last part of the code and it may specify the URL of a certain plugin, so you at least have a bit of a starting point. If you do get an email you should also get a safe mode URL so you can click it and deactivate that plugin and see if it solves the issue.

But more often than not you don’t get an email and you also can’t access the back end of the website to get in and do anything.

This is why I ALWAYS say that you should have full access to your hosting, as if you don’t you won’t be able to access anything to fix the website and will have to contact the person who took out your hosting either for them to access or to pay them to fix it, and if they are anything like me things tend to wrong when I’m not in the office so they may not be available straight away.

Got access to your hosting? Let’s get started:

WordPress Critical Error Solutions

1. The most common issue is a plugin conflict, this can happen automatically, especially if you have auto updates turned on or have recently done some updates. WordPress is open source software and the themes and plugins are all developered by thousands (if not millions) of other developers. Some large companies, some one person on their own. It’s always recommended to use well known plugins that have not been abandoned by WordPress and they are compatible with the latest version (it will tell you when you install them. You can also run a Wordfence scan to see if you are using any abandoned plugins, if so you should delete them and find an alternative as these are a massive security risk. A lot of hosting providers also provide an error log and this is a good place to start. OK so now you know the why let me show you the how. If you cannot access your website you need to go into your hosting and open the file manager (where this is will differ depending on your host). From there we can manually turn off all plugins by renaming the plugin file. We then login to the website and navigate to the plugins, rename to the original name, refresh then test each plugin one by one to see who’s the culprit causing the error. To make it easier I have created a video for you to follow:

2. If this didn’t work the next thing to check is whether there is an issue with the current theme. Follow the video above but instead of renameing the plugins file, go to WP-Content>Themes and rename the file of the theme that you are using currently. Reload the site and see if that works. For both these solutions once the site is back on make sure all your updates are done as this can often correct it straight away. Then reactivate the offending plugin or theme and see if that’s fixed it. 

3. Check PHP version, this is also done in your hosting and it’s what WordPress is run on (PHP). There are various versions of PHP (at the time of writing this blog Sept 24 the latest version is 8.3) and most plugins and themes will not work with older versions (usually 7.2 and under). If you are running this version on your hosting, you may also be getting charged extra by your hosting company if you have not upgraded your PHP version as these versions are no longer supported. So what you need to do is go into your hosting control panel and search for PHP version (will differ from host to host), you can then check what version you are using BUT before you upgrade please be aware if you are using abandoned or not up to date plugins and themes this can cause your website to go down (if it isn’t already). Once you have changed to the latest version check your site to see if all is OK. If your site was running and you needed to upgrade the PHP anyway and it has now gone down, switch the PHP version back and you will need to investigate what plugin or theme is out of date. Run all updates and also run a Wordfence scan to see if there are any abandoned plugins and delete as necessary, then try changing the PHP version again.

4. The issue could also be in your .htaccess file which is a little bit more trickier. If you go into file manager and the public_html folder you may see the .htaccess file, if not there should be a setting to show hidden files (usually in top right but depends on your host). Download the file then delete, re visit the site and see if that works. If it does go into settings>permalinks in the WordPress dashboard and save them twice to recreate a new .htaccess file. If it doesn’t work you can re upload the current file.

5. You may also find that the critical error comes and goes with no real reasoning behind it. One minute it will show then you refresh and it goes. This can be a plugin glitch but if it keeps happening it maybe that your PHP memory is being exhausted. This is different to disk space and is the memory allocated by your hosting for the site to be able to run. Generally most WordPress websites nowdays (apart from really basic sites) will require a memory limit of 256mb. Some hosts allow you to change this limit by going to PHP Configuration in your hosting cpanel. You can also add a line of code to your wp-config file just above happy blogging:

define(‘WP_MEMORY_LIMIT’, ‘256M’);

But if your host does not allow PHP memory changes this won’t work. Check with your host if in doubt. Whilst in the wp-config file in that same area you can also change the debug rule to true instead of false and any errors will show up on your website.

As I said at the start the most common reason is plugin issues or conflicts and this will probably resolve the issue in 90% of the cases. 

If you are still having trouble then please let us know as we can help, there’s not a site we haven’t been able to get back on yet!

Please note: for us to fix you WILL have to have full access to your hosting. If you do not have access to your hosting and wish to change hosting companies then we also offer hosting!