Top 8 Common WordPress Errors And Their Fixes

This tutorial includes the top common WordPress errors that mostly appear on screen while dealing with a WordPress site or blog, and also some suggested fixes by experts to solve those problems easily.

In the list of CMS (Content Management System) software, WordPress is quite popular and offers great flexibility and functions to add in site or personal blogs. Although, the WordPress site mostly runs at its best, sometimes there might happens wrong that stops the site to work properly. So, here we have included top 8 most common WordPress errors and how a user can fix them easily.

Backup Your WordPress Installation (Recommended Step 1)

If your WordPress website started to show some error messages or issues, then you might want to look into its database or files to fix the issue, but the very first recommendation is to take the backup of whole site. Actually, while trying to fix the issue, you may also end up to break it even more, and to restore such things later on, you must have a backup. Get through this article to create WodPress backup.

Top 7 Common WordPress Errors and Workarounds

As you have created the backup of whole WordPress installation, here are some of the common WordPress errors and how such errors can be fixed. Let’s check out each of the issues one by one.

1: Error Establishing a Database Connection

In the list of common WordPress errors, the first commonly shown issue is “Error Establishing a Database Connection”. If you are a WordPress user, then you might be very familiar with this error message, and the error simply indicates there might be wrong with your Database connectivity. In simple words, the WordPress is unable to connect with your MySQL database server.

We have already covered this common WordPress error in our previous article and how to fix them. So we are not going to elaborate it here. All you need to check database, wp-config.php, database login credentials, etc, to fix the issue.

2: 500 Internal Server Error

The second most common WordPress error includes the “500 Internal Server Error”, and this appears on screen when some sort of error on the server occurs, and the server side software is unable to identify the exact cause.

Technically, there can be a large number of reasons to see this issue like broken plugin, recent changes in .htaccess file, faulty theme, limited memory limit, and so on. So, here are the steps to fix the issue:

Step 1: Checking .htaccess File

The very first step is to check your .htaccess file. In WordPress, this file is technically used to rewrite URLs and make them look good. However in case if this file gets corrupted somehow, the users may end up to encounter aforementioned error on screen. To justify if your .htaccess file is creating the issue, log in to your server through FTP client or File Manager in Control Panel. Navigate to your WordPress installation directory and rename .htaccess file to ‘.htaccess_backup’. Once done, try to open your homepage on browser and if the site opens correctly, you should check the Permalinks Settings page in WordPress dashboard, check its values, and Save the modifications.

Also Read:   20+ Best Free Wordpress Blog Themes 2021

Step 2: Switch To Default Theme

Most of the time, if “500 Internal Server Error” message appears, it blocks users to access their WordPress dashboard. However, if you are able to access the dashboard, navigate to to Themes section and change the theme to default which usually comes with WordPress.

In case if you don’t have access to dashboard, Log in to server through FTP client and get to wp-themes directory rename your currently active theme to anything else. Doing this will force WordPress installation to switch to default theme automatically, even it will download and install the default theme as well.

Step 3: Increase Memory Limit

Although, the Memory Limit cause is very rare to happen, still it may be a reason sometimes to show up 500 Internal Server Error with WordPress. This usually happens when the WordPress site goes over the default set PHP Memory Limit in your wp-config.php file, and in order to fix the issue, log in though FTP client and add the following line at the end of your wp-config.php file.

define(‘WP_MEMORY_LIMIT’, ’128M’);

Step 4: Deactivate All Plugins

A corrupted or broken plugin might also be a reason why the Internal Server Error is appearing on screen. However, if you don’t know which plugin is actually conflicting, you would need to deactivate all installed WordPress plugins.

As already mentioned, if you are to access the WordPress dashboard, navigate to Plugins page and disable all plugins. Otherwise, get access to WordPress files through FTP client and rename Plugins folder under wp-content to Plugins_backup. This will deactivate all plugins, and you can try visiting your WordPress site. If the site opens, you should enable each plugin one by one to check if which one is conflicting, and this will help you identify the corrupt plugin, and will do the required workaround to fix 500 Internal Server Error.

3: White Screen of Death (WSOD)

Among WordPress users, this error is considered as the most drastic issue because it shows actually no message on screen, and it’s hard to justify what’s the main reason. However, you can do a number of things to try fixing the issue.

Step 1: Enable Debugging

Enabling Debugging in WordPress allows to start displaying error messages which it actually hides in production environment. Generally, Debugging feature is disabled on WordPress as a security measure because seeing the error message can allow a hacker to misuse and get access to site for illicit purposes.

Also Read:   Top 15+ Best Gnome Extensions To Use On Linux

In order to enable debugging in WordPress, edit the following line in wp-config.php file through FTP client:

define(‘WP_DEBUG’, false);

The value set as ‘false’ should be replaced to ‘true’, and the WordPress will show the actual error message on screen, based on which the required actions can be taken.

Step 2: Use the Default Theme

Alike mentioned in above methods, if you have access to dashboard, switch to default WordPress theme, otherwise, switch to default theme through renaming the theme directory as discussed in previous methods.

Step 3: Disable All Plugins

WSOD error in WordPress might also occur due to a plugin if conflicting or corrupted. So, disabling the plugins and identifying the corrupted one as mentioned above can be helpful.

Step 4: Increase Memory Limit

Although, the memory limit should not be a reason to show the error, still you can try increasing memory limit to see if the issue can be fixed. Follow the instructions mentioned in section above.

4: WordPress Sidebar Below Content

Many a times, it appears that WordPress Sidebar shows up below the content instead of its actual position according to your theme. This issue may occur if your theme is corrupted or the html is invalid.

So, if you think your theme is corrupted, you should update your theme if an update is available. Also you can try reinstalling the latest version of the theme.

However, in case of invalid html code, then you should look for the invalid code and fix it. Usually, the issue occurs when you don’t have closed a <div> tag with a closing </div> tag or similar. In order to find out the issue, just open your website on browser and click right button where you see the error is occurring and select “View Source Code” option. Alternatively, you can also press CTRL + U and check the code.

The newly opened page will show you the core html code which your WordPress site is using. Copy all the code and paste in an HTML Validation Checker Online tool here to justify if the HTML is valid.

If you see an error on that page, just check the file in which the invalid HTML code is found. This can be a bit tough task as every theme has a large number of files, and you would have to check through the right file. Use your own mind to find and sort out the issue.

But, if you see the HTML code in the checker tool is correct and have no issue, then your theme is corrupted, and is the main culprit. Also, it might be possible that your theme’s style.css have some broken code, for which you should look through the file and fix the broken code.

5: Connection Timed Out

The Connection Timed Out error on WordPress mostly indicates the issue with memory limit. Actually the site has no enough memory to play the game, and if this is the case with you, it’s suggested to increase the memory limit through altering wp-config.php file. Just place the code mentioned below in wp-config.php file.

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

Even if increasing the memory limit fails to fix the issue, you can try switching to default theme or deactivating all plugins with the instructions discussed above.

Also Read:   Fix 503 Service Unavailable Error (Wordpress Tips Included)

6: Lost Admin Password

Although, this condition can be rare, still if you end up forgetting your Admin password in your WordPress site, don’t be panic as restoring it is easy.

Obviously the easiest way to restore your Admin password through Forgot Your Password link on the WordPress login page in wp-admin area. However, in case if this feature don’t work for you, then you should access PHPMyAdmin and select the correct WordPress site’s database.

Select your database
Select your database

Once you have selected the database of your site, search and select wp_users table within it.

select wp_users table
Select wp_users table

In the list of all users, select your username, and click the Edit link to the left of entry.

click on edit option
Click on Edit option

In the next page, you can see various options. Select to edit user_pass. Select MD5 from the drop down and feed your new password in its field.

enter new password
Enter new password

Once done, click on Go button at the bottom of screen and login to your WordPress site using your new password.

7: 404 Not Found Error, while loading pages or posts

In case if you are getting 404 Not Found error, then probably your .htaccess file would be the culprit. The error actually means that either you are using Pretty Permalinks, or the WordPress wasn’t able to edit the .htaccess file after you saved the settings.

In most of the instances, this issue can be resolved by just clicking on Save Changes button on Permalinks Settings page on WordPress dashboard. Doing so will enforce WordPress to rewrite the new changes to .htaccess file.

Even if it doesn’t work for you, then edit your .htaccess file and replace all its code with the one mentioned below:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

8: Stuck In Maintenance Mode After Update

It’s also one of the rare issue occurs with WordPress site, still it can be annoying for users who don’t know what to do. This actually happens when you try to update your WordPress site, and the process is interrupted in the middle somehow, then you can expect to see Maintenance Mode message appearing on screen all the time while opening your site.

Fixing this issue is quite easy as you just need to delete the Maintenance file from your WordPress installation folder. Once done, you can visit the site and the issue will be resolved.

Final Words

WordPress is quite flexible option as a CMS for easy blogging options or to create a website. However, it can be sometimes annoying if some issues occur. We have discussed here some common WordPress errors and their fixes so as the issue can be resolved easily. Do share this tutorial with your friends. If you have any question, you can click to Visit Our Discussion Board.

Nishant

Nishant Verma is a senior web developer who love to share his knowledge about Linux, SysAdmin, and more other web handlers. Currently, he loves to write as content contributor for ServoNode.