14Nov 2026

0

48

500 Internal Server Error on Your Website: 8 Causes and How to Fix Them

Your website suddenly shows “500 Internal Server Error” (or just “HTTP ERROR 500”) and nothing else. The message is frustratingly vague: it only says the server hit a problem it could not describe. The good news is that on a typical cPanel/Linux hosting account the cause is almost always one of a short list, and most of them take minutes to fix once you know where to look.

Work through the causes below in order. Take a quick backup first (see our backup guide) so any change you make can be undone.

Step 0: Read the error log before guessing

A 500 error always leaves a trace. In cPanel open Metrics > Errors, or open the error_log file in your site’s folder with File Manager. The last few lines usually name the exact file and line number that failed, which turns a guessing game into a two-minute fix. If you run WordPress, you can also set define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); in wp-config.php temporarily; errors are then written to wp-content/debug.log. Turn debugging off again when you are done.

1. A broken or incompatible .htaccess file

This is the most common cause on Apache/LiteSpeed hosting. A plugin, a security tool or a manual edit leaves a rule the server cannot parse. Rename .htaccess to .htaccess-old in File Manager (enable “show hidden files”) and reload the site. If it loads, the file was the problem. For WordPress, go to Settings > Permalinks and click Save to generate a clean file.

2. A plugin or theme that crashed

An update, an auto-update or a newly installed plugin is the next most likely culprit, especially if the error started right after a change. If you cannot reach wp-admin, rename the wp-content/plugins folder to plugins-off. If the site returns, rename it back and disable plugins one by one (rename each plugin’s folder) until the error reappears. Do the same with the active theme folder if plugins are not the cause; WordPress falls back to a default theme.

3. PHP version mismatch

Old plugins can break on a new PHP version, and new plugins can refuse to run on an old one. In cPanel, Select PHP Version (or MultiPHP Manager) shows which version the site uses. If the error began after a PHP change, switch back to the previous version, then update the plugin or theme that needs it. Running a supported PHP version is important for security, so treat a rollback as temporary.

4. PHP memory limit exhausted

The log will say “Allowed memory size of … bytes exhausted”. Raise memory_limit in cPanel’s PHP options (for example from 128M to 256M), or add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php. If a single page keeps running out of memory, find the plugin causing it rather than raising the limit forever.

5. Wrong file or folder permissions

On most Linux hosting, folders should be 755 and files 644; wp-config.php can be stricter (640 or 600). Files set to 777 are a security risk and some servers refuse to run them, returning a 500 error. This often happens after uploading files by FTP or restoring a backup from another server. File Manager lets you check and change permissions.

6. A script timed out or hit resource limits

Heavy imports, backups, image processing or a traffic spike can push a shared account past its CPU, memory or process limits. In cPanel, Resource Usage shows whether limits were hit. If they are hit regularly, the site has outgrown its plan; our guide on when to upgrade from shared hosting to VPS explains the signs.

7. Corrupted WordPress core files

An interrupted update can leave core files half-written. Download a fresh copy of the same WordPress version and re-upload the wp-admin and wp-includes folders only. Do not overwrite wp-content or wp-config.php.

8. A problem on the server itself

If every site on the account shows a 500 error and none of the steps above changes anything, the issue may be on the server (a web server or PHP service problem). Contact your host’s support with the time the error started and the lines from your error log. That information lets support fix it quickly instead of starting from scratch.

500 vs 502, 503 and 504: which one do you have?

A 500 means the application or server configuration failed. A 502 Bad Gateway or 504 Gateway Timeout usually means a proxy or backend service did not answer in time. A 503 Service Unavailable often means the account hit its limits or is in maintenance mode. If you see a database message instead, read our guide to “Error establishing a database connection”. If the site broke right after moving hosts, see website broken after switching hosts.

How to stop it happening again

Keep automatic backups, update plugins on a staging copy first where you can, remove plugins you no longer use, and stay on a supported PHP version. A hosting plan with cPanel access to error logs and resource graphs makes every one of these fixes faster. Compare our shared hosting plans, or move a busy site to a VPS or dedicated server when it needs guaranteed resources. New to cPanel? Start with what is cPanel.

Frequently asked questions

Is a 500 Internal Server Error my fault or my host’s?

Most of the time it comes from the website itself: a .htaccess rule, a plugin, a PHP setting or file permissions. If every site on the account fails and the error log shows nothing from your code, contact your host.

Will a 500 error hurt my Google rankings?

A short outage will not. If Googlebot keeps getting 500 responses for days, it slows crawling and can drop affected pages from results, so fix it promptly.

Does clearing my browser cache fix a 500 error?

Rarely. The error is generated on the server. Clear your caching plugin or CDN cache after fixing the cause, so visitors don’t see an old error page.

Where is the error log in cPanel?

Under Metrics > Errors, and as an error_log file inside the folder of the script that failed (often public_html).