Common WordPress Errors and the Solutions to Fix Them

Something going wrong on your WordPress site is a scary thing, that’s for sure. But it’s also a situation that most WordPress webmasters have experienced at least once in their life (probably a lot more than that!). And as far as most common WordPress errors go, fixing the problem isn’t usually too difficult because most problems that can occur with WordPress are usually down to a few certain issues which have been seen time and time again.

If you are the sort of person who is comfortable with digging into your WordPress installation yourself then it’s quite possible for you to fix most problems yourself, of course if you at a beginner level of WordPress usage you might be better off contacting your web host for help fixing the issue. If you are using cheap shared hosting, then customer support might not cover issues with WordPress that might arise. If you are using Managed WordPress hosting though, which comes at a premium price, they should be more than happy to diagnose and fix any issues you might have.

Let’s take a look at some of the more common types of WordPress bugs and solutions to fix them:

1. The White Screen of Death

This is one of the most important errors a WordPress user can face. This can be due to multiple reasons, which is certainly not easy to pinpoint the source of the problem. However, the following points are believed to be the most common causes for the White Screen of Death.

• Plugin collision with active theme
• Plugin collision with another plugin
• Incompatible plugin with current version of WordPress
• Incompatible theme with latest revision of WordPress
• Plugin-theme collision: In many cases the theme might have some code that the plugin you most recently activated using; thereby causing a deadlock.

The Solution:

a. Resetting the WordPress Plugin Directory:

To reset the WordPress plugin directory, you must have the access to the WordPress installation folder. This can be done by using the FTP access, SSH, cPanel, or any web-server control panel’s file manager. For instance, Dreamhost and FatCow do not use cPanel, but have their own file manager.

• Rename the plugins directory to plugin-temp
• Create a fresh directory called plugins and change the permissions to 644
• Restart your web server if you have SSH access, are on a VPS or a dedicated server.

By following the above, all your previously activated themes will get deactivated and removed. You can now try logging into your WP dashboard. If it works, then you can start moving the plugins one by one, starting with the trustworthy ones and move forward.

b. Renaming the Active Theme:

When you rename a currently active theme, WordPress is unable to find it. It then looks in its default them. When found, it switches over to either of the themes and you might be able to access your dashboard once again.

Read Also: WordPress versus Drupal: Which CMS is better for you?

2. 500 Internal Server Error

The most certain cause of a 500 Internal Server error is a corrupt .htaccess file in the base/root directory of your WordPress installation. In 90% of the cases, the problem gets solved by deleting the .htaccess file and creating a new one. To delete the file, login to your WordPress root directory through FTP and rename the existing .htaccess file to something like .htaccess-corrupt. Then, immediately login to your WordPress dashboard and head over to the Permalinks option under the Settings. Select your preferred permalink option and Save the changes. Your WP site should work fine now.

There are other causes for the 500 Internal Server Error as well, but they vary quite much and are hard to pinpoint. Other troubleshooting methods include renaming the theme, resetting the plugin directory and replacing the WP-admin and WP-includes folders with fresh ones from the most recent WordPress-latest.zip file.

3. Error Establishing A Database Connection

This is one of the most common errors faced by WordPress Beginners. It is easier to fix as compared to the WSOD problem since we know the cause of the error.

The most common cause is the MySQL database access being incorrect. As a result, WordPress cannot connect to the database, thus, being unable to function. The other reasons include:

• The MySQL server is down
• The MySQL user does not have the apt permissions to modify the database.

The Solution:

• In case of incorrect login details, it is important and helpful to verify them.

• Make sure that your password is within single quotes. If your password happens to contain a single quote, then make sure that you enclose the password string with double quotes and vice-versa.

• If the MySQL user doesn’t have the required privileges, assign them using the MySQL Database option available inside the cPanel.

• If the MySQL server is down, try restarting it if you have SSH access. If not, contact your hosting provider.

4. Failed Automatic WordPress Update

At times, due to overloaded servers or connection issues, the automated WordPress installation gets interrupted and you are either left with tons of error messages or a WSOD. To resolve this, you can follow the manual upgrade steps and resolve the issue in no time.

• Download the latest version of WordPress and extract the contents in your system
• If possible, deactivate all the plugins
• Login to your WordPress root directory using FTP and swap the files in the base directory with the new ones in the extracted folder.
• Resultantly, delete the wp-admin and wp-includes directories
• Upload the freshly extracted wp-admin and wp-includes folders to your root directory
• Route to your wp-content directory present in the webserver via FTP
• Rename/ Replace/ overwrite the files inside this directory with the ones in the freshly extracted wp-content directory
• Never delete the wp-content directory in your webserver – or you might lose all your saved media

5. Error Establishing A Database Connection

This is one of the most common errors committed by the WordPress Beginners. It is easier to fix as compared to the WSOD problem, since we know the cause of the error.

The most common cause is: one of the MySQL database access details being incorrect. Resultantly, WordPress cannot connect to the database and thus, not functioning properly.

The MySQL server is down

The MySQL user does not have the appropriate amount of permission to modify the database.

The Solution:

In case of incorrect login details, verify them.

• Make sure your password is within single quotes. If you password happens to contain a single quote, make sure you enclose the password string with double quotes and vice-versa.
• If the MySQL server is down, try restarting it if you have SSH access. Else, contact your hosting provider
• If the MySQL user does not have the required privileges, assign them using the MySQL Database option available inside cPanel.

The above mentioned are some of the most common WordPress errors faced by web developers. It is worth knowing that most of the PHP related errors such as maximum execution time exceeded, connection timed out, fatal error could indicate a poor web host, or one that is not properly set up to handle WordPress. It is recommended to consult the customer support or get in touch with a professional web application development company who can do these tasks for you.