Skip to content

Server error (500) on your site

Find the cause of a 500 Internal Server Error by reading the PHP and error logs, then fix it with a setting change, a restart, or a rollback.

A 500 error means PHP or WordPress failed while it built the page. The web server is working, so the fix is in the code, a plugin, the PHP settings, or the database. Work through the steps in order. The first two find most causes.

What you see

  • A page that says "The server encountered an internal error" or shows a blank white page.
  • A 500 status in the browser's developer tools for one page, or for the whole site.
  • The problem started right after a deploy, a plugin update, or a PHP version change.

Check these first

  1. Read the error log. Open the site, then Logs, and pick error.log. Filter by Error. The newest lines show the file and line that failed, such as a fatal error in a plugin file or a call to an undefined function. Copy the first fatal line; it names the cause.
  2. Read the PHP log. Pick php-fpm.log. A line about a worker that ran out of memory, or that was restarted, means PHP ran short. The memory limit is the usual reason.
  3. Check for a recent change. Open Code to see the last deploy, and User activity to see who changed PHP or a plugin, and when. If the 500 started at the same time as a change, that change is the first suspect.

Fix it

  • A plugin or theme fault. Open the site on staging first if you can. Deactivate the plugin named in the error from wp-admin, or rename its folder over SFTP. Then reactivate it after the fix.
  • A PHP memory error. Open Tools, then PHP settings, and raise the memory limit by a step. Change one setting at a time. Restart PHP from Tools afterwards.
  • A deploy broke the site. Open Code, choose the release before the change, and roll back. Rollback changes code only, and the older code goes live in under 10 seconds.
  • A PHP version change. Switch back to the previous version under Tools, then test the plugins one by one on a staging environment before you switch again.
  • The database. If the log names a table or a connection error, see Database connection errors.

Still stuck

Write to [email protected] with the site name, the environment, the time of the errors, and the first fatal line from error.log. Include the job ID of the deploy if one ran recently.

Still stuck?

Email [email protected] with your site name and what you tried, or send us a message.