View Categories

Basic Debugging Steps.

Debugging is an essential part of developing and maintaining a WordPress site. Occasionally, you might encounter issues or conflicts on your site. Debugging is essential to locate the main source of the issue. We will cover some basic debugging in WordPress, helping you identify and resolve issues.

Update your WordPress Themes and Plugins #

Keeping your WordPress Themes and Plugins updated is crucial for the security, performance, and functionality of your WordPress website. To ensure you don’t have any pending updates, navigate to the WordPress Dashboard > Updates.

Updates WordPress, Themes, and Plugins.
Updates WordPress, Themes, and Plugins.

Follow the link on Why You Should Keep Your WordPress Theme and Plugins Up to Date.

Clear Site Cache #

Clearing the cache can help ensure that you’re seeing the latest changes and not an outdated cached version when diagnosing problems on a site. The easiest way to clear the cache on your WordPress site is to use a plugin. The most common plugins to clear cache are WP Super Cache and W3 Total Cache.
Learn more about What is Cache, and why should we clear it?

Clear Browser Cookies #

Cookies are small files stored on a computer by websites to remember preferences and login information. Over time, these cookies become outdated or corrupted, causing conflicts with the current version of the site. Clearing Browser cookies ensures the data is updated, especially when the site is updated.
Detailed information on Browser Cookies.

Check for Plugin Conflicts. #

WordPress offers a variety of flexible and extensive plugin libraries. However, when multiple plugins attempt to modify the same part of WordPress, conflicts can arise, leading to functionality issues, site crashes, or other unusual behaviors. This is one of the most common issues faced in WordPress. Detailed steps on how to check plugin conflicts are explained here: How to check plugin conflicts.

Check for Theme Conflicts. #

The fundamental aspect of every WordPress site is Theme. It defines the appearance and layout of your website. However, just like plugins, themes can sometimes cause conflicts.

The best way to check for theme conflicts is to switch to a default WordPress theme like Twenty Twenty One. If the issue is resolved, you can conclude that the issue lies within your original theme.

Enable Debug Mode #

To start debugging in WordPress, you need to enable debug mode. This is done by modifying the wp-config.php file located in the root directory of your WordPress installation. Open the wp-config.php file and add the following code:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Note: Add the code before /*That’s all, stop editing! Happy publishing.*/ line.

After adding the above code, debug.log file will be created in the wp-content directory, where all errors will be logged.

Script Debugging with SCRIPT_DEBUG #

SCRIPT_DEBUG forces WordPress to use the unminified versions of CSS and JavaScript files. This is particularly useful when debugging issues related to scripts and styles. Add the following code to your wp-config.php file, the same as we did for WP_DEBUG.

define('SCRIPT_DEBUG',true);

This will ensure that WordPress uses the full versions of scripts and styles, making it easier to identify and fix issues.

Contact Support #

After completing all the debugging steps, most of the issues get resolved. However, if the problem still exists you can always contact theme support. The dedicated support team will assist you to solve the issue. Make sure you read the guidelines on How to make your query clear to the support Team?

Basic Debugging Steps.

Powered by BetterDocs

Scroll to top