500 Internal Server Error

Receiving a 500 Internal Server error on your website can be quite frustrating in that the error message does not provide any helpful information as to what might be causing it. In this article we will explain the common reasons you might encounter a 500 Internal Server Error and what steps you can take to resolve it.

About the 500 Internal Server Error

An Internal Server Error could happen on any web server, and is not specific to WordPress websites. Typically this error occurs when a key configuration file (such as your wp-config.php file) has been misconfigured or corrupted. On the WP Engine platform, an Internal Server Error will most often read:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred and the actoions you performed just before this error.

More information about this error may be available in the server error log.

Resolving Internal Server Errors

If you encounter a 500 Internal Server Error, your first step should be to check your error logs to determine which file caused the error. This will help you determine whether the best step is to restore a backup to bring the site back online, or to resolve the issue with the file triggering the error.

Locate Error Logs

On WP Engine, your error logs for each environment can be found in your User Portal. Click on the environment where you experienced the error, then select “Error Logs” from the left-hand navigation.

Here, any PHP errors generated by your website will display with the timestamp, IP address, and file path which triggered the error. In the example above, an error was triggered at 01:55 UTC by the .htaccess file, due to an unexpected or invalid command in the file.

Based on the information in the error log, you can choose to either edit the offending file to resolve the error, or to restore a Backup point to go back to the last point when the website was functioning normally.

Editing Website files

If you need to resolve the error by editing a file on your website, you can do this via SFTP. Start by opening your SFTP client and connecting to your site using the instructions in our SFTP guide.

Once you are connected, you can locate the correct file to edit. In the earlier example, the issue was with the .htaccess file, which is a file located in the document root of the website.

Once you locate the file, right-click to select to edit the file. In the earlier example, there was an unexpected command “BEGIN”–the error in this case was that the file was missing the opening comment (#).

In this example you would need to add a # (comment) to the first line, then save the file. Your SFTP client may then ask you if you would like to upload the edited file back to the server–ensure you select “Yes” if prompted. This will ensure your changes are saved back to your website.

Contact Support

If you are not seeing any errors in your logs when experiencing the Internal Server Error and are unable to restore a backup, it can be difficult to pinpoint what is causing the error. If this is the case, please do not hesitate to contact our WP Engine Support Team. Simply open a chat (available 24/7 in your User Portal) and describe the error you are receiving, where you are seeing it, and any events or changes that happened just before experiencing the error. We are glad to help anytime!

NEXT STEP: Learn how to diagnose and troubleshoot other common WordPress errors

Code-level performance analytics

Application Performance provides real-time, code-level visibility to help you troubleshoot faster, optimize WordPress experiences, and increase development agility.