A 500 error on your website is a general status code that means something is wrong with your site or server. This error displays for a number of reasons, many of which are noted below. If none of the steps below fix the error, contact support who can look into the issue further for you.
The following are a few common causes that will make your site throw a 500 error.
Check your error log
A good first step in troubleshooting this is to check your site's error log to see what the issue may be. View the following article for information on how to view your site's error log file.
Every file and directory under your website needs to have specific permissions set to run correctly. These permissions will differ based on your site's needs, but if they are set incorrectly, your site may display a 500 error.
In general, files and directories should be set as follows.
- files — 644
- directories — 755
The following articles show how to adjust these permissions.
Many site's use an .htaccess file to control how the site operates. View the following article for further details.
If the code in this file is written incorrectly, or the server is not able to run the code, a 500 error may be thrown. Your site's error log file should indicate what line in your .htaccess file is the cause.
Timeout when connecting to an external server
If your site is making connections to an external server, it's possible the connection will time out. If so, this may result in a 500 error. The following article shows how to raise your PHP execution time using a phprc file.
However it's ultimately up to the other server to respond in time.
Hitting the PHP memory limit
Hitting the PHP memory could also cause a 500 error. View the following article for instructions on how to raise this limit.
Syntax errors in our website's code could throw a 500 error. Check your site's error log or enable error logging within your programming language to catch such issues.
WordPress is run using the PHP programming language, so everything above still applies. However there a few additional things that could cause this error with a WordPress site.
Try disabling your plugins. This can be done by renaming your plugins folder. The following article walks you through how to do this.
Reinstall your core WordPress files
If none of the solutions above fix your problem, you may need to reinstall your core WordPress files. This downloads a new copy of your WordPress /wp-admin and /wp-includes directories and could potentially fix your site if something with those files were causing the 500 error. View the following article for instructions on how to do this.
Enabling WordPress DEBUG mode
View the following article for instructions on how to enable WordPress DEBUG mode and write to a local log file.
This may help to discover the cause of the error message.