How to Fix a 500 Internal Server Error
This article will show you how to fix a 500 Internal Server Error.
A 500 is the server's way of saying something broke while handling the request, without saying what. The error log almost always does say what, so that is where to start.
1. Read the Error Log
Open your error log before changing anything. A 500 covers dozens of causes and the log narrows it to one, usually naming the file and line.
2. Check Your .htaccess File
An unsupported directive, or one your host has disabled, throws a 500 immediately. Rename .htaccess to .htaccess-off and reload. If the site returns, the problem is in that file.
3. Check File Permissions
A file set to 777 is rejected by many servers as a security risk. Files should be 644 and folders 755.
4. Raise the PHP Memory Limit
A script that runs out of memory can fail with a 500 rather than a clear message. Increasing the limit in your control panel's PHP settings will confirm or rule this out.
5. Disable Recently Added Code
If the error started after installing a plugin, theme or update, disable that change and test again. On WordPress, renaming the plugin folder over FTP disables all plugins at once.
6. Check the PHP Version
Code written for a newer version of PHP will fail on an older one, and the reverse is also true after a server upgrade. Switching the version in your control panel is a quick test.
Next: How to View Error Logs in cPanel covers finding the log entry that explains which of these it was.