How to Fix a 500 Internal Server Error — cPanel & Hosting How-Tos cPanel & Hosting How-Tos

How to Fix a 500 Internal Server Error

By Genhost Team 2 min read

A 500 Internal Server Error is the server’s way of saying “something went wrong” without naming it. The fix is almost always simple once you find the cause — and the cause is in your logs. Here’s how to track it down.

Step 1: Read the error log (do this first)

A 500 is generic; your error log is specific. In cPanel open Errors (or Metrics → Errors) and look at the most recent entry — it names the exact file and line that failed. See how to read your error logs. On WordPress, enable debug logging to capture the message. This single step usually turns a vague 500 into an obvious fix.

Common causes and fixes

1. A broken .htaccess file

A bad rule or a stray character in .htaccess throws a 500 instantly. In File Manager (show hidden files), rename .htaccess to .htaccess_old and reload:

  • Fixed? The file was the problem. On WordPress, regenerate a clean one via Settings → Permalinks → Save Changes. See .htaccess explained.
  • Still broken? Rename it back and continue.

2. PHP memory exhausted

If the log says “Allowed memory size exhausted”, a script ran out of RAM. Raise the per-script limit — see increase PHP limits in cPanel — and reduce plugin bloat. More on this in the memory limit guide.

3. The wrong PHP version

An app that needs a newer (or older) PHP version can 500. Switch versions in cPanel — see change your PHP version — and check your app’s requirements.

4. Wrong file permissions

Files should be 644 and folders 755. A script set to 777 or 666 can trigger a 500 on some servers. Fix them in File Manager — see file and folder permissions.

5. A faulty plugin or theme (WordPress)

Deactivate all plugins to test. If you can’t log in, rename the wp-content/plugins folder via File Manager to deactivate them all at once, then reload. If the 500 clears, rename it back and enable plugins one by one to find the culprit. See common WordPress errors.

Still stuck?

If the log points to a specific script you don’t recognise, or the error returns after every fix, our site-down troubleshooting guide covers the next steps, and our support team can read the server logs with you.

Every Web Hosting and WordPress Hosting plan at Genhost includes error logs, PHP selector and File Manager, so most 500 errors are a few minutes’ work to fix yourself.

Frequently asked questions

What does a 500 Internal Server Error mean?

It's a generic 'something went wrong on the server' error. The real cause is in your error logs — usually a broken .htaccess rule, a PHP memory or version problem, wrong file permissions, or a faulty plugin or script.

How do I find the real cause of a 500 error?

Open your error logs in cPanel (or enable WordPress debug logging). The log entry names the exact file and line that failed, which turns a vague 500 into a specific fix.

Can a plugin cause a 500 error?

Yes. A buggy or incompatible plugin or theme is a common cause on WordPress. Deactivate plugins (rename the plugins folder via File Manager if you can't log in) to find the culprit.