An “HTTP 500 Internal Server” error may occur when you try to access a particular website, forcing you to find a fix. Technically, as a guest, you may ignore it, but as a website administrator, you can’t afford to let it fester any longer. The frequent 500 internal server error taints your company’s reputation and makes people lose confidence in your brand. Beyond the significance, this problem will also harm your search engine rankings.
As a result, it is recommended that you avoid this mistake by knowing what it’s all about and how to troubleshoot. It might be due to a technical issue, but it’s more frequently due to problems with the server, which are out of your hands. Let’s look at what’s causing the 500 internal server error and how to get your website back online quickly.
Note. HTTP 500 error also appears on websites not built in WordPress. However, for practicality (over 40% of indexed websites use WordPress), we’ll use it for demonstration.
What Does 500 Internal Server Error Mean?
HTTP 500 is a generic HTTP status error that indicates that something has gone wrong with the website’s server, preventing the page from loading. This is a server-side error, meaning it’s not your fault as a user. Nonetheless, it can be frustrating because no specific details are provided about what went wrong.
Common Names of 500 Internal Server Error
If you’ve ever encountered a WordPress error, you know they can be hard to decipher. The 500 HTTP error is no different since it has a few other names, including:
- 500 internal server error
- HTTP 500 internal server error
- Internal server error
- WordPress 500 internal server error
- Temporary down for maintenance
What Causes the HTTP 500 Error?
Although the problem is stated from the server, that isn’t always the case. The following are some typical issues that can result in this message:
- Poorly coded plugins or themes –– Once in a while, a new plugin or theme is released with coding errors. These coding errors can include things such as syntax errors or improper file permissions.
- Corrupted .htaccess file — The .htaccess file is responsible for many things on your WordPress site, including redirects, permalinks, and access to specific files. If this file becomes corrupted, it can often result in a 500 Internal Server Error.
- Exceeding your server’s PHP memory limit — This error can occur when trying to do more than your server can handle.
- Database connection issues — If your WordPress site cannot connect to its database, it will often result in an HTTP 500 Internal Server Error you must fix. This can be caused by incorrect database login credentials or an incompatible database driver.
- Theme or plugin functions — Some themes and plugins use specific parts that are often unavailable on all servers. If you are using a theme or plugin that uses such a function, and your server does not have it enabled, it can lead to an error.
- Incorrect file permissions — File permissions determine who can access specific files on your server. If these permissions are set incorrectly, it can result in an internal server error.
You can do a few things to try and fix the internal server error on your WordPress site. Below are some standard solutions that have helped other WordPress users overcome this issue.
1. Reload the Page With the HTTP 500 Error
The first thing you should do when you encounter this error is to load the problematic page again. Sometimes, errors like these can be fixed by a simple refresh. Then, if you’re still seeing it, move on to the next solution.
2. Check Your Browser Extensions
If you’re using Chrome, try reloading the page in incognito mode. This will disable all your extensions, so if one of them is causing the error, you’ll know it right away. To do this in Chrome:
- Open a new tab and select the three vertical dots in the top-right corner of your browser.
- From there, select “New Incognito Window.”
- You can also use a different browser to see if that fixes the issue. You’ll know it’s a browser extension causing the problem if it does.
3. Fix the 500 Internal Server Error by Clearing WordPress Site’s Cache
If you’re still seeing the error, it might be because of a corrupted cache. Clearing your WordPress site’s cache will refresh all the data and might fix the issue. There are a few ways to do so, depending on which caching plugin you use. If you’re unsure which caching plugin you’re using, ask your WordPress hosting provider or check your website’s root folder or plugin repository. Once you know which plugin you’re using, follow the instructions below based on the plugin:
- W3 Total Cache — Go to Performance → Browser Cache and select “Disable” from the drop-down menu. Click “Save Settings & Purge Caches.”
- WP Super Cache — Go to Settings → WP Super Cache and select “Delete Cache.”
- Comet Cache — Go to Tools → Clear Cache → Select “Clear all cache files.”
If you’re not using a caching plugin, you can still clear your site’s cache by creating a PHP file with the following code:
<?php// Clearing the WordPress cache
define( 'WP_CACHE', true ); // Added by WP Rocket
clear_cache();
?>
Save the file as .php in your website’s root directory. Once you’ve done that, go to www.yoursite.com/php
, and your cache should be cleared. Delete the file afterward, so it doesn’t pose a security risk to your website.
4. Expand the PHP Memory Limit for WordPress
By default, WordPress will try to use 32 MB of memory. You might see the error if your site uses more than that. To fix this, you can increase the memory limit in your WordPress site’s wp-config.php file. Increasing works this way:
- Connect to your website via FTP and navigate to the /wp-admin/ folder.
- In that folder, look for a file called wp-config.php.
- Then, download that file to your computer and open it in a text editor like Notepad or TextEdit.
Once you have the file open, look for a line that says: define( 'WP_MEMORY_LIMIT', '32M' );
Change the 32M to 64M or 128M, then save the file and upload it to your website via FTP. Then, check your website to see if the error is fixed. If not, you can try increasing the limit a tad more. Too much memory can cause problems, so most hosting providers restrict or block the functionality. If so, they’ll have to do that.
5. Deactivate All Your WordPress Plugins
To find out if this error creeps up due to WordPress plugins, you can deactivate all your plugins and then reactivate them one by one. That way, you’ll know which plugin is causing the problem immediately. To deactivate all your plugins:
- Connect to your website via FTP and navigate to the /wp-content/plugins/ folder.
- Once you’re in that folder, rename the plugins folder to something like plugins_old. That will effectively deactivate all your plugins.
- After you’ve done that, try loading your website again.
- If it loads without any problems, one of your plugins was most likely causing the issue. To find out which plugin it was, go back into your FTP account and change the name of the plugins_old folder back to plugins.
- Now, try reactivating your plugins one by one in the WordPress Admin section until you find the problematic one.
6. Re-upload the Core WordPress Files
If deactivating your plugins and increasing your memory limit didn’t fix the error, it might be caused by a corrupted WordPress file. You can replace those files without having to delete your entire WordPress site. To do this:
- Connect to your website via FTP and navigate to the /wp-admin/ folder.
- Look for a file called functions.php.
- Download that file to your computer and open it in a text editor like Notepad or TextEdit.
Once you have the file open, look for a line that says:
require( ABSPATH . WPINC . '/functions.php' );
Delete that line and save the file. Now, upload the file back to your website via FTP and check your website to see if the error is fixed. If not, you can try re-uploading other core WordPress files until you find the one that’s causing the problem.
7. Restore Your WordPress Site from a Backup
You might need to restore your WordPress site from a backup if nothing else has worked. That way, you can be sure that you won’t lose any critical data or content in the process. Do the following:
- Connect to your website via FTP and navigate to the /wp-content/ folder.
- Once you’re in that folder, look for a folder called backups. If you see that folder, download it to your computer.
- Once you have the backups folder on your computer, open it and look inside. You should see a bunch of files with names like:
20160718-053731-db7ad60e3be0a0925dc1db70df817f7301dcc5cb7b10231568e6afc542678169.gz
20160718-053731-db7ad60e3be0a0925dc1db70df817f7301dcc5cb7b10231568e6afc542678169.sql
- These are your website’s backups. To restore your site, you’ll need to upload the .gz file to your website via FTP and then unzip it.
- Upload the .sql file to your website via FTP and import it into your database.
If you don’t see a backups folder, you’ll need to create one. Proceed this way:
- Connect your website via FTP and navigate to the /wp-content/ folder.
- Once you’re in that folder, create a new folder and name it backups.
- Now, try restoring your WordPress site.
That’s it! If you’ve followed all the steps above and still see the 500 internal server error, contact your hosting provider and ask them to help you fix it. They can likely figure out what’s causing the problem.