Stuck with the WordPress error “The site is experiencing technical difficulties”? We can help you.
We can all agree that this WordPress error is really frustrating. Vague alerts that give little indication as to what is causing the problem can be hard to fix.
As part of our Server Management Services, we assist our customers with several WordPress queries.
Today, let us see how to effectively resolve this error.
WordPress error “The site is experiencing technical difficulties”
Introduction of a fatal error protection feature in WordPress 5.2 displays an error message stating:
This error message can appear in two ways:
“The site is experiencing technical difficulties.”
This error, however, occurs only for public pages.
“The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
On the other hand, this happens when we try to go to a page in the WordPress admin panel.
In newer WordPress versions, the variation of this error reads:
“There has been a critical error on your website”.
This appears on the front end of the site.
“There has been a critical error on your website. Please check your site admin email inbox for instructions.”
An this appears on the backend.
WordPress will then sends an email to the admin email address. It contains a link to access the backend and attempt to fix the error.
If we do not have access to the admin email or cannot get WordPress emails, it is difficult to find out the error.
Mostly, it is simply a generic error. It does not imply that the site is deleted or completely broken.
If there is an invalid PHP code, WordPress 5.2 and above will show this error.
A likely culprit is either a theme or a plugin update, or perhaps even a core WordPress update. We may also come across this error in the process of an automatic update. It will show until the update is complete.
How to fix this error?
First and foremost, we can ensure that our WordPress admin email address is correct and we receive notification emails.
-
Debug mode
With Debug mode, WordPress will display any PHP errors it encounters whenever we try to access the site.
In addition, we can set it to produce a log file to look at while preventing the error from being shown publicly.
Initially, we need to find the wp-config.php file. It will be in the root WordPress directory.
With cPanel, to do this, we can go through File Manager, or we can FTP into the server directly.
- To create a private log file, we need to add the following code. We 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 done, hit save and then refresh a page on the site.
- Then we go to the /wp-content/ folder in File Manager or FTP to see the file log.
What we are searching for is a line reading ‘PHP Fatal Error:’.
For example,
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
This shows the path along with the file name and name of the plugin causing the issue.
Hence, we will know whether the problem was a plugin, theme, or WordPress core issue. Once we know, we can delete those and the site will be back in action.
Then, we inform the creator of the theme or plugin regarding the problem to fix the bug. Before proceeding with the troubleshooting, ensure to back up the site files first.
Once done, take out the code lines we added to the wp-config.php file and save.
-
Solve theme conflicts
To check this, initially, we need to find the theme in File Manager or FTP program.
- Click wp-content and then find the theme.
- Rename the active theme. Then we check if wp-admin starts working again. If it does, the issue was with the theme.
- In such a case, inform the author about the bug. They can help us solve.
- If nothing changes, we change the theme back to its original name. The problem was not caused by our theme.
-
Solve plugin conflicts
- If we fail to get into the WordPress admin section, we access the public_html directory with File Manager or FTP.
- Navigate to wp-content, then plugins, and rename the plugins folder.
- Afterward, if the site reloads, the problem was one of the plugins.
- If so, we can change the name of the plugins folder back.
- Now, change each plugin name to another and back one at a time to see which causes the problem.
- Once found, delete the culprit.
-
Upgrade version of PHP
The issue can also be because we have not switched to the newest PHP.
Recently, one of our customers came across a PHP fatal error because the version was not supported by WordPress anymore.
Make note that any version of PHP less than 5.6 does not work anymore.
Even if we run PHP 5.6, we might encounter the error. So, to avoid it in the future, our Support Techs advise updating PHP to 7+.
[Stuck with the error still? We are here for you]
Conclusion
In short, though mostly a generic error, it can also occur due to other reasons. Today, we saw how we can fix them.
0 Comments