Support Documentation
- Troubleshooting FAQ https://wordpress.org/documentation/article/faq-troubleshooting/
- Common WordPress errors https://developer.wordpress.org/advanced-administration/wordpress/common-errors/
Transcript
In this lesson, we’ll learn how to troubleshoot common issues on your WordPress site and walk you through the steps to diagnose and fix problems, ensuring your site runs smoothly. We’ll cover topics such as the “White Screen of Death” and other issues, various troubleshooting methods, how to deactivate plugins, and how to use the Health Check and Troubleshooting plugin.
White Screen of Death and Other Issues
The White Screen of Death (WSOD) is a common issue in WordPress where your site displays a blank white screen, making it inaccessible. Other issues like critical error messages can also appear on the site. This can happen on the front end, back end, or both.
The most common causes are:
- Exhausted memory limit
- PHP errors
- Database issues
- And lastly, plugin or theme conflicts or compatibility issues, which we’ll focus on in this lesson.
Plugins and theme conflicts can stem from several issues, including code incompatibility, where plugins or themes clash with the current WordPress version; JavaScript errors that disrupt page loading; and deprecated functions that use outdated WordPress features.
Troubleshooting steps
Approach the issue methodically
When an issue arises, it’s crucial to remain calm and approach the problem systematically. Below are several troubleshooting methods that can help resolve conflicts.
Create a site backup
Before making changes to the site, make a full backup first. https://learn.wordpress.org/lesson-plan/backing-up-your-wordpress-site/
Most hosting providers back up their entire server, including your site. Reach out to your host to learn about the backup services they offer.
You can also create a backup of your site by using an FTP client to transfer the files to a folder on your computer. After that, you can compress them to a zip file to save space, making it easier to store multiple versions.
Create a development or staging site
A WordPress development or staging site is a clone of your live site. It’s the best practice for safe web management. This is where you can safely test updates and plugins, allowing you to troubleshoot issues and make changes in a controlled environment without risking the functionalities of your live site. This avoids downtime or errors ensuring a smooth experience for your visitors.
To create one, you can either:
- Use a staging plugin https://wordpress.org/plugins/search/staging/
- Check if your hosting provider offers a feature to easily create a staging site
- Or create a manual setup by copying your WordPress files and database to a local site using Studio, DevKinsta or WordPress Playground.
Use error logs
Use error logs to identify errors on the site where you can pinpoint the source of the issue, like problematic plugins, themes or scripts. There are a couple of ways to enable error logging:
- Install a Debugging Plugin
Use a debugging plugin to activate debugging mode and display error logs without the need to edit any files. - If you’re comfortable with file editing, access your wp-config.php file. The wp-config.php file is like a control center for your website that has important settings that tell WordPress how to connect to the database and how the site should behave.
To get there:
- Log in to your web hosting account (cPanel, or another hosting dashboard).
- Once inside the hosting control panel, open the File Manager tool.
- In the File Manager, go to public_html or www, which is the root directory of your WordPress dashboard.
- Inside the root directory, find the wp-config.php file, which contains your WordPress configuration settings.
- Right click wp-config.php and choose Edit to make changes.
- Once you’re in, under the Codex Debugging link
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
add these lines to enable debugging and error logging to the wp-content/debug.log file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
- Save the file after adding the lines.
- Visit your site to check if everything is functioning correctly.
- Once the issues are resolved, disable debugging by changing the lines you added in WP_DEBUG from true to false:
define( 'WP_DEBUG', false );
Check for theme issues
If your WordPress dashboard is accessible, change your current theme to a default WordPress theme like Twenty Twenty-four.
If your WordPress dashboard is not accessible, access via FTP https://developer.wordpress.org/advanced-administration/upgrade/ftp/ or File Manager to rename the active theme folder to deactivate it automatically, which allows you to switch themes without using the WordPress dashboard.
To access FTP:
- Get your FTP credentials from your hosting provider like the username, password and host address.
- Download an FTP client like FileZilla, Cyberduck or WinSCP.
- Open the FTP client and enter the FTP details.
- Connect to the Server by clicking ‘Connect’.
- In the FTP client, go to your specific WordPress installation directory like public_html.
- Open the wp-content folder and open the ‘themes’ folder to view your installed themes.
6.1 Find the current active theme folder and right click on the folder and choose the option to rename it (for example: add “-old” at the end of the folder name like active-theme-name-old).
If switching to a different theme resolves the issue, your dashboard should become accessible again, allowing you to activate another theme if you’d like. You can also reactivate the previous theme to see if the error reoccurs. If you wish to continue using the theme that caused issues on your site, refer to the theme’s documentation or reach out through their support forum for assistance.
Check for plugin issues
Plugins add functionality to your WordPress site but can sometimes cause conflicts or issues. The automatic rollback feature restores the previously installed version of a plugin if an update fails, helping to maintain site stability and ensure smooth functionality. However, this feature only applies during plugin updates. If a plugin that’s already installed causes conflicts or crashes your site without an update, the rollback feature won’t resolve the issue.
Steps to deactivate plugins if your WordPress dashboard is accessible:
- Go to Plugins > Installed Plugins
- Next to the label ‘Plugin’, tick the checkbox to select all the plugins
- Click Bulk Actions and select ‘Deactivate’, then ‘Apply’.
In the Installed Plugins section, reactivate plugins one at a time, while checking your site after each activation. When the error reappears on your page with a particular plugin enabled, make a note of it. If you no longer need the plugin, you can delete it. If it’s still necessary, check the plugin documentation page or support forum for assistance.
Steps to deactivate plugins if your WordPress dashboard is not accessible:
- Access via FTP https://developer.wordpress.org/advanced-administration/upgrade/ftp/filezilla/ or File Manager
- Locate the folder wp-content/plugins
- Right-click on the folder of the plugin causing an issue, and select the option to rename it. For example: add “-old” at the end of the folder name like plugin-name-old). Once renamed, the plugin will be deactivated automatically.
If the plugin causing the issue was deactivated, the dashboard should become accessible again. From the dashboard, Plugins > Installed Plugins, you can reactivate the plugins one at a time to confirm that the plugin enabled makes the error reappear. Reactivating the problematic plugin will make you lose access to the dashboard. If that happens, deactivate or delete the plugin via FTP, if you no longer need it, or contact their support team for assistance.
Health Check and Troubleshooting Plugin
The Health Check and Troubleshooting plugin https://wordpress.org/plugins/health-check/ is a valuable tool created by the WordPress.org community to diagnose and fix common issues.
This plugin performs a series of checks to detect common issues and provides information on how to resolve identified problems. It also includes a troubleshooting mode to test your site without affecting what visitors see on the live site.
How to use this plugin:
1. Install and activate the plugin:
- Go to Plugins > Add New and search for “Health Check and Troubleshooting”.
- Click install and activate the plugin.
2. Run site diagnostics:
- Navigate to Tools > Site Health.
- Review the results and follow the recommendations.
3. Enable troubleshooting mode:
- Go to the Troubleshooting tab and enable Troubleshooting Mode.
- This will deactivate all plugins and switch to the default theme for your session only.
- Reactivate plugins and themes one at a time to identify the source of the problem. As you enable each plugin or theme, refresh the browser where you’re viewing your site to see which plugin or theme enabled shows an error on the page.
Conclusion
By following these troubleshooting steps, you should now be equipped to address common WordPress issues like the White Screen of Death, plugin conflicts, and theme-related problems. Always remember to back up your site before making changes and use the available tools, such as error logs and the Health Check plugin, to help you identify and fix issues quickly.