Port to the world of technology

How to Fix “The site is experiencing technical difficulties” In WordPress

0 2

Hello! Today I am going to help you with another error in WordPress. If you are a WordPress user you might have experienced this one, especially after you have updated something on your WordPress. The error message says “The site is experiencing technical difficulties”. That is the only thing you can see. It is very difficult to find the cause and to think about the next step.
But there is a way that you can get a clue about the error. If you have updated WordPress to 5.2+, there is a clue hidden in the error. Because WordPress 5.2 introduced a new alert system to PHP errors to prevent displaying an empty page (known as WSoD: The White Screen of Death). So the latest version will display two new messages.

  • “The site is experiencing technical difficulties” This will only be displayed in public pages.
  • “The site is experiencing technical difficulties. Please check your site admin email box for instructions”. This error shows up when you attempt to go to a wp-admin page.

So, in this post I will bring you some solution to fix the “The site is experiencing technical difficulties” error. Keep reading!

What is the meaning of this error?

Actually this error message is just a generic error. But can indicate various things. Often there is a simple solution.
As I mentioned previously, WordPress 5.2 and above will display this when there is a problem with invalid PHP code. The troublemaker is either a theme or a plugin update, or a core WordPress update even.
In unusual cases the error message will show up when there is nothing wrong, the site is just under an automatic update. An error message will disappear once the update is finished. The “The site is experiencing technical difficulties” error will show up instead of “Briefly unavailable for scheduled maintenance. Check back in a minute”. If the error remains for longer than 10 minutes, there is a real problem somewhere. So let’s dig into that!

How to fix “The site is experiencing technical difficulties”

Let’s start with the simplest method. That is putting WordPress in debug mode. Debug mode will allow WordPress to display any PHP errors that happen when you attempt to enter your site. And also you can set debug mode to make a log file that you can look at, while avoiding the error from being displayed publicly.

Debug mode

In the beginning you have to find the wp-config.php file. With the help of cPanel there are two ways to find that out. You can go through File Manager or else you can FTP into the server directly. The file will be in your root WordPress directory.
Then follow these steps.

    • First you need to set up debug mode to create a private log file. For that you have to enter the following code. You can add it wherever above /*That’s all, stop editing! Happy blogging.*/
      define('WP_DEBUG', true);
      define('WP_DEBUG_LOG', true);
      define( 'WP_DEBUG_DISPLAY', false );
    • After entering the code, click save and refresh a page of your site.
    • Then go to the /wp-content/ folder in File Manager or FTP to see the file log.
    • In there look for a line with ‘PHP Fatal error..’ An example is given below.
      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 clearly in the example, it shows you the path where the website issue is. It displays even the file name and name of the plugin causing the problem. You just have to read it carefully to find out the exact troublemaker theme or plugin. Furthermore you will be able to identify whether the issue was a plugin, a theme, or WordPress core issue.
    • Similarly you can delete the troublemaker theme or plugin and that’s it!
    • Now the only thing you have to do is report the error to the creators of the theme or plugin.

I know that you could always attempt to fix it yourself based on the error message. But make sure to backup your site before trying to do so.
Once you are finished, remove the code lines that you have added to the wp-config.php file and save.

Solve theme conflicts

To find out whether the troublemaker is a theme, first you have to find out what is your theme. Look for it in your file manager or FTP program. Then click wp-content and then find your theme. After that rename your current theme. And see whether the wp-admin starts functioning again. If it works, the troublemaker is the theme. So contact the author and inform about the bug. They will help you.
If the error persists even after renaming the theme. The troublemaker is something else. So change the name of the theme back to its original one.

Solve plugin conflicts

If you can’t enter into the WordPress admin area, enter the public_html directory with your File Manager or FTP. Then go to wp-content > plugins. After that rename the plugin folder and reload the site. If the error is gone, the troublemaker is one of the plugins. If so you can change the name of your plugins folder back to its original.
Then you have to change plugin names one by one to see what is causing the issue. Once you find that, just delete that plugin straight away.

Upgrade your PHP to its latest

An older version of PHP is another cause for this error. You might see the error as your PHP version doesn’t support WordPress anymore. Only 5.6 and above versions are functioning now.
You might experience the error ” The site is experiencing technical difficulties” even if you are using PHP 5.6. So we strongly recommend you to upgrade your PHP to 7+.
And use PHP compatibility checker to confirm that your current theme and plugins work with the latest PHP version.

Winding-up

So, in this post we told you about four possible ways to solve the “The site is experiencing technical difficulties” issue. If you attempted the first option and you couldn’t find out what is wrong, just undo what you did and then move to the second option.
It is very important to undo the changes if you couldn’t solve the error using that method. Or else you will be adding more and more problems to your existing one! 🙂 🙂 

Leave A Reply

Your email address will not be published.