In the case nobody didn’t touch unknown files, but you still have some problems with WP site, there’re a few ways to identify what’s wrong.
Here is the most important and handy debug-feature, which is not recommended to use on real site, just for local use. This function is disabled by default (
false) and to activate it you need to switch it to
true in configuration file. This file
wp-config.php you can find in the core directory of your WP project (if you see there just
wp-config-sample.php you have to rename it).
define( 'WP_DEBUG', false ); replace to
define( 'WP_DEBUG', true );
When you activate debug mode, you will see all PHP error messages, so they may be fixed. It’s much better to see them, than white screen of death or default messages, that is so annoying, isn’t it? Following this way, you will be able to see the answers on typical questions like “What’s happening?” and “What should I do?”. Show this errors to your site developer and he will help you to find the solution.
Besides, program languages are evolving, so some functions and arguments are becoming deprecated and should be changed for correction in WP appearance. In this case, WP_Debug will show you these deprecated elements and their new analogues, so you will figure out if there is problem in a new theme or WP plugin.
This function is connected to the previous one, it registers and saves all WP_Debug errors (including errors of AJAX requests). It can be very useful if you want to see the error list later. To activate it, write in
define( 'WP_DEBUG_LOG', true );
If any errors occurred,
debug.log file with errors list will appear in
You can choose the way to see WP errors. If you don’t want errors to be displayed immediately, but want to see them later in
debug.log, you may write in
wp-config.php such a string:
define( 'WP_DEBUG_DISPLAY', false );
This function works only when WP_DEBUG and WP_DEBUG_LOG is enabled.
And all these functions together:
// Turn debugging on
// Tell WordPress to log everything to /wp-content/debug.log
// Turn off the display of error messages on your site
// For good measure, you can also add the follow code, which will hide errors from being
You can use a very beneficial plugin called Debug Bar to see all your logs in it. But you’d better not experiment with it on the live sites.
Hope this article will be helpful for you in your challenges to figure out what is debugging in WordPress and how to use it. Nevertheless, after you read it, what actions did you do when you had some problems on your site? Whether your behavior changed or not?