Common WordPress Errors that Should be Fixed

WordPress Troubleshooting 101: A Guide to Fixing the Most Common WordPress Errors

It can be quite frustrating to encounter WordPress errors when managing your website. In general, WordPress is a stable platform. However, sometimes unexpected things can happen, and your site, or just a part of it, may stop working. Fixing WordPress errors is specific for all of them, but in most cases — not too difficult. Luckily, most websites experience the same errors, so it’s easy to analyze the situation.

WordPress is a Content Management System (CMS) that’s renowned for being easy to use. That said, similar to all other trending CMSs, you are dealing with lots of moving parts that go into the website you build with WordPress. That’s why some of the errors that may occur can have different causes. This post has been created to help you out with common WordPress errors by explaining them and giving the proper solutions.

Table of Contents:

Error Establishing a Database Connection

Because of the message that pops up when the error happens, it’s quite self-explanatory. When WordPress cannot connect to its database, your site stops loading, which means you will not be able to access both your pages and the WordPress dashboard. Frustrating, right? 

Here are some of the usual causes for WordPress database errors:

  • Server down. There are some cases where your website will not be able to connect to its database because of server issues (e.g., too much traffic, permissions issue). Nevertheless, if the problem is not on your end, the fix is simple, and we will come back to it in a bit.
  • Corrupted database. The term “corrupted” is often used when a file stops working. That can also happen to databases, which results in WordPress being unable to decrypt the information within the database. When corruption occurs, it’s usually caused when saving files or making changes to them.
  • Wrong login credentials. Databases usually store a lot of crucial and sensitive information, and thus it’s often required for you to use the right credentials for gaining access to those databases. Since WordPress needs full access to its database to work, if someone deletes your user or changes the password, you won’t be able to connect to your database.

Here’s the good news! If you cannot connect to your WordPress database for any reason, you can fix that with just a few tweaks. However, you can take different approaches.

How To Fix Error Establishing a Database Connection

Here, we will discuss how to troubleshoot WordPress database errors for the three causes we have described above. For the sake of efficiency, it’s recommended that you try the following solutions in the order we present them.

Use WordPress’ Repair Database Feature

WordPress includes a hidden feature that can help you repair your database. If you cannot access a backup, you will have to move to a different solution, which is the Repair database feature of the CMS. It can help you fix all corrupted files. Keep in mind that this option is turned off by default, and thus you need to enable it before you can try fixing the problem with it. 

To do this, you will need a File Transfer Protocol (FTP) client, such as FileZilla, or the File Manager in cPanel. For this post, we will use the cPanel File Manager. Here is what you have to do.

  • Go to your WordPress root folder;
  • Look for the wp-config.php file, right-click it, and choose the Edit option. Click on Edit again after the window pops up, and that will open the file using your text editor.
  • Look for the That’s all, stop editing! Happy blogging line.
  • Paste the following code right above that line:
    define( ‘WP_ALLOW_REPAIR’, true );
  • Save the changes to the file and close it;
  • In your internet browser, navigate to www.yourwebsite.com/wp-admin/maint/repair.php (replace the placeholder with your own website’s URL) and click on Repair Database.

WordPress will then attempt to fix the corruption. If that happens, you should have access to your website. If the repair database feature fails, continue reading.

Check and Update Your WordPress Database’s Login Credentials

If the method above did not work, the problem most likely lies with your credentials. As we mentioned, WordPress is unable to establish a connection when using the wrong username and password, or if it’s trying to access the wrong database altogether.

It’s recommended to check your wp-config.php file, which is the main Database configuration file for your WordPress file, there you will notice a line for the Database Password, which should appear similar to:
> define( 'DB_PASSWORD', 'Password123' );

You can copy the password between the brackets and directly update the user with the same password via cPanel → MySQL® Databases. That way, you will ensure that the password set for the actual Database and the one in the wp-config.php file match and are proper. 

Restore Your WordPress Website From a Backup

In case everything else fails, backups are your last checkpoint when troubleshooting any website. If you have a recent working backup, just roll your site back to that state, and you should be back in business. If you are a FastComet client, you probably know that we provide daily backups for all our customers.

White Screen Of Death

The WordPress White Screen of Death is another frustrating error presented as either a completely white screen (Mozilla Firefox) or a generic error message (Google Chrome).

Diagnosing the White Screen of Death can be difficult, mainly because it can be caused by PHP and database errors. However, some tips can help you figure out what went wrong.

How To Fix WordPress White Screen Of Death

Deactivate Plugins

First, try to deactivate all of your plugins and reactivate them one by one. If you can’t access your WordPress dashboard, you can do this by renaming the wp-content/plugins folder over FTP, the cPanel File Manager, or SSH. By reactivating them one by one, you can figure out the specific plugin that might be causing the issue.

Change Back to your Default Theme

Change back to the most recent WordPress default theme (e.g., Twenty Twenty-One). Again, if you can’t access the WordPress dashboard, you can do this via the cPanel File Manager or an FTP client by renaming the folder for your current theme.

Increase the WordPress memory limit. You can do this by adding this code snippet to your wp-config.php file:

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

Enable the WP Debug tool and look for specific errors by adding this code snippet to your wp-config.php file:

define( 'WP_DEBUG', true );

Make sure to remove this code snippet when you’re finished!

If you do not have access to the site’s backend, you can easily change the theme by establishing an SSH connection and using a few simple commands. Once you gain SSH access, simply navigate to your website main directory, usually public_html, and issue the following commands:
wp theme list

This will provide you with a list of the available themes on your website. For example, it can appear as follows:

public_html]$ wp theme list
+--------------+----------+--------+---------+
| name         | status   | update | version |
+--------------+----------+--------+---------+
| Divi         | active   | none   | 4.6.6   |
| twentytwentyone | inactive | none   | 1.5     |
+--------------+----------+--------+---------+

In the above example, you can see that the active theme is the Divi one. Thus we can try and change it to the “twentytwentyone” one as follows:
wp theme activate twentytwentyone

This will activate the other theme instead. At that point, it’s recommended that you test the site again if the White Screen is still present. If the site appears to be working, the issue occurred due to the previous theme being used or a theme not being activated at all.

For some thorough information about this error, you can check your guide on How to Fix the White Screen of Death in WordPress.

500 Internal Server Error

500 Internal Server Error can sometimes be seen as just Internal Server Error. The message is shown when something goes wrong with your server. Since it’s such a generic message, the error can sometimes be difficult to diagnose. However, we have some tips that will help you with the troubleshooting.

How To Fix 500 Internal Server Error

Generate a New .htaccess File

To fix the 500 Internal Server Error, generate a new .htaccess file by doing the following:

  • Connect to your WordPress website with an FTP client or via cPanel’s File Manager.
  • Rename your original .htaccess file to .htaccess_old, for example;
  • Go to Settings → Permalinks in your WordPress dashboard;
  • Click the save button to force WordPress to generate a new .htaccess file.

Deactivate Plugins

If you have access to your WordPress admin dashboard, deactivate your plugins and reactivate them one by one. If you can’t access the dashboard, you can do this via FTP or the cPanel File Manager by renaming the plugins folder.

Switch Back to the Default Theme

Similar to plugins, you can do this via FTP or the cPanel File Manager by renaming the folder for your active theme (wp-content/themes/your_theme)

Increase your Site’s Memory Limit

Increase your WordPress site’s memory limit. Again, you can do that by adding the following code snippet to your site’s wp-config.php file:

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

Reupload wp-admin and wp-includes Folders

Reupload your wp-admin and wp-includes folders. You can do this by downloading a fresh copy of WordPress from WordPress.org, uploading the relevant files, and overwriting your host’s current files. As long as you only upload the wp-admin and wp-includes folders, you won’t overwrite anything important.

Check and Fix File Permissions

Checking if file permissions are set correctly is another thing you should do. If you have recently un-zipped an archive of files, there’s a chance those files are not set with the proper permissions, which are:

  • 644 – for files;
  • 755 – for folders;

A quick SSH command you can use to fix all permissions is the following:

find . -type d -print0 | xargs -0 chmod 0755 && find . -type f -print0 | xargs -0 chmod 0644

Make sure that you are in your website directory (public_html) before you type in the command.

403 Forbidden Error

The 403 Forbidden Error usually happens when there’s an issue with permissions on the site’s server. There could be an issue with one or more plugins or the file configuration on the website’s server.

How to Fix 403 Forbidden Error

To fix the error, you need to ensure that your site’s files have the proper permission codes.

Again, as with the 500 Internal Server Error, generate a new .htaccess file. 

Furthermore, you can also try to deactivate all your plugins and then activate them one by one to see which of them is the faulty one. If you can’t do this from your WordPress dashboard, do it via FTP or the cPanel File Manager by renaming the plugins folder.

404 Page Error

It’s close to the 403 error, but the 404 page error is a bit more annoying. It can come up in all kinds of places, but it’s usually not difficult to fix.

How to Fix 404 Page Error

The easiest way to fix the error is to go to Settings → Permalinks in your WordPress dashboard and click Save Changes.

WordPress will update the redirect code that’s contained in your .htaccess file, and that should hopefully fix the issue.

Additionally, you can check our thorough blog post on How to Fix Error 404 Not Found.

Connection Timed Out

The Connection Timed Out error is most commonly caused by low-quality shared hosting with a low memory limit. Basically, your server is overworked and doesn’t have the power to respond to all of the requests it’s getting, so it throws this error message instead.

If you are a FastComet client or in case you plan to become one, feel free to check our pricing. Of course, you are welcome to come by our Live Chat and ask for some assistance when picking the best plan for your business.

How To Fix Connection Timed Out

Increase your site’s memory limit. Giving your site a little more power can fix the issue. Use an FTP client or the cPanel File Manager to add this code snippet to your site’s wp-config.php file:

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

Additionally, if that does not work, you can try deactivating all of your plugins and reactivating them one by one. Yes, that’s something that can be the cause of a lot of errors. We’ve already mentioned it a few times in this post alone. Plugins and themes are cool, but some of them can be problematic. Make sure that you update all your plugins as soon as you have to.

Briefly Unavailable for Scheduled Maintenance Error

If you stumble upon the “Briefly Unavailable for Scheduled Maintenance” error in WordPress, you should know that it’s most likely because of an unfinished or interrupted WordPress update.

When WordPress is in the process of updating, it puts your site in maintenance mode. In case that update is interrupted for some reason, WordPress can’t get a chance to get your site out of that maintenance mode. If that happens, your site would not be available for both admins and visitors.

How to Fix Briefly Unavailable for Scheduled Maintenance Error

Getting your website out of maintenance mode is quite easy. All you have to do is delete the .maintenance file from your site’s root folder. Again, to do that, you can use an FTP client like FileZilla or the cPanel File Manager.

If you can’t find the .maintenance file in your WordPress root directory, then make sure you checked your File Manager to show hidden files.

Once you have removed the .maintenance file, your website will come out of the maintenance mode, and the error will be fixed.

Parse Error/Syntax Error

This error is most likely to pop up right after you have added custom code to your WordPress site. The Syntax Error means that you made a mistake somewhere in the code. That mistake could be as simple as a misplaced comma. Due to its sensitive nature, this error can be quite irritating.

How To Fix Parse Error/Syntax Error

Fixing the Parse/Syntax Error is not too difficult — the easiest way to do that is to remove the offending code snippet that you previously added.

Fortunately, the error message should also tell you in specifics (the exact line) where the code needs correction. If you are code-savvy and can figure out the mistake, you can use the information from the error and quickly fix your code without having to remove the entire snippet. 

Consider using an online syntax checker, such as PHPCodeChecker.

Missed Schedule Post Error

You probably know that WordPress has an awesome feature that allows you to schedule posts for them to be automatically published at a time of your choosing. Many bloggers rely on that feature because it helps them manage their schedules with ease.

Of course, due to the nature of this post, it’s clear that something could go wrong when scheduling your posts. Sometimes WordPress misses scheduled posts due to several reasons. If that happened to you more than once, it’s best that you address the issue.

How to Fix the Missed Schedule Post Error

Start with installing and activating the WP Missed Schedule fix failed posts plugin. The plugin is available on GitHub.

That plugin will look for posts that have missed their scheduled time. When it finds such a post, WP Missed Schedule will publish it properly. The plugin is made to be optimal and not take too much of your server’s resources. That’s why it goes through your scheduled posts every 5 minutes and fixes 5 items in every cycle.

Another common issue that WordPress beginners often face is when the website’s sidebar appears below the content when it should be next to the content. This issue is most likely caused by WordPress themes.

Sometimes when you add code snippets to your site, you may accidentally forget to close an HTML div tag or even add an extra closing div. That may result in breaking the layout of the theme. Another commonly seen cause of the Sidebar Below Content Error is the use of disproportionate width in CSS or not clearing float correctly. 

How to Fix the Sidebar Below Content Error

What you have to do here is to look through everything that you have changed recently. If you made HTML related changes, added a plugin, or if a specific post has <div> blocks in it — make sure to close them properly. Consider using the W3 Validator to help you find your errors.

If you are the one creating a custom theme and you stumble upon that issue, there could be a few problems. Those could be improper width ratio and float property. For example, if your entire container is 1024px and your sidebar is 300px, make sure that the rest space is properly used (eg., 600px for your content + 64px margin between the content and the sidebar). As for the float property, make sure that you add float: left; and float right to the appropriate elements.

This Site is Experiencing Technical Difficulties

WordPress introduced a fatal error protection feature in WordPress 5.2. The feature displays a simple error message stating, “This site is experiencing technical difficulties.”

To provide full details, WordPress then sends you an email notification on your WordPress admin email address. The message contains a link that leads to the backend where you can attempt to fix the error.

The error message can be triggered by any of the fatal errors mentioned in this post. If you do not have access to the admin email or cannot get WordPress emails, it will be harder to find out what error you have to fix.

How to Fix This Site is Experiencing Technical Difficulties

The easiest way to fix/prevent this is to ensure that your WordPress admin email address is correct, and you can receive your notification emails.

Conclusion

That concludes our guide on 11 of the most common WordPress errors. If what you stumbled upon is not on the list, you may want to google the problem and find the solution that way. Another alternative is finding a WordPress developer to help you.

However, you can also count on our technical support experts and contact them by submitting a ticket. 

If you have something to ask or add regarding this post, feel free to use the comment section.

Joseph

Joseph is part of the FastComet Marketing team. With years of content writing experience behind him, it's one of his favorite activities. Joseph takes part in the SEO of the FastComet website and blog. His goal is to write comprehensive posts and guides, always aiming to help our clients with essential information. Joseph also has a thirst for knowledge and improvement, which makes the hosting environment a perfect place for him.