Common WordPress Errors and How to Fix Them

WordPress Error Troubleshooting

This post is based off of a presentation on WordPress Error Troubleshooting given at a WordPress Meetup in Jerusalem. One of the great things about WordPress is the community of people who make themselves available to provide support and keep creating new exciting things! Chances are you can find a WordPress meetup near you, wherever you are!

Rather than a breakdown of every particular error message, this post is designed to give versatile overall WordPress error troubleshooting advice that you can apply to most types of bugs. We also review a few particular scenarios that are unfortunately fairly common.

 

Plugin Conflicts

When your website isn’t performing the way you think or know it should, or if you are seeing a strange error message, plugins are usually the first place to look. At the end of the day, they are bits of code (usually) third parties add to enhance the features of the basic WordPress installation, and they may conflict with one another or with your theme.

WordPress error troubleshooting with plugins begins with disabling all plugins, ideally on a copy of your site so that you aren’t breaking or disabling your live site. Then you enable them one by one to see if you can pinpoint the culprit.

Sometimes disabling plugins via the Dashboard results in further errors or the Plugins page doesn’t load. Luckily, there is a simple solution if you have FTP access or access to File Manager through your host’s control panel. 

Simply go to the WordPress installation, and in /wp-content/plugins change the “plugin” name to something like “plugin-disabled”. Once you’re able to visit the Plugins page on your WordPress dashboard, you will see that any plugin folder names that you edited will show up as disabled.

begin WordPress error troubleshooting by deactivating plugins

An example of a deactivated plugin viewed in the Dashboard

Theme Conflicts

After determining that the cause of the bug isn’t a plugin, the next step in WordPress error troubleshooting is your theme. To determine if the problem is in fact with your theme, you should switch to a default theme such as Twenty Seventeen or storefront for WooCommerce store. If you aren’t able to select a new theme via Appearance > Themes, you can do so via the database with phpMyAdmin.

First you need to check that such a default theme is installed on your site. You can check which themes are installed by looking in /wp-content/themes

In our example, where the database prefix is “wpeg”, we would go to “wpeg_options” and look for “template” and “stylesheet” and change both of those values to the name of the folder of a default theme, such as “twentyseventeen” and be sure to enter it exactly the same as the folder name, minding letter case and spaces.

Retrieving Passwords

Let’s say you inherit ownership of a site at work and the last admin has left the company on bad terms. Or the developer, who was the only person with access, dropped off the face of the earth. For one reason or another, users sometimes find themselves without access to the site and no way to reset the password, because they don’t have access to the user’s email either!

Alternatively, sometimes there is an error and the “reset password” e-mail never comes or doesn’t work.

Luckily, there is a pretty easy solution if you have access to the database.

If there are multiple databases, find yours in wp-config.php at the root of your WordPress installation (via File Manager or FTP)

 

wp-config.php file

In this example, the database name would be irgwebsi_wp811

Next, via phpMyAdmin, we would go to the wpeg_users table, then find the user we want to edit. Click “edit” next to their name and then find “user_pass”, change the password and select MD5.


WordPress error troubleshooting - resetting passwords with the wp_users table

404 Errors Everywhere

A few times upon making structural changes or migrating a website from a production to a live environment, or vice versa, all links on the website return 404 errors. Oh no! Where did the website go?

404 error notice

Luckily, getting those links linking to real content is a snap. Just log into the dashboard and reset permalinks by going to Settings > Permalinks and hit “Save”. That’s it!

This is also a good time to make sure that your permalinks are set up optimally. But a word of caution, if you have a live site and you make changes to the link structure, you will need to run redirects as to avoid broken links and therefore a different 404 error problem!

For Trickier Cases

We can’t cover every type of WordPress error here. Here are some other troubleshooting mechanisms to fix other types of bugs.

    1. Look for anything that doesn’t belong in your .htaccess file. When in doubt, make a backup of your .htaccess file and then delete it. WordPress will automatically generate a new, default version. 
    2. Check your PHP Version. If you have a very outdated version of PHP, your theme or plugins may no longer support it. As of 2019, only PHP Versions 7+ are fully supported.
    3. Clear your browser and server side caches.
    4. Check for an overburdened or compromised server. Run a security check and get in touch with your host.

Error Prevention

The best thing, of course, is to prevent errors from happening in the first place!

Our top tips for error prevention and overall WordPress website health:

  1. Run regular backups (and understand how to restore them – test that they work!)
  2. Perform code updates on a staging site or just after you have performed a backup that is easy to restore before going live with them
  3. If customizing a child theme or making major site changes such as adding functions via functions.php, keep track of versions using a system like git.
  4. Regularly update your plugins and only use plugins that are kept up to date
  5. Only perform major WordPress core, theme and plugin updates after the bugs have been worked out by other users
  6. Run a supported version of PHP. As of 2019, there will be no more security patches released for versions older than 7.0. These older versions will be considered fully deprecated.
  7. Use a stable, well-supported theme
  8. Use a hosting company and / or hire support that can lend a helping hand

 

More About Backups

Here are some tips about effectively backing up your WordPress website:

  1. The most secure way to store backups is somewhere other than, or in addition to, your server. In the unlikely event your server crashes, you don’t want to find out that everything is lost. It would be like the equivalent of your computer being stolen when you only have backups of your major projects on that computer hard drive.
  2. Further to number 1 above, consider backing up to an external hard drive or cloud storage such as Google Drive or Dropbox.
  3. Some services that provide ongoing backups: Manage WP, Updraft Plus, Blog Vault
  4. Your hosting company may provide regular or manual backups as part of their service. Check their terms.

Conclusion

Hopefully this WordPress error troubleshooting primer will keep your website happy and healthy and be a good resource for triage, should that be necessary. Of course, you can always contact us for further support!

Leave a comment



Drop a line!

irg-logo-transparent-300px

Copyright © 2017