How to debug wordpress site step by step
Debugging PHP code is a necessary component of any project, but WordPress has built-in debugging tools and technologies to make the process easier and more comfortable and to standardize code across the plugins, and themes. This page explains how to use the numerous debugging tools in WordPress to increase your development productivity while also improving the overall quality and interoperability of your code.
These parameters can be used to convey extensive information about problems to non-programmers or ordinary users.
First, You need to enable debug mode on your site:
The following code, inserted in your wp-config.php file, will log all errors, notices, and warnings to a file called debug.log in the wp-content directory. It will also hide the errors so they do not interrupt page generation.
// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true );
Then, another way to check theme and conflicting issue , also your site can get error or white screen issue.
These steps will help rule out a possible plugin conflict.
1. Disable all the other third-party plugins and check whether that
solves the issue
2. If that solves the issue, please activate the plugins one by one to
rule out the conflicting plugin
3. If that doesn’t work, please check it by activating the parent theme
4. If the issue still persists, please activate a WordPress default
theme like Twenty Twenty and check
Please also make sure that your platform and theme are up to date.