News & Info

CSA Daily Updates and Tech Chatter

Tracking Down WordPress Plugin Problems

With WordPress it is very easy to debug the activation process of a plugin and get a detailed log file of exactly what is going on.   I use this method to look at activation problems with Store Locator Plus on various servers.   Most often I uncover server security settings that are too strict, memory issues, or even blocked MySQL connection requests on mis-configured shared hosting environments.

How can you do the same?   Easy.    I only have FTP access to many of these client sites, which means you should be able to employ the same technique.

Enable WordPress Debug Logging

Login to your server using your FTP client.

Download the wp-config.php file.    Hopefully you’ve moved this out of the root directory of  your website (that is noted in various security articles on this site).  If not it will reside in your web root.

Find the line:

define('WP_DEBUG', false);

Edit that line and add another to the wp-config file to turn on logging:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

Put the wp-config.php file back on your server.

Now you can go and activate your plugin or run whatever other things are causing you problems. I find it best to only chase one problem at a time and empty/delete the debug log file between tests.

After you’ve tested the issue, such as activating a plugin, go get your log file with FTP. Download the file in your ./wp-content directory named debug.log. This contains any errors and warnings generated from within WordPress.

When you are done make sure you turn OFF debug logging so you don’t slow down your site and fill up your disk storage.

Edit these two lines and put the file back on your server.

define('WP_DEBUG', false);
define('WP_DEBUG_LOG', false);

Tags: , ,

Comments are closed.