Skip to content

Fixing 500 Internal Server Errors

500 Internal Server Error means something went wrong on the server while building the page, but the server can’t say what. The cause is almost always in your website’s files, and the error logs tell you which.

  • cPanel → Metrics → Errors shows the latest web server errors with the reason, such as a bad .htaccess line or wrong permissions.
  • The error_log file in your website’s folder shows PHP errors. See Finding PHP error logs.

The newest entries at the bottom usually name the exact file and problem.

A mistake in .htaccess is the most common cause.

  1. In cPanel’s File Manager, click Settings and tick Show Hidden Files.
  2. Rename .htaccess in your website’s folder to .htaccess-old.
  3. Reload your website.

If it works, the problem is in that file. Look for lines you added recently, especially php_value, php_flag, AddHandler or Options lines, and remove them. For WordPress, create a fresh file by going to Settings → Permalinks and clicking Save Changes.

If the error log shows a PHP Fatal error:

  • A plugin or theme caused it. In WordPress, rename the folder wp-content/plugins to plugins-off to turn off all plugins, then reload. If the site works, rename it back and turn plugins on one by one in the dashboard to find the faulty one.
  • You changed PHP version. Switch back in cPanel under Select PHP Version. See Resolving common PHP upgrade issues.
  • The script ran out of memory. See PHP memory limit vs your plan’s RAM.

For what PHP error messages mean, see Common PHP errors.

Folders must be 755 and files 644. Files or folders with 777 permissions, or PHP files that anyone can write to, are blocked for security. Fix them in File Manager with Change Permissions.

If you can’t find the cause, restore your website files from yesterday’s backup. See Restoring files, email and databases using JetBackup.

Open a support ticket with the page address and the time of the error. We’ll check the server logs for you.

Was this page helpful?