The 500 Internal Server Error is perhaps the most vague and frustrating error you can encounter in WordPress. Unlike other errors that hint at what’s wrong, a 500 error simply means the server encountered an unexpected condition and doesn’t know how to handle it.
While it can be intimidating, fixing it usually boils down to a few common culprits.
What Causes a 500 Internal Server Error?
- Corrupted
.htaccessfile. - Exhausted PHP memory limit.
- Faulty plugins or themes.
- Incorrect file permissions.
How to Fix It
1. Check for a Corrupted .htaccess File
This is the most common cause of the 500 error. The .htaccess file controls how your server interacts with your site, including permalinks and redirects. If it gets corrupted, the server will throw an error.
The Fix:
- Log into your site via FTP or your host’s File Manager.
- Locate the
.htaccessfile in your root directory. - Rename it to
.htaccess_old. - Try loading your site. If it works, the
.htaccessfile was the issue. - To generate a new one, go to Settings > Permalinks in your WordPress dashboard and simply click Save Changes without modifying anything. This forces WordPress to generate a fresh
.htaccessfile.
2. Increase the PHP Memory Limit
Sometimes a 500 error is just a disguised memory exhaustion error. A heavy script might be crashing the server.
The Fix:
Add this to your wp-config.php file:
define( 'WP_MEMORY_LIMIT', '256M' );
(For a deeper dive into this, see our guide on fixing the Memory Exhausted Error).
3. Deactivate All Plugins
If a plugin has a coding error or conflicts with another plugin, it can crash the server.
The Fix:
Rename your /wp-content/plugins/ folder to plugins_old via FTP. If the site loads, rename the folder back to plugins and activate them one by one until the site crashes again, identifying the culprit.
4. Check File Permissions
If file permissions are set incorrectly, the server won’t be able to execute necessary scripts.
The Fix:
Generally, folders should be set to 755 and files should be set to 644. You can change these via your FTP client by right-clicking on files/folders and selecting “File Permissions”.
5. Re-upload Core Files
If all else fails, your core WordPress files might be corrupted.
The Fix:
Download a fresh copy of WordPress from wordpress.org. Extract the .zip file, and upload the wp-admin and wp-includes folders via FTP, choosing to overwrite the existing files. Do not overwrite the wp-content folder or wp-config.php file. This will replace any corrupted core files without affecting your content.
