How to troubleshoot what is causing errors in WordPress

How to troubleshoot what is causing errors in WordPress:

Errors or unexpected actions can happen to WordPress if you are using an old theme or plugin that is not tested compatible with the current version of WordPress that you have installed. Errors can be caused by many possibilities like a plugin or theme that is poorly coded, corrupt files, incomplete installation, or improper server configuration.

Sometimes there is an error, but the server is configured not to show them to the user. You may even just see a white screen. Or the page loads and has incomplete content or something does not function as it should.

You have to determine the problem before you can fix it.
When you need to troubleshoot a WordPress problem, you should first enable WordPress debugging. After you turn WordPress debugging on, you might be able to see the errors. Then you can report the errors to the plugin or theme developer so they can guide you to a solution. After the solution is found, be sure to turn off debugging again.

Are there errors printing on your site? if yes, that is good, the errors usually say what file generated the error. That error can be your clue as to what plugin or theme caused the error. Temporarily deactivate the plugin or switch to the default theme and see if the problem goes away. Try to identify the plugin or theme that is generating the errors. You may even have more than one plugin generating errors, so you may have to temporarily Deactivate all your plugins to see if the problem goes away.

The theme you are using could be causing it
Do this as a test:
In Admin, click on Appearance, Themes.
Temporarily activate your theme to a WP default one…
“WordPress Default” theme(default for WP 2.0+), or
“Twenty Ten” (default for WP 3.0+), or
“Twenty Eleven” (default for WP 3.2+) or
“Twenty Twelve” (default for WP 3.5+) or
“Twenty Thirteen” (default for WP 3.6+)

It does not cause any harm to your WP to temporarily change the theme, test if the errors went away, and then and change the theme back.
Does it work properly with a default WP theme?
If it does, then the theme you are using is the cause. Use a different theme or report the errors to the theme developer.

Maybe another plugin is conflicting
Look on the Admin – Plugins – menu.
Temporarily Disable (not uninstall) all your other plugins.
Did the problem you were having go away? If yes, Activate each of the plugins, one by one, to determine which one conflicts. Test if the problem goes away after activating each plugin one at a time. This way you can determine which plugin was causing the problem. Once you determine a plugin is conflicting, check the plugin version to be sure it is compatible with your version of WP. Sometimes plugins are no longer updated, then new WP versions come out and the plugin will generate errors or no longer function as intended. Report any problems you find to the plugin author.

How to enable WordPress Debugging for Troubleshooting
There could be a PHP error on the page, but your server might have PHP error display turned off so it does not show what the error says. You want to see it.
You should enable WordPress debugging to possibly see the error.

FTP to your WordPress folder on the web server, then edit the wp-config.php file and add this line somewhere in the middle of the page:
define('WP_DEBUG', true);

Make sure it is not already there.
If there is already a define('WP_DEBUG', false); you can just change the false to true

Be sure to disable it later when done testing as some poorly written plugins and themes will display warnings or errors all the time. (but should they? no).

Are there errors printing on your site now? if yes, the errors usually say what file and line number generated the error. That file and line number is your clue as to what plugin or theme caused the error. Deactivate the plugin or switch to the default theme and see if the problem goes away. Try to identify the plugin or theme that is generating the errors. You may even have more than one plugin generating errors, so you may have to Deactivate all your plugins to see if the problem goes away. Once you determine a plugin is conflicting, check the plugin version to be sure it is compatible with your version of WP. Sometimes plugins are no longer updated, then new WP versions come out and the plugin will generate errors or no longer function as intended. Report any problems you find to the plugin author.

Checking WordPress for Low PHP Memory Limit

Sometimes WordPress requires more memory than your server has allocated. The PHP setting for memory limit might be set too low. This can cause random errors or white screens that show no error at all. Testing memory load is simple.
See this help page: Checking WordPress for Low PHP Memory Limit

Do you need help?

Donations by PayPal:

If you find this free contact form program/plugin useful to you, please consider making a small donation to help contribute to further development. My time is very limited and I get dozens of support emails every day. If you are not able to donate, that is OK. Thanks for your kind support! - Mike Challis

Donations by cash or check:
Mike Challis
PO Box 819
Long Beach WA 98631

Comments are closed.