Nothing is more terrifying than when your WordPress site goes down, especially when you get an alarming message like “There has been a critical error on this website.”
When you’re locked out and the frontend is entirely down, you need to know how to fix the critical error now. Every minute that passes is driving away visitors as they encounter a glaring error screen.
Luckily, fixing this critical error is usually just a matter of adding a small PHP function or deleting a problem plugin. Here we’ll go over a variety of ways to troubleshoot this issue and get your site up and running again fast.
Check out our video guide to fixing the ”There Has Been a Critical Error on Your Website” Error
What Causes the “There Has Been a Critical Error on Your Website” Error?
If you’ve been using WordPress for some time, you’ve likely heard of or possibly even encountered its most infamous error: the White Screen of Death. This startling glitch would cause your entire website, and sometimes even your backend, to load as a blank white page.
In recent versions of WordPress, this blank screen has been replaced with the critical error and the text “There has been a critical error on your website. Please check your site admin email inbox for instructions.”
While this is less panic-inducing than your site simply refusing to load at all, the error text isn’t much more helpful than before, and it’s likely to leave you wondering: What causes this critical error?
Much like the White Screen of Death, the issue can usually be traced back to an issue with PHP: either your memory limit being surpassed, or an error in your code, plugins, or theme. It may also be an issue of database corruption.
While the error text itself may not be very helpful, knowing this makes troubleshooting much easier.
You may also want to look into these other WordPress errors, as you could be experiencing multiple of them:
- ERR_CONNECTION_TIMED_OUT — Caused by a slow or overloaded web server.
- ERR_CACHE_MISS — If you see this, look into your website’s cache or PHP tools like plugins, as they’re very likely the cause.
- 500 Internal Server Error — A serious error that can usually be traced back to server file corruption.
- Error Establishing a Database Connection — Corruption in your database or a database server issue can be the root of this problem.
- HTTP 503 Service Unavailable — Indicates an issue with your server.
- HTTP 502 Bad Gateway — Yet another server issue, often caused by too many visitors overloading it.
And if you see any other strange errors, look through these HTTP status codes.
How to Fix the “There Has Been a Critical Error on Your Website” Error?
You’re here to get your site up and running again, and to that end, we’ve collected several different potential ways to fix the issue. Knowing that the cause is likely PHP-related, these may involve editing core WordPress files. Even with your site in a broken state, make sure to back it up before implementing any of these suggestions, as we don’t want to make it worse!
If you’re able to log in to your website’s backend, that will help immensely. But as your entire site is likely down, you’ll very likely need to access it through FTP (or SFTP).
Contact your web host or look through your hosting dashboard to find your FTP login credentials, and make sure to install an FTP client like FileZilla. This guide on connecting to WordPress over FTP can help too.
Enable Debug in WordPress
If you’re having trouble with WordPress, one of the first things you should do is enable debugging. With debug mode on, you’ll be able to see the various PHP errors occurring on your site, and you can use this to trace back to the root of the issue.
As you may be unable to access your dashboard, you’ll also need to enable the debug log. This will write all PHP errors to a file.
If you’re hosting with Kinsta, enabling debugging with MyKinsta is very easy. Just log in to the hosting dashboard, then go to Sites > Tools > WordPress debugging and click Enable. You can then look around your site to find the cause of the issue or check the log. Make sure to disable debugging when you’re done, as it’s visible to your visitors as well as you.
If you need to manually turn on debugging, or you need to access the debug log, follow these steps.
- Step 1: Connect to your site with FTP.
- Step 2: Find wp-config.php in the root folder and open it with a text editor or IDE.
- Step 3: Place the following code at the bottom of the document, just before the final message, then save and close the file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
Here’s what it will look like when done:
Debugging is now enabled on your site and errors will be written to the log. You can find the debug log in the wp-content folder, named debug.log.
Look for names of your theme or plugins which will point to them being the cause or references to a specific file. Even if you aren’t sure what to do with this information, save it someplace — it can help you if you need to reach out for support.
When you’re finished debugging, make sure to remove these lines of code.
Roll Back Your Site
When WordPress errors rear their head, restoring a backup can be a quick and easy way out. While it won’t always solve the issue, it’s definitely worth a shot. And if the problem happens again, you may be able to retrace your steps next time.
How you restore your website all depends on how you backed it up. If you use a plugin, follow the instructions in the documentation. If backups are included with your web host, you’ll likely be able to do it from your hosting dashboard.
For instance, Kinsta users can restore a backup by logging into MyKinsta, finding your site under Sites, going to the Backups tab, then clicking Restore to…
Before restoring to your live site, try it on a staging site to ensure that the site is indeed functioning and you’re not overwriting your hard work.
Revert to a Default Theme
Sometimes the critical error can be traced back to a conflict within your theme. The best way to test for this is to temporarily delete it and revert to a default theme, which should immediately clear up the issue.
Make sure you back up your site first, as you’ll need a way to get your theme files back once they’re gone. Simply reinstalling the theme may cause you to lose your custom styling.
If you have access to your dashboard, this is easy. Just go to Appearance > Themes, click on the theme to select it, and then click Delete in the lower right corner of the pop-up window.
If you don’t see the option, then try downloading and switching to a different theme. The safest bet is to try a default theme like Twenty Twenty-One.
If you don’t have access to your backend, follow these instructions to revert to a default theme with FTP.
- Step 1: Connect to your site with FTP.
- Step 2: Navigate to wp-content/themes. You have two choices here: either rename your theme folder (will allow you to turn the theme back on later) or simply delete it.
- Step 3: If you don’t have a backup theme here already, manually download Twenty Twenty and place its files into the themes folder.
Your site should now revert to Twenty Twenty. If it loads properly now, you know it was a theme conflict.
To restore your theme files, simply reinstall the theme or change the folder back to its original name.
Disable All Plugins
When you’re having a critical error, a plugin is often to blame. If you have several or even dozens of plugins on your site, trying to locate the one that’s the issue may seem like a daunting task.
But there’s an easy way to find the problem plugin: simply turn them all off and see if that fixes the problem. If it does, enable them one by one until your site breaks again. And there’s the culprit!
To disable your plugins from the dashboard, visit Plugins > Installed Plugins and tick the checkbox at the top of the list to select them all. Then click Bulk Actions > Deactivate, which should be enough to disable any conflicts and restore your site.
You can also click Delete instead to entirely remove their files, though you will need to reinstall them manually or restore a backup.
You can then turn them on one by one by returning to Installed Plugins and clicking Activate on each.
You can do essentially the same thing through FTP.
- Step 1: Log in to your site with FTP.
- Step 2: Open the wp-content folder to find your plugins.
- Step 3: Rename the plugins folder to plugins_old and verify that your site is working again.
- Step 4: Rename the folder back to “plugins”. The plugins should be disabled still, so you should be able to log in to your dashboard and activate them one by one. If the plugins reactivate automatically, rename individual plugin folders with _old until your site is restored.
Raise the PHP Memory Limit
Even if a plugin or theme is the cause of your broken website, the PHP memory limit is often the real one to blame.
What is the PHP memory limit? Your web server only has a certain amount of RAM, or memory, so WordPress sets a hard limit on how much memory a single PHP script can take up. When this limit is exceeded, you’ll encounter the white screen of death or the critical error.
While you don’t want to set the memory limit too high and allow misconfigured scripts to slow your site to a crawl, the default value may be far too low. Raising your PHP limit just a bit could instantly fix your broken website.
- Step 1: Access your site through FTP and open wp-config.php.
- Step 2: Insert the following code right before the final line and save.
define( 'WP_MEMORY_LIMIT', '128M' );
You can also try 256M if this doesn’t fix the issue, but anything higher is definitely unnecessary unless specifically called for in plugin documentation. If the issue is with the memory limit, the plugin you’re using is almost certainly broken and needs to be disabled.
A side note: Some hosts may enforce an extremely low memory limit and won’t allow you to raise it. If this is the problem, your only option is to switch to a better host or delete the plugin causing the problem.
While Kinsta does enforce a memory limit, it’s set to 256 MB. You should have no issues with legitimate working plugins on a Kinsta plan.
Raise the Max Upload File Size and Text Processing Functions
If you’re only seeing the critical error in certain situations and not constantly on every page, a small tweak to a few PHP functions might be able to fix it.
Uploading large files and finding yourself on an error screen is probably a result of the max upload file size being too small, while certain large pages breaking can be fixed by increasing recursion and backtrack limits.
First, check what your maximum upload size is and compare it to the file you’re trying to upload. You can find this by visiting Media > Add New and checking beneath the file uploader.
To fix either of these issues, you’ll need to log into FTP and edit the wp-config.php file, placing the new code right above the final comment line.
To increase the max upload file size, add this code:
ini_set('upload_max_size' , '256M' );
ini_set('post_max_size','256M');
And to fix the breaking of large pages on your site, add this code:
ini_set('pcre.recursion_limit',20000000);
ini_set('pcre.backtrack_limit',10000000);
Clear Your Site Cache
Caching is a great way to speed up your website, and most of the time it’s strictly a good thing. But sometimes the cache can get corrupted, leaving your site throwing out errors.
When this happens, a simple solution is to clear the cache, which should be all you need to get rid of the problem and restore your site to working order.
No fear: The cached version of your pages will soon be restored, allowing your site to load quickly again. Clearing the cache will simply delete the stuck corrupted files.
MyKinsta users can clear their site’s cache through their hosting dashboard. Visit Sites > Tools and then click Clear Cache.
Using a different host, or maybe a caching plugin? Check out their documentation; they should be able to give you detailed instructions.
Upgrade Your PHP Version
Outdated PHP can cause your site to break, and other conflicts are sure to occur. You usually want your site on the latest version of PHP supported by WordPress, which is currently PHP 7.3 to 8.0.
Some WordPress users prefer to stay on PHP 7.4 as they’re concerned about theme and plugin compatibility. Usually, this won’t cause problems. But if you’re using PHP 5.x, it’s imperative you upgrade as it can cause serious conflicts.
A PHP upgrade is a big deal, so make sure you have a backup ready before trying it.
Kinsta users can upgrade PHP version with MyKinsta without needing to do anything complicated. Just log in and go to Sites > Tools, then click Modify under PHP engine. Select the version you want and, after a short wait, your site will be running on the latest PHP version.
If you’re not using Kinsta, upgrading PHP will rely on your host. Contact them for help.
Check for Malware
Sometimes a critical error can be caused by malware, especially if you’re noticing strange PHP scripts that can’t be traced back to your plugins or theme. Removing malware is a tough task, more so when you’re locked out of your website and can’t even run a scan.
It can be hard to tell the difference between legitimate files and suspicious ones added by malware, and deleting random core files isn’t likely to end well. Malware can also modify PHP files, hiding scripts in them you won’t notice as malicious unless you’re a developer.
If you suspect malware is the cause, then it may be best to turn to your web host for help.
Where to Get WordPress Support If All Else Fails?
If you’ve tried all these options and nothing is working, you definitely have a real problem on your hands. But you can always turn to your web host for help identifying and fixing the issue. A good web host will provide you with the support you need to get your site up and running again.
Along with every plan, Kinsta offers live WordPress support 24/7. With our support tools integrated into your MyKinsta dashboard, getting help at any time is only a click away. Response times are fast — often less than two minutes — so you won’t be waiting around with a down site for hours or days.
So how does the scope of support compare to this particular issue? Kinsta offers technical support when errors appear on your site, including the titular critical error. We can help you identify exactly which files or plugins are causing the problem.
While you’ll need to go in and fix the issue either yourself or with the help of a developer, Kinsta support is happy to offer instructions on how to do so (for instance, how to access the file through FTP).
Every plan includes access to the same great support; there’s no priority support plan, and no special treatment given to certain customers. So if you’re stuck on a critical error and need help resolving it, turn to Kinsta support for assistance.
Summary
The WordPress critical error can have a variety of causes, though the issue often has to do with PHP. Either the PHP memory limit has been exceeded, or your plugins or themes are having issues.
The quickest way to fix the problem is to roll back your website if you have a backup, but there are a variety of other methods you can try, from raising the PHP memory limit to identifying and disabling a problem plugin.
Troubleshooting may require trying a few different things, but don’t get discouraged if you can’t fix it yourself. You can always get WordPress support from a host like Kinsta. When in doubt, turn to the experts.
And if your site is often plagued by errors, check out our guide to the 65+ most common WordPress errors.
Здравствуйте!
У меня возникли проблемы с редактированием сайта – не могу сохранять изменения на сайте, обновлять плагины и т.д.
При любом действии появляется такое сообщение:
There has been a critical error on your website. Please check your site admin email inbox for instructions.
От WordPress пришло следующее письмо, привожу только его часть:
Тема: Your Site is Experiencing a Technical Issue
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, WPGlobus.
Если нужно, я пришлю Error Details.
Я обращалась в службу поддержки WordPress, но они ничем не смогли помочь.
Пожалуйста, помогите разобраться с этой проблемой, иначе я не могу работать с сайтом.
The page I need help with: [log in to see the link]
Are you seeing the critical error on your WordPress site?
WordPress may sometimes show an error message saying, ‘There has been a critical error on this website. Please check your site admin email inbox for instructions.’ It will also include a link to the WordPress debugging guide.
In this guide, we will show you how to fix the critical error in WordPress. We will also talk about what causes this error and how to avoid it.
What Is the Critical Error in WordPress?
The critical error in WordPress is an error that stops WordPress from loading all the scripts it needs to work correctly.
Previously, this WordPress error resulted in a white screen of death or a fatal error message on the screen. Most beginners didn’t find it very helpful and struggled to resolve the issue on their own.
Since WordPress 5.2, users will now see a generic error message: ‘There has been a critical error on this website. Please check your site admin email inbox for instructions’ with a link to the WordPress debugging guide.
It will also send an email message to your WordPress site’s admin email address.
This email includes more details about the plugin or theme causing the error and a link to access your WordPress dashboard in recovery mode.
Another variant of this error will only show that your website is facing a critical error. It will not instruct you to check your email address.
This can happen because WordPress wasn’t able to load the files it needed to make the recovery mode available or to send the email.
What Causes the Critical Error in WordPress?
The critical error in WordPress is generally caused by a malfunctioning plugin, script, or code that prevents WordPress from functioning correctly.
Due to the malfunctioning code, WordPress is unable to load the files it needs.
If you recently copied and pasted code snippets from a tutorial to your website, they might trigger a critical error.
All top WordPress plugins are thoroughly tested, so they are less likely to cause a critical error. However, a conflict with another WordPress plugin or some custom code may trigger the error.
Let’s look at how to fix the critical error in WordPress and get your website back.
Fixing the Critical Error in WordPress (2 Methods)
The critical error message itself is not very useful for finding and fixing the issue’s cause. Luckily, WordPress also sends an email to the admin email address of your website.
Many WordPress websites are not configured to send emails using SMTP. Due to this reason, they may not get an email despite WordPress telling them that it has sent an email.
Similarly, some WordPress sites may only see the critical error message without instructions to check the email. That’s because WordPress wasn’t able to load files it needed to send an email or make recovery mode available.
If you are among those users, don’t worry. We will show you how to fix the critical error even without the email.
On the other hand, if you received the WordPress technical issue email notification, then we will show you how to make sense of it and use it to bring your website back.
Simply click the links below to skip straight to the section you need:
- Fixing the Critical Error With WordPress Debugging Email
- Fixing the Critical Error in WordPress Manually (Without Email)
Fixing the Critical Error With WordPress Debugging Email
First, you need to visit the inbox for your website’s WordPress administration email address.
Are you unsure which email address you used as the admin email? It is the email address you provided when installing WordPress.
If your site is on Bluehost or you used a WordPress auto-installer, your admin email address will likely be the same one you used for your WordPress hosting account.
You will see an email in your inbox with the subject line, ‘Your Site is Experiencing a Technical Issue.’ Inside it, you will find more helpful information about what caused the critical error on your WordPress website.
For instance, the following screenshot shows that the critical error was caused by the WordPress theme on our test site.
The email also includes a unique link that will allow you to log in to your WordPress website in recovery mode to investigate and fix the issue.
At the bottom of the email, you will see even more detailed information about the error, including the specific file and code that triggered it.
In the example below, some code on line 614 of our theme’s functions.php file is responsible for triggering the error.
Here is another example showing an error caused by a malfunctioning WordPress plugin.
As you can see, the message highlights the plugin name and the line of code causing the error.
Now, you just need to click on the link to WordPress recovery mode, which will take you to your WordPress admin area.
You will be asked to log in to continue.
Once you are logged in, you will see a notification telling you about the critical error, what caused it, and a link to where you can go to fix it.
For instance, in the following screenshot, WordPress is notifying us about the critical error caused by the plugin with a link to the Plugins page.
If you click the link, it will show you the problem plugin. It will also show you exactly which line of code caused the error.
You can go ahead and deactivate the plugin for now by clicking on ‘Deactivate’.
Then you can simply look for an alternative WordPress plugin or see if you can get support from the plugin developers.
Similarly, you will see a link to the Themes page if the problem lies with your theme. At the bottom of the page, it will say which theme is causing the issue.
You can change your WordPress theme. Alternatively, you can delete the broken one and reinstall a fresh copy of it from the official source to see if that resolves the issue.
Once you have addressed the issue, click on the ‘Exit Recovery Mode’ button at the top.
In most cases, your WordPress website would now start working normally.
However, if you still see the critical error in WordPress, you can try the troubleshooting steps in the next section.
Fixing the Critical Error in WordPress Manually (Without Email)
If you didn’t receive the WordPress critical issue notification email, then this method will teach you how to troubleshoot and fix the critical error in WordPress.
If the error was caused by a recent action you took, then you can undo that action to fix the issue.
For example, if you installed a new plugin and activating it caused the critical error, then you just need to deactivate it (we will show you how to do that in the first step below).
On the other hand, if you are unsure what caused the error, you can simply follow these steps.
1. Deactivate All WordPress Plugins
The easiest way to disable a faulty WordPress plugin is by deactivating it. However, due to the critical error, you won’t have access to the admin area or know which plugin to deactivate.
To address this, we will deactivate all WordPress plugins. Don’t worry, you can easily reactivate them once you get access to your WordPress admin area.
Simply connect to your WordPress website using an FTP client or the File Manager app in your web hosting control panel.
Once connected, you need to navigate to the wp-content folder.
Inside the wp-content folder, you will see a folder called ‘plugins’. You need to right-click on it and then select the ‘Rename’ option.
Next, change the ‘plugins’ folder name to anything you like. In our example, we will call it ‘plugins.deactivated’.
WordPress looks for the plugins folder to load the activated plugins on your website. When it cannot find the plugins folder, it simply cannot activate them and automatically sets them as deactivated.
You can now visit your website to see if the critical error message has disappeared.
Important: Don’t forget to rename the ‘plugins’ folder if the critical error issue has been resolved. WordPress will then recognize the folder, and you can reactivate the plugins one by one from the WordPress dashboard to identify which one caused the critical error.
For more details, see our tutorial on how to deactivate all WordPress plugins.
2. Switch to a Default Theme
The next step in troubleshooting the critical error is switching your WordPress theme to a default one. This will fix the critical error issue if some code in your current WordPress theme is causing the problem.
Simply go to the WordPress.org theme directory and download a fresh copy of a default theme like Twenty Twenty-Two or Twenty Twenty-Three.
Next, you need to unzip the theme file to your computer.
This will create a folder with the theme name on your computer.
Now, you need to connect to your WordPress site using an FTP client or the File Manager app in your hosting control panel.
Once you have connected, navigate to the /wp-content/themes folder, and you will see a list of all the themes installed on your website.
Go ahead and download all of these folders to your computer as a backup.
After that, you need to delete all the theme folders from your website.
Your WordPress site now doesn’t have a theme installed.
To fix this, upload the default theme folder you downloaded earlier.
Once this process has finished, you can try visiting your website.
If your WordPress theme caused the critical error, then the error message should have disappeared, and you will be able to access your website.
3. Reinstall WordPress
A corrupt WordPress core file or malware could also trigger a critical error in WordPress. The easiest way to fix this is by reinstalling WordPress.
Simply go to WordPress.org and download a fresh copy of WordPress to your computer.
After downloading the file, you need to unzip it to your computer. This will create a folder called ‘wordpress’, which contains all the files you need for the reinstall.
Next, connect to your WordPress site using an FTP client or the File Manager app in your hosting control panel.
Once connected, navigate to the root folder of your website. This is the folder that contains the wp-admin, wp-content, wp-includes, and wp-admin folders.
Now select the files inside the ‘wordpress’ folder on your computer and upload them to your website.
Your FTP client will ask if you want to overwrite these files or skip them. You need to select ‘Overwrite’ and check the box next to ‘Always use this action’.
Then, simply click on the ‘OK’ button to continue. Your FTP client will now replace your core WordPress files with fresh copies from your computer.
Once it has finished, you can try visiting your website to see if this resolves the error.
If the critical error was caused by a corrupt WordPress core file or malware, then the error message should disappear now.
4. Turn On Debugging in WordPress
WordPress comes with a built-in debugging system that allows you to catch errors, log them, and troubleshoot issues.
To turn it on, you need to edit the wp-config.php file. Just locate the following line:
define( 'WP_DEBUG', false );
Now, go ahead and replace this line with the following code:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', true ); define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true );
If you visit your WordPress website now, it will show you debugging information and the critical error message.
Debug mode not only shows errors but warnings and notices too. This helps you find out what is causing the problem so that you can fix it.
5. Increase PHP Memory Limit
Your web hosting server is like any other computer. It needs memory to efficiently run multiple applications at the same time.
If your server doesn’t have enough resources to run PHP, then it may crash or become unresponsive. This could trigger a critical error in WordPress.
To fix this, you can increase the PHP memory limit by telling your hosting server to use more memory for PHP.
You can do that by entering the following line into your wp-config.php file.
define( 'WP_MEMORY_LIMIT', '512M' );
Don’t forget to save and upload your changes to the server.
For more details, you can see our tutorial on how to increase PHP memory limit in WordPress.
Now, you can try visiting your website to see if this has resolved the critical error.
6. Upgrade Your PHP Version
WordPress requires PHP version 7.4 or greater. If your WordPress hosting server uses an older version of PHP, it may not work well and cause a critical error.
If you have access to the WordPress recovery mode, you can see which PHP version your site is using by visiting the Tools » Site Health page and switching to the Info tab.
From here, scroll down to the Server section and click to expand it.
There, you will see the PHP version installed on your hosting server.
If it is lower than 7.4, then you need to update the PHP version.
Most good WordPress hosting companies allow you to easily do that from your hosting account control panel. For details, please see our article on how to update your PHP version on popular WordPress hosting platforms.
We hope this article helped you troubleshoot and fix the critical error in WordPress. You may also want to see our guide on how to get a free SSL certificate for your WordPress site or our expert comparison of the best business phone services for small businesses.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Что представляет собой ошибка «The site is experiencing technical difficulties» в WordPress?
Это фатальная ошибка WordPress. Ваш сайт будет недоступен, причем и фронтенд, и бэкенд. В новых версиях WordPress эта ошибка имеет немного другой текст: «There has been a critical error on your website» («На вашем веб-сайте произошла критическая ошибка»). Во фронтенде это выглядит так:
В бэкенде:
Часто эта ошибка является следствием конфликта с плагинами или темой. Поскольку WordPress базируется на opensource-подходе, многие разработчики, имеющие разный опыт и разный стиль написания кода, создают расширения, которые пользователи могут устанавливать на свои сайты.
И часто бывает так, что плагины и темы от разных разработчиков плохо контактируют друг с другом. Когда на сайте установлены два инструмента с конфликтующим кодом, это приводит к целому ряду проблем.
В некоторых случаях оба плагина перестают работать. Бывает, что возникает ошибка, подобная следующей: «The site is experiencing technical difficulties».
Шаг 1. Проверьте свою почту на наличие уведомлений о фатальной ошибке.
WordPress отправляет администратору сайта письмо, содержащее дополнительную информацию о том, что может стать причиной ошибки:
Это письмо может включать в себя важные советы, позволяющие быстрее устранить проблему:
- Название плагинов или тем, которые привели к конфликту.
- Ссылка для перевода вашего сайта в режим восстановления (recovery mode).
Но даже и без этой информации ошибку можно устранить. При этом потребуется проверить несколько гипотез, чтобы понять, какое расширение привело к ошибке. Если у вас на сайте много плагинов, процесс может сильно затянуться.
Если вы являетесь администратором сайта, и ваше сообщение содержит дополнение «Please check your site admin email inbox for instructions», перейдите в свою почту и проверьте входящие (в том числе папку со спамом). Далее следуйте инструкциям для устранения неполадок в режиме восстановления.
Если вы не администратор, устранять проблему придется через FTP.
Шаг 2. Устраните неполадки, связанные с конфликтом плагинов или тем.
Вследствие природы фатальных ошибок в WordPress вы не сможете получить доступ к бэкенду своего сайта, чтобы деактивировать расширение, приводящее к проблеме. Потому у вас будет два варианта, как обойти это ограничение.
Разрешение конфликта в режиме восстановления
Если у вас есть доступ к ссылке на режим восстановления, то щелкните по ней. Вы перейдете к бэкенду сайта, где вам будет предложено войти в консоль WordPress с помощью ваших учетных данных:
Вам не нужен аккаунт администратора. Админ сайта вправе передавать другому пользователю ссылку на режим восстановления, и этот пользовать сможет использовать свои учетные данные для входа и устранения проблем.
Пока вы работаете в режиме восстановления, фатальная ошибка будет сохраняться для других пользователей и посетителей вашего сайта. Только пользователь, зашедший по ссылке режима восстановления, сможет получить доступ к сайту.
В режиме восстановления плагины и/или темы, которые WordPress идентифицировал как проблемные, будут приостановлены. Они будут выводиться в баннерном уведомлении сверху.
Перейдите по ссылке «Go to the plugins screen», чтобы увидеть расширения, вызвавшие конфликт:
Щелкните Deactivate под названием каждого плагина и/или темы.
Далее выберите пункт Exit Recovery Mode в админ-баре:
Проблемные расширения теперь будут деактивированы для всех пользователей, и ваш сайт снова должен стать доступным. Конечно, лучше перейти во фронтенд и проверить это лично.
Дальнейшие ваши действия:
- Удалите расширения, если они не требуются.
- Удалите конфликтующий плагин или тему, найдите альтернативу им.
- Свяжитесь с разработчиком плагина или темы и передайте ему информацию о конфликте.
- Обновите плагин или тему до новой версии.
- Отредактируйте код плагина, чтобы разрешить конфликт самостоятельно, после чего повторно его активируйте.
Вам нужно будет протестировать все потенциальные изменения и новые расширения в песочнице, прежде чем внедрять их на живой сайт.
Определяем источник проблем с помощью FTP
Если у вас нет доступа к режиму восстановления в WordPress, вы все равно можете устранить конфликт плагинов. Для этого потребуется FTP-клиент и данные для FTP-подключения. Все это можно найти в профиле вашего аккаунта на хостинге.
Зайдите на сервер с помощью FTP-клиента, используя свои данные. Перейдите к wp-content > plugins:
Здесь вы найдете подкаталоги для всех плагинов. Если вы знаете, какой из них проблемный, то щелкните по нему правой кнопкой мыши и нажмите Rename:
Измените название папки на что-то вроде «plugin-name-deactivated». В итоге WordPress не сможет найти файлы этого плагина.
Плагин будет деактивирован, и вы сможете вернуться на сайт, получив доступ к бэкенду. Далее вы уже сможете поработать над проблемным плагином по своему усмотрению.
Если вы не знаете, какой плагин вызвал фатальную ошибку, просто переименуйте первый из них в списке. Затем вернитесь на сайт, обновите его в браузере. Проблема решена? Если нет, то повторите процесс со следующим плагином. И так далее, пока ошибка не исчезнет.
Так вы найдете источник проблем. Затем вы можете удалить плагин или связаться с его разработчиком. Аналогичный процесс работает и для тем – их подкаталоги располагаются в wp-content > themes.
Шаг 3. Убедитесь в том, что вы используете поддерживаемую версию PHP.
Если ваш сайт вернулся в рабочее состояние после шага 2, то в таком случае вы можете проигнорировать все следующее. Есть вероятность, что решение конфликтов плагинов/тем не приведет к исчезновению ошибки.
Если это так, то ваш следующий шаг – определить, использует ли ваш сайт поддерживаемую версию PHP. Начиная с релиза WordPress 5.0, платформа перестала поддерживать версии PHP до 5.6.20.
Кроме того, сами разработчики PHP больше не поддерживают версии до 7.4.
Версию PHP можно узнать, зайдя в аккаунт своего хостинга.
Если вы используете устаревшую версию PHP, вам нужно обновить ее.
Мы рекомендуем использовать последнюю доступную версию PHP как по соображениям безопасности, так и по соображениям производительности. После обновления PHP вернитесь на сайт и проверьте, пропала ли фатальная ошибка.
Шаг 4. Включите режим отладки WordPress.
Если вы все еще видите сообщение ошибки, то вы можете попытаться диагностировать проблему с помощью режима отладки в WordPress.
Чтобы включить режим отладки, вам нужно открыть файл wp-config.php через FTP и добавить в него следующую строку над «That’s all, stop editing! Happy publishing»:
define( 'WP_DEBUG', true );
Сохраните файл и вернитесь к своему сайту. Обновите страницу в браузере. Посмотрите сообщения об ошибках, отображаемые в режиме отладки. Далее идентифицируйте сообщения, связанные с фатальной ошибкой, после чего выполните шаги по устранению неполадок.
Важно отметить, что режим отладки не должен быть включен перманентно. Его надо использовать только с целью отлова ошибок, поскольку он делает доступной вашу конфиденциальную информацию.
Чтобы отключить режим отладки, поменяйте true на false для WP_DEBUG.
Шаг 5. Посмотрите серверный журнал ошибок.
Если в режиме отладки ошибок не появилось, посмотрите серверный журнал ошибок. К нему должен быть доступ через аккаунт вашего хостинга.
Шаг 6. Свяжитесь с вашим хостингом.
Если вы выполнили все шаги, перечисленные выше, но до сих пор ошибка осталась, вам в таком случае следует связаться с вашим хостингом. Возможно, проблема связана с вашим сервером, а здесь уже не получится ничего сделать самому.
52 просмотров
Отказ от ответственности: Вся размещенная информация была взята из открытых источников и представлена исключительно в ознакомительных целях а также не несет призыва к действию. Создано лишь в образовательных и развлекательных целях. | Так же, если вы являетесь правообладателем размещенного на страницах портала материала, просьба написать нам через контактную форму жалобу на удаление определенной страницы, а также ознакомиться с инструкцией для правообладателей материалов. Спасибо за понимание.
Если вам понравились материалы сайта, вы можете поддержать проект финансово, переведя некоторую сумму с банковской карты, счёта мобильного телефона или из кошелька ЮMoney.
Table of Contents [TOC]
- “There Has Been a Critical Error on Your Website” Error
- What does this WordPress critical error mean?
- What Causes “There has been a critical error on your website.” in WordPress?
- How to Debug & Fix Critical Error in WordPress?
- Enable debug mode in WordPress
- Check logs
- Upgrade PHP to 7.4 Or Greater
- Check your PHP version
- Troubleshoot Theme Conflict Issues
- Troubleshoot Plugin Conflict Issues
- Fix faulty custom codes
- Need help from WordPress Expert?
If you encounter a “Critical Error” message on your website, it usually means that there is a problem with the WordPress core, a theme or plugin update, or a server issue. To fix this error, you can try disabling your plugins or switching to a default WordPress theme to see if the issue resolves. If this doesn’t work, you can try increasing your website’s memory limit or contacting your web host for assistance. Additionally, you can check the error logs to get more information about the specific problem and how to fix it. Overall, the article provides useful tips on how to troubleshoot and resolve critical errors on your WordPress website.
There are various other versions of this error that comes up depending on what kind of changes you are doing:
- wordpress critical error after php update
- there has been a critical error on this website. wordpress install
- there has been a critical error on this website. wordpress fix
- there has been a critical error on your website. wordpress godaddy
- wordpress critical error can’t login
- wordpress critical error php 8
- wordpress ” there has been a critical error on this website
- wordpress recovery mode
- critical error when activating woocommerce
If you have come this far it is because you were manipulating your WordPress as administrator and suddenly a message has appeared on the screen indicating that the site has technical problems.
Since WordPress version 5, thanks to the debugging mode, a message appears on the screen indicating that the site has technical problems. Here we see how to fix it.
There are a lot of common wordpress errors that you can encounter, like 500 internal server error, 504 Gateway Timeout error, 404 Page Not Found , 405 Method Not Allowed Error , WordPress File And Folder Permissions Error, Error Establishing a Database Connection in WordPress, White Screen of Death (WSOD) Error and many more. We have covered all these in depth.
What does this WordPress critical error mean?
Between WordPress 5.2 and WordPress 5.3, we used to get the error message, “The site is experiencing technical difficulties.” But with the latest release of WordPress 5.4, WordPress developers have changed the message you receive. The developer has replaced the error message with There has been a critical error on your website.
What Causes “There has been a critical error on your website.” in WordPress?
WordPress 5.2 has a built-in feature that detects when a plugin or theme causes a fatal error on your site. it notifies you with this automated email. ”So it is clear that these types of problems generate PHP FATAL errors. FATAL errors occur when PHP stops working and requires you to troubleshoot issues before you can complete the process.
There are quite a few reasons you may experience critical error in WordPress, so try to remember what was your last action was.
- Did you install or delete a plugin?
- Did you activate or deactivate a plugin?
- Did you upload, activate or deactivate a new theme?
- Did you make any changes to your web hosting?
- Did you update anything through FTP?
- Did you update your PHP version?
When we have a website with WordPress and some of the plugins that we have active require the use of a lot of memory, or if the website has many concurrent visits, a high PHP memory consumption can occur. If the memory needs exceed the established limits, the error will occur on the web:
The “There Has Been a Critical Error on Your Website” error appears when there is an issue with your WordPress website and it cannot be fixed.
This error can occur if:
- Your web host has provided an incorrect username and password for your WordPress site.
- The system administrator has deleted the wp-config.php file from your server’s /wp-content/ folder.
- A hacker has hacked into your server, stealing valuable information or disabling important features like comments, pingbacks, RSS feeds or login security.
- Forgotten to update your WordPress installation before moving to a new server or domain name.
There are many other possible causes for the “There Has Been a Critical Error on Your Website” error.
The most common cause is due to a security issue or a virus on your website. Checking for malware can help you find out whether there is an infection on your site. In case a malware is found, we also have a post on how to remove malware from wordpress website here.
Step 1: Access your WordPress site by logging into it and clicking Maintenance > Web Hosting Manager.
Step 2: Run your website through a malware scanner. Scan your website using WP HACKED HELP Free WordPress malware scanner online. We have also listed many other WordPress security scanners here.
Step 3: Follow the instructions displayed in the pop-up window to check for malware on your site.
Step 4: If there are any viruses found, remove them immediately using an antivirus software application.
With a FATAL error, your request cannot be completed. Instead of showing broken pages with multiple errors, WordPress now displays a decent post. That’s it.
To debug the actual error that occurs and the reason, it will be necessary to activate the debug mode in WordPress. Next, we explain how to do it.
How to Debug & Fix Critical Error in WordPress?
Enable debug mode in WordPress
Check logs
Login to your site using FTP and check the error logs. If that doesn’t help, try enabling debug mode.
There are several options to activate debug mode in WordPress. One of the fastest and most efficient is to modify the wp-config.php file that will be at the root of our website. We will edit it and add the following lines (at the end, for example):
To do this login to your site using FTP and open the wp-config.php file from WordPress root folder in a text editor. Find the following lines.
PHP
define('WP_DEBUG', true); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); define('WP_DEBUG', true); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
define( 'WP_DEBUG', false ); define( 'WP_DEBUG_DISPLAY', false ); define( 'SCRIPT_DEBUG', false ); define( 'WP_DEBUG_LOG', false );
Change the false values to true and save. Now when you refresh your site, you may see other errors that may give you a better understanding of where the error is coming from. You can also check the debug logs via FTP. Make sure to turn these back to false once you’re done.
The file may already contain some of these lines, if so we will check that it is the same and we will leave one of them. We will save the changes in the wp-config.php file and, from now on, WordPress will write any warning, notice or error that occurs on our website in the file:
/www/wp-content/debug.log
With the previous lines we tell WordPress to save the possible errors that may occur in the debug.log file and NOT to show them on the screen.
This is highly recommended so as not to display sensitive information to the user who navigates to our website. Obviously, if we are developing the web and it has not yet been published, we can change the lines:
PHP
define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); 1 2 define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
For:
PHP
define( 'WP_DEBUG_DISPLAY', true ); @ini_set( 'display_errors', 1 ); 1 2 define( 'WP_DEBUG_DISPLAY', true ); @ini_set( 'display_errors', 1 );
This way it would show the errors on screen as well.
Consult the log file and analyze possible errors in WordPress
Once we have activated the debug mode, we can download or read the file directly:
/www/wp-content/debug.log
Which will have content similar to the following:
Depending on the log level, it will show us the Warnings, the Notices or the errors or all of them. In our case, it will show us all the log levels. We will mainly focus on the lines that start with “PHP Fatal error” or “Error”. And above all the “PHP Fatal error”, which are those that can cause the web to not be shown to the user.
There are other levels of error, but these are the most important. Now let’s learn how to solve it by upgrading your version of PHP.
Upgrade PHP to 7.4 Or Greater
WordPress is built with PHP and your hosting company sets its version.
Before you start updating your version of PHP, we strongly recommend that you make a backup of your site and the database. In case something goes wrong, you can restore your site from the backup.
Just like updating your WordPress plugins and theme, it’s also important to update your WordPress PHP to the latest version. There are mainly two reasons why you need to update your version of PHP:
Your WordPress site will be faster: The new version of PHP (currently 7.4) is more efficient. You can increase the performance of your site up to 3 or 4 times faster.
Your site will be more secure: WordPress is the most popular CMS and built with PHP. Hence, it becomes easy for hackers to hack a wordpress site. By updating your PHP, you will have the latest security features, which are missing from the previous version of PHP. Therefore, it is very important to update your PHP to the latest version.
Check your PHP version
To check your current PHP version you can create a new file let’s say serverinfo.php. Now edit this file and add the following code in the file. After that run file it will give you all information about the system your server is running.
Troubleshoot Theme Conflict Issues
To do this, simply activate a default theme, such as Twenty Twenty or greater.
Unfortunately, because your site displays an error, you will have to troubleshoot issues with your host’s file manager (like cPanel file manager) or use FTP or sFTP (it’s like the secure version of FTP).
It is important to note that by changing the theme, you will not lose the settings of the chosen theme.
To do this, rename your active theme folder by adding DISABLE or DISABLED at the end of the folder name. For example, if you are using Twenty Nineteen and the folder is “twentynineteen “, you would call it “twentynineteenDISABLE” or “twentynineteenOLD”. Come back to the top of your site and refresh.
The goal is to see if the error goes away. In case it doesn’t, it’s anything but a topic. Try to rename the organizer to their unique name when you have completed your survey.
Troubleshoot Plugin Conflict Issues
If that’s not the theme, it could be a problem with the plugin. In some ways, the troubleshooting is similar. However, it is much easier to rename the plug-in folder to “pluginsOFF”. Visit the site and log in. This will close all plugins. Note that this will not remove the original settings for these plugins, as they will be there when you re-enable them later.
Once the plug-ins are disabled, go back and rename the folder to “plug-in”. Go to your WordPress admin area and re-enable each one, one by one, until you see the screen saying “There has been a critical error on your website”.
When you’ve discovered the problem, you probably need to restore the object or module that caused it. You can do this in several ways.
Download the original plugin files directly from the WordPress plugin directory and replace the plugin via File manager by your host (or cPanel) or via FTP or sFTP.
Use the WP Rollback plugin to restore the plugin to the previous version.
If you are using WP Rollback, there are several versions to choose from. It will tell you which version you have. Below you can follow the images to get a feel for how to use WP Rollback.
If you are using WP Rollback, there are several versions to choose from. It will tell you which version you have. Below you can follow the images to get a feel for how to use WP Rollback.
Choose the plug-in to restore. Click on “Rollback” if it is available in the plugins listed in your WordPress administrator.
Fix faulty custom codes
If none of the above worked, we will assume that neither the plugins nor the themes are the culprits, and the next thing to do would be to check if any of your custom codes have any incompatibility with the current version of WordPress, theme, plugins or PHP.
To fix this, simply delete the custom codes from the theme’s functions.php file or where you add them and check if there are no more critical WordPress errors.
If the critical errors are fixed then you already know that the culprit is…
- Your custom code.
- …Or the version of PHP, due to compatibility problems between the two.
Seeing a critical WordPress bug may seem worrisome, but at least now it alerts you, and even offers you a link to learn how to debug WordPress errors like syntax error.
In addition, your WordPress site will send you an email with instructions, and sometimes it will even activate the WordPress recovery mode.
If you don’t receive the email from WP, you can look at the server logs and get the entry related to this issue?
It can also help you find the solution. You can access the error log via FTP or cPanel by going to the root directory of the WordPress installation.
You can also talk to your hosting provider to find out the location where the error logs are kept as different for each host.
Need help from WordPress Expert?
No technical knowledge? We can fix There has been a critical error on your website for you? Contact Us right now and get your wordpress issues fixed instantly.
This post was last modified on February 22, 2023