Did you just try to access your WordPress site only to be met by some nasty message like “Internal Server Error” or “Error Establishing A Database Connection”?
While WordPress is stable most of the time, the times when it’s not can be astoundingly frustrating.
To help you get your site working again, we’ve put together this list of five common WordPress errors. While these errors are not the only ones that you’re likely to encounter, they represent some of the most common issues that most sites will face.
Let’s jump right in because we know you’re anxious to get your site working again!
What You Need To Fix Most Of These Common WordPress Errors
While you don’t need to be a coding genius to fix most of these errors, you do need at least a basic understanding of how to use FTP to access the files on your server directly.
To do that, you’ll need:
- An FTP program – FileZilla is a good free option.
- Your FTP credentials – you should be able to get these from your host.
If you’re not sure how to actually connect and manage your files, this WikiHow article has a good introduction to the process.
Once you’ve got the FTP details squared away, you’re ready to start fixing errors! Let’s get going, starting with the…
1. Internal Server Error
The Internal Server Error, sometimes known as 500 Internal Server Error, is a generic message that you see when something goes wrong with your web server. This makes it a little hard to diagnose (because it just means “something” went wrong). But here are some of the most common ways to fix it:
How To Fix Internal Server Error On WordPress
- Force WordPress to generate a new .htaccess file. To do this, rename your current .htaccess file to .htaccess_old via FTP. Then, head to Settings → Permalinks in your WordPress dashboard and just click the Save button to make WordPress generate a new .htaccess file.
- Deactivate all of your plugins. Then, reactivate them one-by-one to find the culprit. If you can’t access your WordPress dashboard to deactivate plugins, you can deactivate your plugins via FTP by renaming the wp-content/plugins folder.
- Increase PHP memory limit. To do this, add the following code snippet to your wp-config.php file via FTP:
- Reupload your wp-admin and wp-includes folders. Download a fresh copy of WordPress from WordPress.org. Then, upload just the wp-admin and wp-includes folders to your server. Make sure to overwrite files when you upload them.
2. Error Establishing A Database Connection
All of your WordPress content is stored in a database. Usually, WordPress is able to retrieve this information whenever WordPress needs to load a page. But if WordPress is unable to communicate with your database, it will throw this error instead.
How To Fix Error Establishing A Database Connection In WordPress
- Use the WordPress database repair tool to fix a corrupted database. This tutorial from 000webhost.com shows you how to access this tool.
- Create a fresh set of database credentials. You can do this via cPanel. Then, you’ll need to edit your wp-config.php file and add these new credentials.
- Contact your host’s support staff. Your host might be experiencing issues with its database server. If that’s the issue, you won’t be able to fix things without their help.
3. Parse Error/Syntax Error
The Parse Error, or Syntax Error, usually pops up right after you’ve added some custom code to your WordPress site. It basically means that you made a mistake with some “part” of the code. This could be something as simple as a misplaced comma, which is why this error can be a little bit frustrating!
How To Fix Parse Error/Syntax Error In WordPress
The easiest way to fix this issue is to just remove the offending code snippet that you added.
If you’re code savvy, the error message should also tell you the exact line that contains the issue. If you can figure out what’s going wrong, you can use that information to fix the issue, rather than just removing the entire code snippet.
4. 403 Forbidden Error
The 404 Forbidden Error usually pops up when there’s an issue with file permissions on your site’s server. This could involve the actual file configuration on your server. Or, it might be the result of a plugin issue.
How To Fix 403 Forbidden Error In WordPress
- Check to see if your site’s files are using the proper file permission codes. You can do this via FTP – this tutorial has a good guide for how to actually do that.
- Force WordPress to generate a new .htaccess file. Like before, you can do this by renaming your current .htaccess file via FTP and then going to Settings → Permalinks in your WordPress dashboard and clicking the Save button.
- Disable all of your plugins. Then, reactivate them one-by-one to find the one that’s causing the issue. Again, you can do this via FTP if you’re locked out of your WordPress dashboard.
5. Connection Timed Out
The Connection Timed Out error usually happens because you’re on low-quality shared hosting with a similarly low memory limit.
Because the memory limit is so low, your server doesn’t have the resources to respond to all the requests that it’s receiving from visitors. As a result, a visitor’s browser returns this error message instead of your site.
How To Fix Connection Timed Out In WordPress
- Try increasing your site’s memory limit if your host allows it. Giving your site a higher limit will give it more power to work with and help prevent this issue. If your host allows it, you can increase your site’s memory limit by adding this code snippet to your site’s wp-config.php file:
define( 'WP_MEMORY_LIMIT', '64M' );
- Try deactivating your plugins. Sometimes, a single plugin might be using all of your site’s resources. By deactivating this plugin, your server will have more resources to devote towards serving visitors. If you find that one plugin is causing the issue, you’ll likely want to find an alternative that’s less resource intensive.
Get Rid Of These Common WordPress Errors And Enjoy Your Site Again
While we couldn’t cover every single common WordPress error, we hope that you were able to get your site working again if you had the misfortune to encounter one of these specific errors.
If not, it might be time to turn to a professional. Your host’s support should be able to help with some of the issues. And if they can’t, you can always use a professional service like WP Kraken to get access to a WordPress developer at an affordable rate.
Have any other questions about how to fix these common WordPress errors? Leave a comment and we’ll try to help you out!