You’ve just updated something on your WordPress site when something goes horribly wrong. The error message displays, “The site is experiencing technical difficulties.”
Your heart sinks. This WordPress error is uninformative, unimaginative. With no idea how to fix it or what you did wrong, it’s hard to know what step to take next.
Luckily, if you’ve updated your WordPress to 5.2+, there’s a clue hidden in the error. WordPress 5.2 introduced a new way to alert you to PHP errors that would otherwise result in your site displaying a blank page (also known as WSoD: The White Screen of Death).
Instead of the WSoD occurring after a fatal PHP error, there are now two new messages, namely:
- “The site is experiencing technical difficulties.” This one occurs for public pages only.
- “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.” This one happens when you try to go to a wp-admin page.
In this article by our team at wpDataTables, we’ll walk you through how you can fix the “The site is experiencing technical difficulties” error all by yourself. Read on to save your site from unnecessary downtime.
What’s the meaning of this error?
The “the site is experiencing technical difficulties” WordPress error message is simply a generic error that could mean many things. Don’t worry, it doesn’t mean that your site has been deleted or is completely broken. There is usually an easy solution.
As mentioned, WordPress 5.2 and above will typically show this error when there is a problem with invalid PHP code. A likely culprit is either a theme or a plugin update, or perhaps even a core WordPress update.
In rare cases, the error message will show when there’s actually nothing wrong — instead, your website is simply in the process of an automatic update. The error message will show until the update is completed. This can happen even though the message you’re supposed to receive is “Briefly unavailable for scheduled maintenance. Check back in a minute.”
If the error persists for longer than, say, 10 minutes, then you can be sure that there’s a real problem somewhere. Let’s investigate and solve this!
How to fix “The site is experiencing technical difficulties.”
The easiest way to start out is to put WordPress in debug mode. This will make WordPress display any PHP errors it encounters whenever you try to access your site. You can also set debug mode to produce a log file you can look at while preventing the error from being shown publicly.
First, you will need to find the wp-config.php file. With cPanel, you can go through File Manager to do this, or you can FTP into your server directly. The file should be in your root WordPress directory.
- To set up debug mode to create a private log file, you’ll need to add the following code. You can add it anywhere above /* That’s all, stop editing! Happy blogging. */
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define( 'WP_DEBUG_DISPLAY', false );
- Once you’ve added the above lines, hit save and then refresh a page on your site.
- Go to the /wp-content/ folder in File Manager or FTP to see the file log.
- What you’re searching for is a line reading ‘PHP Fatal Error:’.
PHP Fatal error: Cannot redeclarebp_members_screen_display_profile() (previously declared in /.../buddypress/bp-members/screens/profile.php:22) in /.../buddypress/bp-members/screens/profile.php on line 32
As you can see, it shows the path where the website issue lies. It even shows the file name and name of the plugin causing the issue. Read carefully to figure out exactly which theme or plugin caused the problem.
This way, you’ll know whether the problem was a plugin, theme, or WordPress core issue.
Once you know, you can delete the theme or plugin that’s causing the problem and voila, your site should be back in action!
Now you should get in touch with the creator of the theme or plugin to tell them you had this problem so they can fix the bug. Of course, you could always try to fix it yourself based on the error message, but if you do try to do so, remember to back up your site files first.
After you’ve finished, take out the code lines you added to your wp-config.php file and save.
Solve theme conflicts
- To check if the problem was with a theme, you need to find your theme in your File Manager or FTP program. Click wp-content and then find your theme.
- Rename your active theme. You can then check if wp-admin starts working again. If it does, the issue was caused by your theme.
- If the issue was your theme, contact the author to let them know about the bug. They can help you solve the problem.
- If nothing changes, change your theme back to its original name. The problem was not caused by your theme.
Solve plugin conflicts
- If you can’t get into the WordPress admin section, access the public_html directory with your File Manager or FTP.
- Navigate to wp-content, then plugins, and rename the plugins folder. Afterward, reload your site. If that works, the problem was one of your plugins.
- If indeed the issue was caused by a plugin you can change the name of your plugins folder back.
- Now, start changing each plugin name to another name and back one at a time to see which was causing a problem. When you figure it out, delete the culprit.
Upgrade your version of PHP
- The issue might be because you haven’t switched to the newest PHP. You might see a PHP fatal error because your version isn’t supported by WordPress anymore. Any version of PHP less than 5.6 doesn’t work anymore.
- Even if you’re running PHP 5.6, you might encounter the “The site is experiencing technical difficulties” error, so to avoid the error in the future, it’s advised that you update your PHP to 7+.
- To make sure that your theme and plugin work with the latest PHP version, use the PHP Compatibility Checker.
Ending thoughts on how to fix the “The site is experiencing technical difficulties” error
- In this article, we’ve covered 4 possible ways to fix the “The site is experiencing technical difficulties” error message. If you tried the first method and you couldn’t figure out what’s wrong with the debug messages, undo what you did and try to solve the plugin or theme conflicts with troubleshooting.
- It’s important to always undo the changes you’ve made if you were unsuccessful in solving the error. Otherwise, you might end up with more problems down the line.
If you enjoyed reading this article about how to fix the “The site is experiencing technical difficulties”error, you should read these as well:
- WordPress user roles: What they are and how to edit them
- 504 error in WordPress: How to fix it
- How to Leverage Browser Caching in WordPress? Steps to Follow