Debug your WordPress site without showing anything on the front-end

If you have a problem on your WordPress site, you would probably like to detect the cause of the problem without breaking anything.

In many cases, one of the active plug-ins or the theme itself is causing the problem.

You will have more information about the problem if you enable WP_DEBUG in your wp-config.php file.

If you don’t want to show any errors to other visitors but at the same time see them for debugging, you can add the following snippet in your wp-config.php.

if( $_SERVER['REMOTE_ADDR'] == 'xxx.xx.xxx.xx'){
   define('WP_DEBUG', true);
   define( 'WP_DEBUG_LOG', true );
}
else{
   define('WP_DEBUG', false);
   define( 'WP_DEBUG_LOG', false );
}

 

In the snippet above you should replace xxx.xx.xxx.xx with your IP address.

Doing so, only your IP address will have access to the warnings and errors.

Be just sure that WP_DEBUG and WP_DEBUG_LOG are included only in the snippet above, and in no other place in wp-config.php.

Looking at the warnings and errors, you may already understand what is causing the issue.

But If you don’t feel confident modifying PHP files, don’t do it, you still have other ways.

If you don’t want to modify any PHP file or don’t see any helpful warning or error, you should deactivate plug-in after plug-in and switch to the default WordPress theme. How could you do it on a site that is public without people see what you are doing and most of all without breaking the layout on the front-end?

How to find the plug-in that is causing issues.

To find the “guilty” plug-in, you should deactivate plug-in after plug-in, until you don’t see anymore the issue. But doing so, you will need time and most of all, everybody will see the effects of the plug-ins deactivation on the front-end.

Freesoul Deactivate Plugins can help to speed up the process and don’t show to anybody what you are doing.

Its Control Panel lets you see each page and archive preview disabling plug-in after plug-in.

In the following example, the plugin Revolution Slider is causing a fatal error and the web page is not displayed at all. It’s only an example and absolutely doesn’t mean that Revolution Slider gives this kind of problems. We have caused the fatal error modifying the plugin code, only for demonstration purposes.

You can use Freesoul Deactivate Plugins also to improve your website performance, permanently disabling specific plug-ins on specific pages, posts, and archives. The improvement will be very effective if you have some “heavy” plug-ins that you don’t need on every page.

How to switch to a different theme only for a preview.

In the case you don’t find any guilty plugin, the most probable culprit becomes the theme.

In this case, Freesoul Switch Theme will allow you to see a preview of the web page with a different theme, while all the other visitors are seeing the actual active theme.

You can use Freesoul Switch Theme also for permanently assign different themes on specific pages.

This post will only help you if you want to detect the cause of the problem without breaking anything on the front-end. We will speak soon about how to problem solve in the back-end without showing any effect on the front-end.

Freesoul Deactivate Plugins

Download the free version of Freesoul Deactivate Plugins for debugging and performance improvement:

Download the free version of Freesoul Switch Theme for debugging or for permanently using different themes on specific pages: