How to Fix the 9 Most Common WordPress Errors

WordPress error… The worst way to start a Google search – learn how to fix the 9 Most Common WordPress Errors here.

How to Fix the 9 Most Common WordPress Errors

WordPress is the most used CMS on the planet and powers around 29% of the global internet. It is the first choice for millions of people, including developers, when they need to create an SEO optimized website, eCommerce site or blog. It is also the best tool to take your business or brand to your targeted audience.

With so many positive factors, there are certain “common errors” that many people run into on WordPress. This article covers the 9 most common WordPress errors and more importantly, how to fix these common WordPress errors.

 

1. Error establishing a database connection WordPress

Error establishing a database connection WordPress

This is a pretty terrifying error message to see when working with WordPress. It will break your site and can even make it pretty hard to access the admin in most cases. Chances are that you’ve accidentally done something to break the connection between your WordPress website and the database that holds all your information.

Finding and correcting an error establishing a database connection in WordPress is a total pain in the ass.

If you’re managing your own site — you don’t want to do this.

It is far better to take a preventative or at least prepared course of action by using a WordPress host that will resolve the issue for you; such as WP Engine.

If you have already run into this issue and need to resolve it yourself, walk through these steps on Kinsta’s blog.

2. Locked out of WordPress admin

 

If you have found that you have been locked out of your WordPress — the first thing that you need to do is try to recover your password available from the given WordPress login screen.

In the case that you don’t receive the reset email, well, then there could be one of several issues that will need troubleshooting. Lost admin privileges can range from simple to pretty complex, but the folks at mythemeshop have put together a great video to help you straighten it out:

 

3. WordPress Stuck in Maintenance Mode

 

Chances are that if you’re seeing this message you just updated a whole bunch of plugins on your WordPress site. It’s tempting to update everything at once, but you’ll quickly find this can cause problems.

If your website is stuck in maintenance mode, it means the .maintenance file was left behind after updates were performed. To fix the issue, you can simply remove the .maintenance file. The easiest way to do this is via SFTP.

In the document root of your website, there will be a file named .maintenance. Right-click the .maintenance file in the list, and select to delete or remove it.

wordpress stuck in maintenance mode

 If you can’t locate this file or the .maintenance file seems to be missing, please contact your hosting company.

 

4. WordPress 404 error Page or Post Not Found

 

The main cause of this error is the .htaccess file.

There are actually several variations of this error, but they all mean that a page can’t be found.

In 99% of such cases, these problems will disappear just by making some simple clicks on the save changes button on the Permalinks Settings page found on your WordPress Admin dashboard. This will force WordPress to rewrite the .htaccess file generally fixing the errors.

If you are getting the 404 error on all the WordPress pages but not the home page, you should fix the problem using the following steps:

  • Log into the dashboard
  • Click on ‘settings’ and then on ‘permalinks’
  • Click on ‘select the default setting’
  • Click on ‘save’
  • Now revert the settings back to previous form
  • Click on ‘save settings’

 

If this does not work, you will need to edit your .htacess file with new code by resetting the rewrite rules of the file .htaccess. But this will require that you access your WP site using an FTP server.

Follow these steps to set up an FTP client:

  • Download an FTP client (if you don’t already have one, click here for a list of the best)
  • Open the FTP client
  • Enter your website’s name
  • Enter your domain name in the ‘host’ section
  • Leave the ‘port’ section blank
  • Select FTP for ‘protocol’
  • Select plain FTP for ‘encryption’
  • Select normal as the ‘logon type’
  • Then enter your control panel’s username and password
  • click on ‘connect’ for connecting the FTP

Follow these steps to reset the rewrite rules:

  • Open your WP site’s root directory within the FTP client
  • Click on ‘server’
  • Select the option ‘force showing hidden files’ (this is important for showing all the hidden files because the .htaccess file may also be hidden by default.
  • Right click on the .htaccess file
  • Click on ‘file permissions’

Now you should make the .htaccess file writable.

*This can be done by using the following steps: (it can be risky editing your htaccess file, if you don’t feel comfortable doing this contact your hosting provider or a developer).

 

  • Enter the value 666
  • Click on ‘save’
  • Click on ‘refresh’
  • Go to WordPress and open ‘permalink settings’
  • Click on ‘save changes’
  • Go back to the FTP client and make changes to the .htaccess’ file permissions to 644
  • Refresh the client

 

5. WordPress White Screen PLEASE HELP ME!

Wordpress error white screen of death

This is the most dreaded error found in the WordPress community and is also referred to as the White Screen of Death or WSoD. When this error occurs, you won’t see an error message stating the reason. Oh, and you’ll be locked out of your WordPress admin — because that’s always helpful.

Again, this is the type of error where having the right WordPress hosting makes a huge difference.

Why?

Because the simplest and quickest way to resolve this problem is to have the ability to “roll-back” to a recently saved back up point.

If restoring your website is not an option, you’re most likely going to have to walk through a series of time consuming steps to figure out the culprit and fix the issue. If you have to do that, click here, for Kinsta’s Detailed Guide on this process.

 

6. An Automated WordPress Update Has Failed

It is important to keep WordPress updated always.

Most of the time, it will update automatically and everything goes as it should, but every once-in-a-while you do run across a failed auto-update.

It could be from something as stupid as an interrupted internet connection or also very commonly caused by file permissions. In case like the latter you can even run into the dreaded WSoD, or notice some warning errors.

The easiest fix:

1. Delete your maintenance file as illustrated in Step 3 Above.

If that fails, click here, and follow the steps outlined.

 

7. Issues in image uploading

 

The image upload issue in WordPress is typically caused by incorrect file permissions. Your WordPress files are stored on your web hosting server and need specific file and directory permissions to work.

Wrong file permissions prevent WordPress from reading or uploading file on the hosting server. You may get the following error when uploading image file:

‘Unable to create directory wp-content/uploads/2019/04. Is its parent directory writable by the server?’

For complete instructions on resetting your file permissions and resolving common WordPress image upload issues – Click Here.

 

8. WordPress 403 Forbidden error

 

The WordPress 403 Forbidden error is the consequence of a server refusing a request due to a lack of proper permissions. Therefore, it makes sense to start your troubleshooting by checking whether your WordPress files have the correct permissions.

I really hate this, because typically you end up spending more time trouble-shooting the issue rather than fixing the issue.

I hate to say it again, but in this scenario — I would opt for the roll back to your most previous back up point.

If you can’t do that then watch this video from WP Beginner:

 

 

 

9. Syntax error

 

Sometimes, when you are changing the code of WordPress, it might result in different syntax errors. Fortunately, WordPress will inform about the file that caused the error and locates the line has an error in the code. Just making the right alterations will be enough to fix the issue.

Other times this error can keep you from making any edits or updates to your site, but don’t worry — this can be fixed relatively easily. Just watch this video:


 

Final thoughts

 

WP is the strong platform but just like any software platform — there’s opportunity for error. The above errors are the common ones and by now you might have known to fix them to make efficient use of them.