How to troubleshoot your WordPress website

 

As a WordPress developer, you may have these kinds of thoughts flying in your head every day: why is WordPress not working, why is WordPress not loading my sites, or is my WordPress site broken? Instead of stressing over these types of troubles, you should start asking yourself: how do I fix critical errors in WordPress, or even closer, how do I troubleshoot a WordPress site?

WordPress is an amazing platform for making your ideas real, but of course, some things like unexpected issues or critical errors may appear, which need to be solved. Therefore, it is important to learn basic troubleshooting hacks to make your experience less complicated.

Most of the issues mentioned above can be simply solved by following these easy troubleshooting steps. In this article, we’ll give you a step-by-step guide, to fix the most common WordPress problems today. So, take a cup of iced coffee, your favorite snacks, and let’s get started!

 

1. Backup and Debug Your Website

 

  • Backup

The most important thing to always keep in mind is to make sure your website is properly backed up. Back up is the process of restoring your data and keeping it away from accidentally disappearing and damaging. Imagine how much disruptive can data loss be for your website and business!

To make the backup occur, first, you will need to have a WP plugin or do it manually. If you’re already using a backup plugin, check if you have the most recent backup stored, or not. We’d recommend you to use the UpdraftPlus plugin, as it is one of the best ones among the backup plugins. Notice, that backup is absolutely essential for your site, as it preserves your data and information, and stores it for you, in case any misfunction happens. It is your number one help against hackers, data loss, or other security alerts.

  • Debug

Another equally important point is to do a debug – find and resolve bugs in your site. WordPress makes it easy to do and simplifies the process, as it comes with specific debug systems.

To do it go to your WordPress Directory and open the wp-config.php folder. Next, search and change the wp_debug constant from “false” to “true“, so that the admin is able to see the errors found during this process. Make sure to not miss this step out, as in WordPress this constant is set “false” by default. Note, that using wp_debug is recommended for local testing and staging installs, and you better not use it on live sites.

define( 'WP_DEBUG', true );

When you enable this, all the PHP errors, warnings, and notices will be displayed. After you have the issues identified, you can fix them easily.

Then, to save the errors in a debug.log log file, in the content directory (generally wp-content/debug.log), change wp_debug_log to “true“. This is a useful option because later, you can see and review the notices if you want.

define( 'WP_DEBUG_LOG', true );
-or-
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );

Additional info: Debug plugins are recommended to be enabled during WordPress troubleshooting mode, as they show your errors clearly. Some good plugins for you are the following: Query Monitor, Debug Bar, and Error Log Monitor. These plugins collect all the found errors in a separate file and make it easier for you to see and review.

 

2. Clear Your Cache

 

  • Cache Plugin

Each time users visit your site, they download your web pages in order to be able to use it. But this process sometimes takes a lot of time and may slow down the page speed.

What does a caching plugin do? A caching plugin shrinks the process of generating a website, by collecting data information and shortening the steps to the final destination. As a result, every time the user wants to access your site, the plugin loads a comparatively lighter page, instead of the heavier one. Using a Cache Plugin is important because it provides your WordPress with good speed and performance.

While doing troubleshooting, you should clear plugins’ cache each time you deactivate them, to be able to find the issue. Why? Because even when you have your plugins deactivated, WordPress may still have their data preserved.

  •  Browser Cache

Very often, when you make some changes on your WP page or posts, your browser still doesn’t realize it and loads data from the browser cache. As a result, you are able to see only the older version of your site. If you weren’t constantly clearing your cache before, you may have already encountered this type of problem, and moreover, situations of the WordPress site not loading properly or even error failed to create the WordPress site.

To remove your browser and database cache, you can either use a Cache Plugin or do it manually. The main and primary reasons for doing so are to see the updates you make on your site, to improve user experience, and speed up your website.

Here you can see how to clear your browser cache manually:

First, click on the menu icon (3 dots), then select More tools> Clear browsing data. 

 

Clear_Browsing_Data

 

Next, this popup icon will appear, where you need to tick Cookies and other site data and Cached images and files, and also you can tick the other options if needed.

 

Clear-Data

 

And voilà, your browser cache is cleared. But if you use a cache plugin on your site, just clear your plugin cache. The majority of the plugins allow you to do it simply from the plugin’s Settings page. We recommend you to do this more often, to always have the latest version of the site.

  • DB Cache

Database caching enlarges your main database as it removes unnecessary pressure on it. This typically happens by way of frequently accessed read data. It saves results from a database, so that next time they return faster.

While doing troubleshooting, it’d be better if you clear your DB cache as well, because it will help you to find out where the error came from.

 

3. Deactivate Your Plugins Installed

 

Most of the reasons an error happens are because of the conflicts happening between different plugins. You are most likely to find the problem through deactivating one-by-one all your installed plugins on your site. Make sure to clear each plugin cache after deactivating, as it may be kept at your browser data.

Here’s the path how to deactivate: Plugins> /select the plugin by ticking it/> Deactivate.

 

plugin_deactivate

 

This is a common way to find out what plugin caused the problem. Just do the deactivation one by one, to see which was the reason.

You can also do the deactivation in your phpMyAdmin.  Then find the wp_prefix table and search active plugins. Now you can deactivate them.

 

4. Check on the themes

 

If you deactivated all your plugins, but the error still occurs, then it’s the themes’ turn to be checked. You can find out if your theme is causing a problem or not, simply by switching the active theme to one of the WordPress default themes. A default theme is the one that displays when you first install WordPress. Normally, you are able to change this from your wp-admin dashboard.

To do so, go to the Appearance> Themes, and change the theme by clicking the Activate button next to your preferred default theme.

 

wordpress-themes

 

Anyways, if you are seeing a white screen and cannot log in, you can change the theme from your database. First, open the database. Then, you will see a menu on the left side of the screen, where you need to click wp_options> /find the rows “template” and “stylesheet” (normally they are on the 2nd page)/. Next, replace the option_value of each with a default theme. Don’t forget to press enter to save the changes.

If it was the “theme’s fault”, then now your problem will be fixed.

 

Additional information

 

  • Refresh Your Website Permalinks

When you move data from one hosting to another, the permalinks may not always work as expected, as WordPress uses SEO-friendly URL structures and permalinks, and show Error 404. To prevent this type of misfunction, you can easily save the permalinks in your WP Settings. If you don’t want to make any changes, just go to your Settings> Permalinks> Save Changes. Or, you can make custom changes if you want.

 

wordpress-permalinks

 

  • Usage of Site Health.

WordPress has an amazing tool, called Site Health. It helps you to see and manage your site’s “well-being”. To find it, go to Tools> Site Health in your admin dashboard menu.

 

wordpress_site-health

 

You can use a plugin that works with this tool, called Health Check & Troubleshooting. This plugin performs checks to detect common configuration errors and also, allows themes and other plugins to add their own checks. WordPress troubleshooting plugin allows having a clean WP session with all the plugins disabled and a default theme.

  • Critical Errors.

No matter whether you are new to WordPress or not, you may see this message “There has been a critical error on your website. Please check your site admin email inbox for instructions” on your site sometime. But what are critical errors? This type of error comes up with PHP fatal errors, namely when the PHP ceases running further and your request is not being completed.

If your website is experiencing a critical error and you are not able to access your dashboard, go to your server’s phpMyAdmin, next open the corresponding wp database and find the wp_prefix table option. Now search “active plugins”, and clear its value. If the critical error was caused by your plugins, now you will have the issue solved, as the plugins are being deactivated. If not, then you have to check on your active theme. To do this, go to your server’s phpMyAdmin, in the side menu find wp_options, find the template and stylesheet rows and click option_value for each to replace the template and the stylesheet.

 

In the end…

 

There are lots of errors that you can encounter while working on WordPress, the thing is to give a quick response to the problem and do the troubleshooting right. By following the steps and instructions mentioned in this article, you will most probably be able to detect and solve them. Specifically, the answer to your question “Why is my WordPress site not loading properly?” is currently revealed, and from now on, each time you have the issue, you will know what to do!

If you think this article was helpful for you, please write down a comment below. Also, if you have any further questions or suggestions, feel free to let us know!

You can subscribe to our YouTube channel not to miss our video tutorials! You can also find us on Twitter and Facebook.

50% OFF


Mega bundle offer for you!

It consists of 3 different powerful plugins, each one allowing you to make your WordPress experience the best that could be.
Quiz + Poll + Survey