Email VPS
Troubleshooting and repair

500 Internal Server Error, what it means and how to fix it

Server error

500 Internal Server Error is the general server error message. It only means that something went wrong on the server and the request could not be handled. The reason is not passed to the browser, because it could reveal information about the structure of the site. The real cause is in the error log, and without it fixing the problem is guesswork.

In short

  • A 500 is not a cause but a symptom. The real error is in the log.
  • The usual causes are .htaccess, an interrupted update and the PHP version.
  • If the error appeared without any changes, suspect the PHP version or the disk space first.

Start with the error log

The control panel has a log view, and the site root often has an error_log file. Find the most recent line whose timestamp matches the moment the error appeared. The line usually names the file and the line number. One line of log saves an hour of trial and error.

The most common causes

CauseHow to recognise itFix
A broken .htaccessThe error covers the whole site, static pages includedRename the file temporarily. If the site comes up, that was it.
An interrupted updateThe error started during an update or right after oneRestore a backup and run the update again without rushing
The PHP versionThe error appeared without anyone changing the siteRoll back to the previous PHP version, then update the plugins
The disk is fullEmail or the database misbehaves as wellFree up space, check the size of the log files
File permissionsThe error started after a migration or a restoreDirectories 755, files 644

Test .htaccess first

A broken .htaccess is the quickest to rule out. Rename the file to something like .htaccess-old over FTP or in the file manager and reload the site. If the site works, that was the fault. In WordPress you can create a new empty file and save the settings again under Settings and Permalinks, which makes WordPress write the default rules back.

Remember to restore the original file if that was not the fault. .htaccess can contain redirects and caching rules, and losing them creates a new problem.

When nothing has been changed

If nobody has touched the site, the change came from the environment. Most often the hosting has updated the PHP version, or the disk has filled up with backups and logs. Both are visible in the control panel. There is a separate guide for rolling back the PHP version.

Do not leave the error on display

Showing errors in the browser helps with troubleshooting, but it exposes file paths and sometimes database details. Switch it off as soon as the fault is found. If the site is public and the fault takes a while, a temporary maintenance page is better than a raw error message.

If you would rather not do it yourself

We read the log, fix the cause and tell you what was done. If your site is down because of this, we take it into work within twenty four hours.

See how we repair a broken site »

Error establishing a database connection, how to find the cause »