FB Pixel

5 Common WordPress Errors (And How to Fix Them)

Encountering any type of error on your site is never a fun experience, especially if you’re not sure how to fix the underlying problem. While WordPress is usually relatively free from errors, when one does occur it can sometimes be frustratingly difficult to interpret.

Fortunately, most common WordPress errors can be addressed by almost anyone, even if you have little technical know-how. As long as you understand what causes each issue, you’ll be able to diagnose and take care of the problem to get your site back on track.

In this article, we’ll introduce you to five of the most common WordPress errors, and show you how to resolve them on your own. Let’s get started!

1. The White Screen of Death (WSoD)

Let’s start with a big one. As its dramatic moniker implies, the White Screen of Death (WSoD) is one of the most intimidating issues you can face as a WordPress user. In short, this error will replace your entire site, including your admin dashboard, with a featureless white screen:

The WordPress White Screen of Death (WSoD)

With no error message or obvious access to your files, this might seem like a total disaster. However, there’s no need to worry. While there are a number of things that can cause the WSoD to occur, fixing it is usually straightforward.

In fact, we’ve already covered how to diagnose and fix the WSoD error in depth before, so we recommend that you check out our full guide. To summarize, the process involves performing the following actions in order, until the issue is resolved:

  1. Check your plugins. The most likely culprit is one of your plugins, usually due to incompatible or incorrect code. The easiest way to find out is by disabling all of your plugins to see if that resolves the problem. If you can’t access your admin area, you can do this by using a File Transfer Protocol (FTP) application. We recommend FileZilla, as it’s free and easy to use.
  2. Replace your current theme with a default option. You can also try deactivating your theme, to see if it’s the cause of the WSoD. Once again, access your site’s files using FTP, and then simply change the name of your current theme’s directory. This will automatically activate one of the default WordPress themes instead. If this brings your site back to normal, you’ll know that your theme is at fault.
  3. Increase your site’s memory limit. Your site’s memory limit determines how much memory is allocated to the PHP that runs WordPress. If it doesn’t have enough to function, you can manually increase the limit by using FTP to edit your site’s wp-config.php file.
  4. Activate WordPress’ debug mode. If all else fails, you can activate the WordPress debug mode. This is a useful, mostly-hidden feature of WordPress that shows you error information directly on your site. Once again, you’ll need to edit wp-config.php to activate (and then deactivate) this feature.

Once you’ve found the cause of the WSoD, you may need to take further steps to resolve it. For instance, if a plugin or your theme is causing the problem, you’ll likely want to start looking for a replacement. Alternately, you can reach out directly to the developers for more information and support.

2. Parse Error

This error is significantly easier to deal with than the behemoth that is the WSoD. While that issue gives you no useful information, the parse error will actually tell you what the problem is and where you can find it:

A Parse Error message on a WordPress site.

This error appears when there is an issue with your site’s code. In the above example, the issue appears to be a simple syntax error in our theme’s functions.php file. To fix this kind of error, you’ll need to use FTP again.

Log in to your site using the FTP credentials supplied by your web host, and then access your current theme’s directory. You’ll usually find this at /public_html/wp-content/themes/your-theme-name:

The functions.php file viewed in FileZilla.

Right-click on the functions.php file and select View/Edit, which will open the file in your default text editor. You can now look at the line specified by the parse error, in order to diagnose the problem. In our case, the error occurs on line 597, so let’s take a look in that location:

A functions.php file containing a syntax error.

As it turns out, there’s a missing apostrophe on this line. All we’ll need to do now is add that apostrophe back in and save the file.

After fixing whatever code issue you find on your own site, be sure to upload the file you edited back to your server. This should resolve the parse error. If not, you may see additional syntax problems when you next visit your site, which you’ll need to fix using the same method.

3. Internal Server Error

The internal server error can be a tricky one. Despite its name, it’s rarely caused by a problem with your server. Like the parse error, it appears in place of your site, but this time with decidedly less helpful information:

The Internal Server Error message.

There are a few reasons why you might see this error. For example, your site may have reached its memory limit, as we talked about earlier. However, the most common culprit is a corrupted .htaccess file. Without getting too technical, this file contains a set of rules for your server, concerning tasks such as denying access to malicious users and handling links.

If this file is corrupted, which could happen if a plugin has rewritten it, the fix is simply to replace it with a new, clean version. To do that, fire up FTP once again, and access your site’s root directory. Look for the .htaccess file within:

The .htaccess file viewed in FileZilla.

You’ll want to deactivate this file, which you can do by simply renaming it. You can now check your site to see if this has resolved the issue. If so, you can create a new .htaccess file directly from your admin dashboard. Go to Settings > Permalinks, and simply click on Save Changes:

Generating a new .htaccess file in WordPress.

This will generate a new, uncorrupted .htaccess file. If the issue is resolved, you can delete your old, renamed version. However, if this doesn’t resolve the issue, you may need to increase your memory limit, as we covered in a previous section.

4. Error Establishing a Database Connection

Unlike the previous issue, this error actually does fit its name, since it indicates a problem with your database. In short, you’ll see this error when your site cannot connect to its database. This is an issue since your database contains all of your site’s content.

There are plenty of technical reasons why the error establishing a database connection issue might occur. Fortunately, you won’t have to deal with them directly. This is because WordPress includes a tool for repairing your database, called Automatic Database Optimization. It enables you to repair and optimize your databases, and to use it you only need to make a minor change to one of your site’s files.

Access your site via FTP, and once again locate the wp-config.php file we mentioned in a previous section:

The wp-config.php file viewed in FileZilla.

Open that file, and add the following line:

define( ‘WP_ALLOW_REPAIR’, true );

This will activate the repair tool. Be aware that this tool can be accessed by any user, even if they are not logged in to your site. As such, you’ll need to remove this line as soon as you’re finished troubleshooting.

However, for now, you can access the tool by opening your browser and navigating to https://yoursite.com/wp-admin/maint/repair.php (replacing yoursite.com with your site’s domain):

The Automatic Database Optimization tool.

You can use either option listed here to start the repair process, which will take a few moments to complete. Once it’s done, a message will let you know what happened:

Automatic Database Optimization completed.

You can now check your site to see if this fix has resolved the issue. If not, you may need to contact your web host for more assistance. Finally, don’t forget to deactivate the database repair tool.

5. The 404 Error

Finally, we come to one of the most well-known (and loathed) errors on the internet. You’ve most likely been faced with the 404 error multiple times before. It simply indicates that the page you’re trying to view doesn’t exist (or can’t be found):

An example of a 404 error in WordPress.

This is usually due to a faulty hyperlink, or happens because the page’s URL has been changed without redirection. However, in some rare cases, it can occur even if the URL is correct. In those instances, the problem can usually be found in the .htaccess file. We mentioned earlier that this file is in charge of your site’s permalinks. If it’s incorrectly configured or corrupted, it can lead to 404 errors appearing where they shouldn’t.

You can resolve this issue by generating a new file, as we covered in a previous section. However, if you are unable to access your admin dashboard, or if that method doesn’t resolve the problem, you can also create a new file manually.

All you need to do is create a new text file, using an editor such as TextEdit or Notepad. You’ll need to give it the exact file name .htaccess (with no additional file extension). Then, you’ll want to paste the default code for WordPress sites into this file:

# 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

Save the file and use FTP to upload it to your site’s root directory, replacing your old .htaccess file. This should solve the 404 error in most cases. If you’re still experiencing problems, however, you may want to check your site for broken links.

Conclusion

Few things are as frustrating as encountering an unexpected error on your website. Many common issues can also be infuriatingly vague, leaving you with little information about what the problem is or how to fix it. Fortunately, once you understand what each type of error message means, it’s usually straightforward to fix.

In this article, we’ve discussed some of the most frequent WordPress errors you may encounter, and shown you to deal with them if they occur on your site. These include the:

  1. White Screen of Death (WSoD)
  2. Parse error
  3. Internal server error
  4. Error establishing a database connection
  5. 404 error
  6. Connection timed out error

Do you have any questions about resolving any of these (or other WordPress-related) errors? Let us know in the comments section below!

Image credit: Pixabay.

Author

Will Morris

Will Morris

Will Morris is a staff writer at WordCandy. When he's not writing about WordPress, he likes to gig his stand-up comedy routine on the local circuit.

You’ll be joining a community of highly-vetted digital agencies and web professionals with one common goal — growth! Learn more. 

E-books

The Landing Page Builds service includes:

  • Unlimited page builds for one monthly rate
  • Dedicated account manager
  • Dedicated WordPress developer
  • At least 2 hours of daily dev time
  • Daily progress reports
  • Find out more here

The Content Edits Plan includes:

  • Unlimited content edits
  • White label help desk
  • Support ticket dashboard
  • 24/7 team of WordPress experts
Plus, everything in our Maintenance Plan:
  • Visual Validator WordPress updates
  • 90 days of off-site backups
  • Daily security scans and malware cleanup
  • Maintenance dashboard
  • Find out more here

The Maintenance Plan includes:

  • Visual Validator WordPress updates
  • 90 days of off-site backups
  • Daily security scans and malware cleanup
  • Maintenance dashboard
  • Find out more here