WordPress

12 Common WordPress Errors (And How to Fix Them)

Written by Ellice

Nothing can sully your day quite like an unexpected error with your site. Thankfully, WordPress is generally a well-oiled machine that isn’t likely to throw errors at you for no reason. However, when a problem does appear, it can be frustrating, especially if you don’t know how to try and fix it.

While many errors can seem intimidating at first glance, most WordPress issues stem from relatively small problems that are usually easy to deal with. As long as you understand the source of the problem, you can typically perform some basic troubleshooting on your own.

To help you out, this article will show you how to diagnose and correct 12 of the most common WordPress errors. If your problem is not listed here, you’ll want to check out the official list of common issues. What’s more, if your site is hosted with DreamHost, you can always reach out to our 24/7 customer support. Let’s start from the top!

Whatever your goals or expertise, DreamPress makes your WordPress site fast, secure, and successful. Upgrade today!

1. Parse Error/Syntax Error

Let’s start with an easy one. While many of the errors we’ll be looking at can be frustrating due to how little information they give you, the ‘parse error’ (or ‘syntax error’) is at least helpful enough to tell you exactly what’s wrong.

This error occurs when there is an issue with your site’s code, most commonly in the functions.php file. Instead of loading your page, a simple message will appear, which explains what the issue is and where it occurred.

To fix the problem, you’ll need to access the specified file using SFTP. We’ll be using FileZilla, as it’s a free and open-source tool. Just use the SFTP credentials provided by your web host, and access your site’s backend.

Then, you need to find the file in question. In the example pictured above, you can see that the problem is in the functions.php file for the site’s current theme. As such, we’ll access that theme’s folder, right-click on functions.php, and select View/Edit.

If you check the Parse error message, you can see that it even tells you on what line the problem exists. Now we just need to find that line and fix the problem. In our example, it’s a simple case of a missing parenthesis, so let’s sort that out.

Save your file, and select Yes when your FTP client asks if you want to replace the existing file on the server. You should now be able to check your site and see that it’s back to normal.

2. White Screen of Death (WSoD)

One of the most infamous and cryptic errors in WordPress is the dreaded White Screen of Death (WSoD). This error simply replaces your entire site with a blank, white nothing, leaving no error messages or further assistance.

This problem can occur for a variety of reasons and usually means your site couldn’t be loaded properly. As such, there are several methods for troubleshooting it.

We’ve actually covered how to fix the WSoD before on this blog, so we recommend that you check out our comprehensive guide to this error. However, here’s a quick summary of the things you can do to troubleshoot this particularly tricky problem:

  1. Disable your plugins. The most likely culprit behind the WSoD is a faulty plugin, so try disabling them all and see if that fixes the problem.
  2. Disable your theme. Your theme can also cause this issue, so use SFTP to replace it with one of WordPress’ default themes.
  3. Activate the WordPress debug mode. This is a useful feature that lets you see errors directly on each page, which can help you pinpoint the underlying cause of the WSoD.
  4. Purge your cache. Finally, your site’s caching solution could cause you to see outdated files even if the WSoD has been fixed. Therefore, you’ll want to clear your cache and see if that resolves the problem.
  5. Raise your memory limit. Your site might have run out of memory. You can raise your maximum limit by editing your php.ini file.

These methods will fix the WSoD in the vast majority of cases. However, if you’re still experiencing issues, you should contact your host’s support team for more help.

3. Internal Server Error

The Internal Server Error is another issue that can be frustratingly opaque about the underlying problem.

Fortunately, this error has fewer potential causes than the WSoD. It will appear when an unknown issue occurs with the server, and is generally caused by one of the following:

  • There’s a problem with your site’s .htaccess file.
  • Your site has reached its memory limit.

In simple terms, .htaccess is a file that dictates how your site communicates with its server. This file can be used to increase your site’s security, and to override some of the default server settings. To test and see if this file is causing the Internal Server Error, all you need to do is disable it.

You can do this by once again using SFTP. The file is usually located in your site’s root directory, which is often titled public_html.

To disable the file, just change its name. For example, if you rename it .htaccess-disabled, you can then check your site to see if the issue is resolved.

If this does fix the problem, all you need to do is generate a new, bug-free .htaccess file. You can do that by going into your admin dashboard and accessing Settings > Permalinks.

You don’t need to make any actual changes here. Just click on Save Changes to generate a new .htaccess file. This should hopefully resolve the issue.

If it doesn’t, you may need to increase your PHP memory limit. If that’s the case, we have a complete guide on how to do that. If you find that you can’t increase your limit further, you might also want to consider upgrading your current hosting plan.

4. 404 Error

The 404 Error should be familiar to most internet users.

It signals that the server was unable to find the requested page. This error is most commonly associated with broken links and changed URLs, but it can also occur even if the page you’re looking for should be available.

When this happens, the most likely cause is again the .htaccess file. This file also handles your site’s hyperlink structure, and it’s possible that it could be redirecting your URLs incorrectly. Your first step should, therefore, be to regenerate a new .htaccess file, using the steps we outlined in the previous section.

However, in the unlikely event that this doesn’t resolve the error, you may need to re-upload .htaccess. The easiest method is to create a new file, give it the name .htaccess (don’t forget the period, and you don’t need to add a file extension), and paste in the following default code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

You can now upload the file to your site’s root folder. In most cases, this should resolve the 404 error you’re seeing.

5. Error Establishing a Database Connection

As the name suggests, this error will appear if your site can’t access its database. In case you’re unfamiliar with the term, your site’s database is where all its content is stored. This includes your posts, pages, and user information. As such, if you can’t access the database, your site won’t be able to function at all.

There are a few reasons this error can occur, but most of them stem from a single file on your site, namely wp-config.php. This file contains all the information about your site’s database, so it’s the most likely origin for this type of issue.

To repair the connection, access your site’s wp-config.php file, which should be located in its root folder.

Right-click on the file, and select View/Edit. You’ll first want to check that the credentials in the file are correct. To do that, you should access your phpMyAdmin to find the exact details. If the hostname, username, password, and/or database name in the file are incorrect, replacing them should fix the error.

However, if the error persists, you may need to activate WordPress’ automatic database optimization tool. This feature can be used to repair corrupted databases, and can be turned on by adding the following line to your wp-config.php file:

define( 'WP_ALLOW_REPAIR', true );

After saving the file and uploading it back to your server, you can run the new script by navigating to https://yourwebsiteurl.com/wp-admin/maint/repair.php in your browser. The resulting page will look like this:

All you need to do is click on either of the buttons to run the repair tool. When the process is completed, the page will reload, and you should see a message telling you that the database tables have been fixed.

This should deal with your database connection error. Just don’t forget to remove the line WP_ALLOW_REPAIR from wp-config.php when you’re done.

6. Connection Timed Out Error

You’ve probably seen this error show up after a site has tried (unsuccessfully) to load for some time. It means that the server is struggling to load the site, and has essentially given up.

This could happen for a variety of reasons, the most common of which is that your site doesn’t have the resources it needs to function properly. For example, if you’re using shared hosting, another site could be hogging your server’s resources. Alternately, perhaps your site has exceeded its maximum allowed bandwidth.

As such, you might want to consider upgrading your hosting plan if you see this error occur multiple times. A higher-tier plan will help you avoid slowdowns and downtime, as your site will have more server resources and won’t be affected if other sites see a surge in traffic.

The ‘connection timed out’ error can also occur if your site is causing a lot of strain on the server. Therefore, we recommend that you optimize your site for speed, get rid of any resource-hogging plugins, and check your theme to see if it’s dragging down your performance. Once again, you might also want to increase your PHP memory limit.

7. Your Site’s Sidebar Appears Below the Main Content

There may come a time when you find that your trusty sidebar has moved from its usual position next to each page and post’s main content, and has instead decided to hang out right underneath.

This is almost always the result of an issue with your theme’s HTML or CSS code. As such, this error is likely due to a recent change to your theme. If you’ve edited any of your theme files lately, try reverting them to their previous states, to see if that resolves the problem.

More specifically, there are two main things you should look out for when troubleshooting this problem:

  • Leftover <div> tags: These tags are used to add HTML elements, and if one is not opened or closed properly, it can cause the sidebar to move.
  • Incorrect margins in CSS: If the margins are not set correctly in your style.css file, the sidebar may not have the space it needs beside your main content.

Examine your theme for these issues, and you should be able to find the source of the problem. You can also run the affected page through the W3C Markup Validation Service, to help you find the source of the error faster.

8. You’re Unable to Upload Images

There are a few different ways images can ‘break’ on your website. They may appear incorrectly after you upload them, or you might not be able to upload them at all. Either way, the issue most likely stems from incorrect file permissions.

Essentially, this means the site doesn’t know that you’re allowed to add and access the files with which you’re trying to work. This can occur if your site gets hacked, or if a plugin has accidentally rewritten your permissions. Fortunately, there’s an easy fix.

Once again, you’ll want to access your site using SFTP. This time you’ll want to find the uploads folder, which is located in the wp-content directory.

However, you don’t want to open this folder. Instead, right-click on it and select File permissions. This will open the folder’s permission settings.

You’ll want to set the Numeric value to 744, as this will let the owner (i.e., you) read and write uploads. Click OK when you’ve done this, and the new permissions will be applied.

You’ll need to repeat the same process for all files inside the folder, so now right-click on uploads and select File permissions again. This time, you’ll want to set the value to 644 and check the Recurse into subdirectories option. You also need to select Apply to files only.

When you save your changes, your site’s Media Library should once again be working as normal. You can check this by uploading an image in your admin dashboard. If there are still issues, you can repeat the above process, but set the uploads folder’s permission value to 755 instead of 744.

9. You’re Unable to Access the Admin Area

The errors we’ve discussed so far have all been due to technical issues. However, getting locked out of your admin dashboard is a little different. In short, this generally happens when you forget your password.

Now, there’s no need to panic. Just because you’ve lost your password doesn’t mean you can’t access your site. First of all, you can click the Lost your password? link on the login page. This will let you recover your password by entering your username or email address.

In the vast majority of cases, this will do the trick. However, in rare instances there may be an issue with this feature, it could be disabled or maybe you don’t have access to the email you signed up with.

If that’s the case, it is possible to use phpMyAdmin to reset your password. However, using this method can be risky as you might accidentally cause problems with your site or database. As such, you should only use this method as a last resort. The process itself will vary depending on your web host and setup, but we’ll be using the DreamHost control panel in our example.

After you’ve logged in, click on Domains and select Edit for the site you want to access.

Next, open up phpMyAdmin.

Here, you’ll need to find your user table, which is usually called wp_users or something similar. Once you’ve located it, find your specific user account and click on Edit.

You can now change your profile’s information, including its password. Replace the current string in the user_pass row with whatever password you want to use.

You should also set the function drop-down menu to MD5, as this will encrypt the password. Once you save your changes, you can go ahead and log in again using your new password.

10. WordPress Is Stuck in Maintenance Mode

Maintenance mode is an automatic feature that temporarily disables your site while it’s being updated. This is to avoid situations where users try to use functionality on your site just as you’re updating it, which could cause problems.

Usually, the update process is so quick that you don’t even notice the change. However, if the update had to cancel before it was complete, you might find that your site is stuck in maintenance mode indefinitely.

The good news is that this is a very easy problem to fix. All you need to do is fire up SFTP again, access your site’s root folder, and delete the file called .maintenance.

This file is what activated maintenance mode, so removing it will revert your site back to normal. However, you’ll also need to retry the failed update, as this error means that it didn’t successfully complete.

11. Missed Scheduled Post Error

The ability to schedule posts ahead of time is one of WordPress’ more useful features. You can line up posts in advance, leave the site alone, and have content automatically published at the times you set.

However, sometimes this system fails, and you’ll notice a Missed schedule error next to a post.

Without getting too technical, this problem is due to something called ‘cron jobs,’ which are tasks that WordPress uses to automate certain processes. If the appropriate cron job does not trigger when your post is scheduled, it will fail to publish and remain in your admin dashboard until you do so manually.

The best way to avoid this error is to use a plugin, and there are a few options at hand. One that we recommend is Scheduled Post Trigger.

This is a free and very lightweight plugin, which ensures that the cron jobs responsible for publishing scheduled posts run as expected. By activating it on your site, you can rest assured that your scheduled posts will publish on time from now on.

12. WordPress Failed to Auto-Update

Keeping your WordPress site updated at all times is vital. We’ve hammered home this point for years, and it remains one of the most important pieces of advice we give every website owner. If you have a managed WordPress hosting plan, you usually don’t need to do this yourself, since new WordPress updates will be applied for you.

However, occasionally something goes wrong, and the automatic update will fail.

This is highly irregular, of course, but it can happen. It’s usually due to a glitch in the server’s connection with your WordPress files, incorrect file permissions (which we discussed earlier), or an unreliable internet connection.

If WordPress fails to auto-update, you may be hit with the WSoD, or notice warning errors when you try to access your site. To fix this, you will need to manually update WordPress, by downloading the latest version of the software and installing it on your site using SFTP.

However, if your site is hosted with DreamHost, this process is made much easier. This is because you can simply upgrade your site straight from your dashboard. After that, everything should be back to normal.

Trial and Error

Experiencing issues with WordPress is blissfully rare, but when it does happen it can be quite frustrating. However, fixing most of the problems you’ll encounter is usually easier than it might seem at first glance.

Do you have a question about any of these errors, or have you encountered another issue that’s giving you a headache? Join the DreamHost Community and let’s discuss!

About the author

Ellice

Ellice comes to us from House DreamHost, the first of her name, Gatekeeper of All Things Content, Protector of the Brand and Ruler of Social Realms.

tl;dr - Ellice is the Content Marketing Manager at DreamHost and oversees all social media and content efforts.