solving problems and error reporting

I think we need a sticky post with how to debug a problem. And maybe some of the ideas in here can lead to a new support plugin for WPMUDEV users.

Lets see where we can start: You have a problem with a plugin or theme, its either not working as expected or not at all so where do you start?

Please provide the following info when reporting the error:

  • your wordpress version
  • your plugin version
  • how does the problem manifest itself?
  • your server and PHP info
  • an excerpt of your error logs
  • a list of all your active plugins

Lets explain one by one:

Wordpress version and plugin version are obvious questions as is the one about how does the problem manifest itself. When it comes to server info you can create a file with any name, i.e. info.php and place the following code inside it: <?php phpinfo(); ?> opening this file in the browser i.e. mydomain.tld/info.php gives you all needed info about your server environment.
Optionally you can use a plugin, i.e.

When it comes to dealing with error logs, follow Sarah's advice: https://premium.wpmudev.org/blog/wordpress-troubleshooting-basics-how-to-check-your-error-logs/ or use a FTP program and check if you have a folder called logs which contains the error logs.
Error logs are vital for properly diagnosing a problem since usually your hosting provider has set up your environment as to not display errors so that you and your site's visitors are not disturbed by error messages.

If you want to dig deeper and solve problems on your own, these plugins come handy but they do require a way deeper level of knowledge:
http://wordpress.org/extend/plugins/debug-bar/
http://wordpress.org/extend/plugins/debug-bar-console/
http://wordpress.org/extend/plugins/wordpress-console/
http://wordpress.org/extend/plugins/debug-bar-extender/
http://wordpress.org/extend/plugins/core-control/

Manually tweaking your wp-config.php file for displaying errors and more:

define('WP_DEBUG', true);
define('SCRIPT_DEBUG', true);
define('CONCATENATE_SCRIPTS', false);
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
@ini_set('error_log','/home/example.com/logs/php_error.log');
/* That's all, stop editing! Happy blogging. */

Examples taken from here: http://codex.wordpress.org/Editing_wp-config.php please read carefully for more details!

As to listing all active plugins, there were a few plugins around doing that but the last time I checked, none was reporting on those placed inside the mu-plugins folder.

I placed the list of plugins last as that usually leads to someone giving me the advice to deactivate all of them and try again, which I cannot do on a live environment but nevertheless its sound and logic advice so I listed it here.

When dealing with clients with a support contract, this plugin comes in handy: http://wordpress.org/extend/plugins/technical-support/

And now lets see if we can come up with some ideas for a support and/or reporting for WPMUDEV users.

Obviously you guys don't want to receive emails for every error we have but how about a plugin that helps when reporting errors and does the following:

  1. user CLICKs to enable debugging to a certain file
  2. User triggers the problem by activating the plugin or running it
  3. user CLICKs to stop debugging and gets a nice report by email he can then submit here in the forum containing the following info
  • - error log output between the two CLICKs by the user
  • - system info taken from <?php phpinfo(); ?>

WoW. That just turned out to be the longest post I've ever written :slight_smile: I might publish it on my blog too :wink: Feel free to correct, add to it and make it sticky....

###edit###
*sarcasm start*I know its a long text and most people won't read it until the end :slight_frown:*sarcasm end*