500 Internal Server Error
A 500 Internal Server Error is the server's way of saying something went wrong but it cannot tell you exactly what on the page itself. The real cause is almost always in your error log. This guide walks you through the usual suspects and how to fix each one.
Common Causes
Nearly every 500 error on a shared hosting account comes down to one of these:
- A broken .htaccess file — a bad rewrite rule, an unsupported directive, or a stray character.
- A PHP fatal error or memory exhaustion — a script crashed or ran out of memory.
- Incorrect file permissions — files or directories set too open or too restrictive.
- A WordPress plugin or theme — a recent update or new install introduced faulty code.
Step 1: Check the Error Log
Always start here. The error log tells you the exact file and line that failed, which usually points straight at the cause.
- Log into cPanel.
- Go to Metrics > Errors to see the most recent errors.
- Reproduce the error by visiting the broken page, then refresh the log.
- Read the newest entries from the bottom up — look for words like
PHP Fatal error,Allowed memory size, orInvalid command.
Step 2: Test Your .htaccess File
A corrupt or incompatible .htaccess is the single most common cause of a 500 error. To rule it out, rename it so the server ignores it.
- Open File Manager in cPanel and browse to
public_html. - Enable Show Hidden Files (dotfiles) from the Settings menu if you cannot see
.htaccess. - Rename
.htaccessto.htaccess.bak. - Reload your site. If it works now, the problem was in that file.
- For WordPress, regenerate a clean copy by going to Settings > Permalinks and clicking Save Changes.
For a deeper look at the rules that belong in this file, see our .htaccess guide.
Step 3: Raise the PHP Memory Limit
If the log shows Allowed memory size exhausted, your script needs more memory. You can raise the limit from cPanel.
- In cPanel, open MultiPHP INI Editor.
- Select your domain from the dropdown.
- Set
memory_limitto a higher value, such as256M. - Click Apply and reload your site.
Step 4: Rule Out a Plugin or Theme
If you are running WordPress and the error started after an update or a new install, a plugin or theme is the likely culprit. You can deactivate all plugins at once without logging in.
- In File Manager, browse to
public_html/wp-content. - Rename the
pluginsfolder toplugins-off. - Reload your site. If it loads, a plugin was the cause.
- Rename the folder back to
plugins, then rename each plugin subfolder one at a time to find the offender. - If plugins are not the cause, switch to a default theme such as Twenty Twenty-Four to rule out the theme.
For a full recovery walk-through, see WordPress White Screen of Death.
Step 5: Check File Permissions
Web servers refuse to run files with unsafe permissions. The standard, safe values are:
- Files —
644 - Directories —
755
Avoid 777 on anything — it is a security risk and some servers will return a 500 error for scripts set that way. You can fix permissions in File Manager by right-clicking a file, choosing Change Permissions, and setting the correct value.
777 to "make it work." This opens your site to attackers and is rarely the real fix. Stick to 644 for files and 755 for directories.
Still Stuck?
If you have worked through every step and still see a 500 error, open a support ticket. Include the domain, the exact page that fails, and the most recent lines from your error log so we can pinpoint the cause quickly.