Are you encountering the message "This site is experiencing technical difficulties" or "There has been a critical error on your site"? These fatal errors, often caused by issues with a plugin or theme, can take your WordPress site down. Fortunately, fixing this error on your 10Web-hosted websites is straightforward by identifying the cause and resolving the conflict. Here's how to do it.
1. Check your admin email for error details
When your website encounters a fatal error, WordPress may send an email to the site administrator, outlining the cause. This email typically includes:
- The name of the plugin or theme causing the issue.
- A link to enter Recovery Mode, which allows you to log in and fix the problem from the WordPress dashboard.
Be sure to check your spam folder if you don’t see the email in your inbox.
If you receive a recovery link, click it to access your site in recovery mode. You can deactivate the conflicting plugin or theme directly from the dashboard. If no email is received, follow the manual troubleshooting steps below.
2. Identify the problematic plugin or theme using error logs
If recovery mode isn't available, you can manually find the source of the problem by checking the error logs. Here’s how to do that from your 10Web dashboard:
- Log in to your 10Web dashboard and select the website experiencing the error.
- Go to Hosting Services > Logs.
- In the drop-down menu, select PHP-FPM.LOG.
- Look for lines that start with PHP Fatal Error. These lines often contain the name of the plugin or theme causing the issue, with a file path like:
- wp-content/plugins/[plugin-name]
- wp-content/themes/[theme-name]
Once you've identified the faulty plugin or theme, you can proceed to deactivate it using SFTP.
Note:
If the error is due to a low memory limit, you may see a fatal error in the logs similar to: "Allowed memory size of X bytes exhausted (tried to allocate X bytes) in /path/to/script." To resolve this, you can increase the memory limit by navigating to Hosting Services > Tools > Advanced settings in your 10Web dashboard.
3. Disable the conflicting plugin or theme via SFTP
To deactivate the problematic plugin or theme, use an FTP client like FileZilla. Here's how:
- Open FileZilla and log in using your SFTP credentials, which you can find in the 10Web dashboard under Hosting Services > Credentials. Details can be found here.
- In FileZilla, navigate to /home/wplive/web/wp-live/wp-content/.
- Open the plugins or themes folder, depending on what's causing the issue.
- Find the folder for the problematic plugin or theme, right-click, and select Rename.
- For example, rename plugin-name to plugin-name-deactivated.
- After renaming, the plugin or theme will be deactivated, and you should be able to access your website normally.
4. Ensure your PHP version is compatible with your plugin or theme
Sometimes, the error occurs because your plugin or theme isn't compatible with the version of PHP you're using. While 10Web uses a minimum of PHP 7.4, some older plugins or themes may not fully support newer versions like PHP 8.0 or 8.1.
To check if your PHP version is causing the issue:
- In your 10Web dashboard, go to Hosting Services > Tools.
- Check the PHP Version currently set for your website.
- If your site is running a newer version like PHP 8.0 or above, try switching to PHP 7.4:
- Select the PHP Version drop-down menu and change it to 7.4.
- After updating the PHP version, refresh your website to see if the error is resolved.
If downgrading to PHP 7.4 fixes the issue, it’s likely that the plugin or theme isn’t compatible with newer PHP versions. Contact the developer for an update, or consider replacing it with a more compatible tool.
5. Enable WordPress debug mode
If the issue persists, enabling WordPress Debug Mode can help reveal additional details about the error. To enable it:
- Use your FTP client to access the wp-config.php file, located in the root directory of your WordPress installation.
- Add the following line of code just before the line that says "That’s all, stop editing!":
define('WP_DEBUG', true); - Save the file and refresh your website to view detailed error messages.
After troubleshooting, disable debug mode by changing true to false in the WP_DEBUG line.
6. Contact the plugin or theme’s support
After identifying and disabling the problematic plugin or theme, reach out to the developer’s support team. Provide them with the PHP error details from your logs so they can help resolve the conflict. You can also:
- Delete the plugin or theme if it's not essential.
- Replace the conflicting tool with a more updated alternative.
7. Contact 10Web support
If the error persists after trying all the steps, the problem might be server-related. Contact 10Web support for further assistance, and they will help investigate and resolve any hosting-related issues that could be causing the error.
By following these steps, you can resolve the "This site is experiencing technical difficulties" error and get your website back online. Whether it's disabling a problematic plugin, adjusting your PHP version, or enabling debug mode, 10Web makes troubleshooting straightforward and efficient.