Your Complete Guide to Troubleshooting WordPress

Your Complete Guide to Troubleshooting WordPress

I wrote a while back about how to find your error logs for WordPress. We’ve just had a great post on the WPMU DEV support forums adding even more. I’ve decided to combine it, along with my post and with an older post by Sarah to put together your one-stop troubleshooting guide for WordPress.

Before you start tearing your hair out, before you start posting frantically on support forums, you can follow this guide to get a handle on what’s gone wrong and how you can fix it.

Here’s what we’ll look at:

  1. The info you need to provide when reporting an error
  2. Finding out your PHP version
  3. Finding Your Error Logs via FTP
  4. Finding Your Error Logs in Plesk
  5. Finding Your Error Logs in CPanel
  6. Common Error Messages and what they mean
  7. Turn on debugging
  8. WordPress plugins for getting info about your website
  9. WordPress plugins for debugging

Let’s get straight to it:

Support Request Information

The information that you provide to make your support request is vital to getting your problem solved quickly.

If there isn’t a simple solution to your problem, a support pro will recreate it on their own website. This helps them to work on solving it directly so the more information you provide the better.

Here’s what you need:

  • WordPress version
  • Plugin and version
  • A list of your active plugins
  • PHP and server information
  • Error log excerpt
  • The steps that you took to get the error

All of that information will help with your support request. You’re really doing yourself a favour when you make a support request properly.

PHP version

Your PHP version could be causing your error. Sometimes web hosts don’t have the latest version of PHP installed. You can upload a file on to your server to get the information you need.

1. Create a text file

You can call it anything you want. For ease let’s call it info.php

PHP Info file in notepad 2. Add code

Copy and paste this code into it:

<?php phpinfo(); ?>

3. Upload

Add the file to the root of your site on your server:

Transfer file

4. Visit site

Go to: http://yoursite.com/info.php . It should look something like this with your PHP information right at the top:

PHP info

Finding your Error Logs via FTP

Your error logs have all sorts of goodness that will help you to solve your WordPress problems. There are three common ways to access them. First, let’s take a look at how to access them via FTP:

1. Open your site in your favourite FTP program

2. Navigate to your root folder and check there. If your error log isn’t there you could try wp-includes

Error log in FTP
Open it up and look for the date and the information that you need.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

Finding your Error Logs in Plesk

log manager logo1. Log into Plesk

2. Look for the Log Manager icon

3. There will be a number of different logs. You want the one called error_log

Plesk error log

Finding your Error Logs in CPanel

1. Log in to CPanel

2. Scroll down to Error Log

cpanel error log icon

3. Your error logs will appear there in the reverse order so scroll down to find what you need.

Common Fatal Error Messages and How to Fix Them

Now that you have your error logs you will have your error messages. I’ve covered these before but let’s take a look at them again along with some of the quick checks you can make to see if you can solve the problem yourself.

 

  • If you have auto installed or upgraded try again manually
  • Make sure your plugin or theme works with your version of WordPress

Allowed Memory Size Exhausted

Increase WordPress memory limit by adding this to wp-config.php:

define('WP_MEMORY_LIMIT', '128M');

Function already defined

  • If you have auto-installed or upgraded try again manually
  • If you have created a child theme, make sure you haven’t copied all of the functions from the parent into the child

Turn on Debugging

For more advanced debugging you can add the following to your wp-config.php file. This will give you even more information:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

This suggestion from Mike Little on the wp-hackers mailing list, logs all error notices and warnings to a file called debug,log in wp-content.

You should add it in the usual place above /* That’s all, stop editing! Happy blogging. */

This will log all errors to a file called debug.log in your wp-content folder. You may need to create the file. To do this:

1. Create a file called “debug.log”

debug log

2. Upload the file to wp-content via FTP

upload debug log

3. Open file to check out all of the debugging goodness:

debug text

Don’t forget to turn of debugging when you’ve fixed your problem.

Now you should be armed and ready to deal with any problems that you encounter when using WordPress. Have fun!