If you’re encountering a WordPress error or a White Screen of Death, you should enable WordPress debugging and examine your error logs. Learning more about how to troubleshoot PHP errors will also help you recover from these errors and get your website back online.
Once you see errors in your log, follow these steps to interpret the error.
Anatomy of a WordPress Error message
Most WordPress error messages follow a pattern similar to the following:
ERROR TYPE: specific error, [the issue causing the error] in file /home/username/public_directory/wp-content/[plugins | themes]/[theme-name | plugin-name]/directory/filename.php on line [line number]
Let’s break this down bit-by-bit.
At the beginning of each error message, you’ll see the error type. Common examples include Fatal error, Parse error, and Warning.
- If the error type is a warning, this can usually be disregarded without affecting visitors to your website, but it is still important for the long-term health of your website.
- If the error type is a fatal error or parse error, it is most likely either completely breaking your website, or causing significant issues for your visitors.
Specific error, [the issue causing the error]
This part will be important to skilled developers who know the jargon that websites use to communicate errors. It will describe the specific issue, for example, unexpected T_STRING or unexpected end of file.
- It’s OK if you don’t understand exactly what this part means. Move on to the next step and you’ll be able to get some more information.
in file /home/username/public_directory/wp-content/[plugins | themes]/[theme-name | plugin-name]/directory/filename.php on line [line number]
This is the most important part for most WordPress web developers. It will give you the name of the Theme or Plugin that is experiencing the error.
- Check specifically for the part that comes immediately after wp-content, because the next two sections will specify if it is a Theme or Plugin, and then its name.
Now that you know which Plugin or Theme is causing WordPress errors on your website, you may want to learn how to disable a plugin via FTP, disable a plugin via WP-CLI, switch themes with WP-CLI, switch themes using phpMyAdmin, or check WordPress core files with WP-CLI.
200+ Design Templates + 1 Kick-ass SuperTheme
6 WordPress Plugins + 2 Essential Services
Everything you need to build and manage WordPress websites in one Central place.