Web Hosting

Fix "500 Internal Server Error" on Your Website

500 Internal Server ErrorHTTP ERROR 500
6 min read Updated 12 June 2026 ESAGAMES Team

A 500 error is the server's way of saying "something broke and I can't be more specific." The real message is in the error log — here's how to find it and fix the common causes.

Read the error log first

In DirectAdmin/cPanel open the Error Log, or check ~/domains/yourdomain/logs/ on the server. The 500 page hides the detail; the log shows the exact line and file that failed.

Cause 1: a broken .htaccess

An invalid directive in .htaccess (often from a plugin) throws an instant 500. Rename it to test:

mv .htaccess .htaccess.bak
# reload the site — if it works, the .htaccess was the problem

If that fixes it, regenerate a clean .htaccess (in WordPress: Settings → Permalinks → Save).

Cause 2: wrong file permissions

Web files should generally be 644 and folders 755. A script set to 777 can actually be refused by the server under suEXEC. Reset them:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

Cause 3: a PHP error or wrong PHP version

A fatal PHP error returns a 500. The error log names the file and line. Common fixes: switch the PHP version (in DirectAdmin → PHP Selector) to one your app supports, or fix the offending code/plugin.

Cause 4: exhausted PHP memory

"Allowed memory size exhausted" in the log means PHP ran out of memory. Raise the limit in php.ini or a custom config:

memory_limit = 256M

The clean checklist

  1. Open the error log — it names the real cause.
  2. Rename .htaccess to test it.
  3. Reset permissions to 644 files / 755 folders.
  4. Check the PHP version and error log for fatals.
  5. Raise memory_limit if the log says it's exhausted.
A 500 is never random. The error log always names the file and line — read it before changing anything.

Fast, protected web hosting

Our web hosting runs on NVMe with a clean DirectAdmin panel, PHP selector and DDoS protection included.

See web hosting
FAQ

Frequently asked questions

What causes a 500 Internal Server Error?

A server-side failure the web server can't explain to the browser — most often a broken .htaccess, wrong file permissions, a fatal PHP error, or exhausted PHP memory. The error log identifies which.

Where is the error log in DirectAdmin?

In the DirectAdmin panel under "Error Log" for the domain, or on disk under ~/domains/yourdomain.com/logs/. It records the exact reason behind each 500.

Why did 777 permissions cause a 500?

On servers using suEXEC/suPHP, files or folders that are group- or world-writable (like 777) are rejected for security, returning a 500. Use 644 for files and 755 for folders instead.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney