500 Internal Server Error
Last Update: February 13, 2023
If you just installed WordPress, a WordPress plugin, or Avada, and out of nowhere your site returns a 500 Internal Server Error, please read on. If you have been surfing the web for any length of time, you have probably encountered a 500 internal server error. These errors are not confined to WordPress. They are generic errors that report very little on what the actual cause is. Firstly, don’t panic. Lot’s of people have been confronted with these errors, and they can be fixed.
There are five major reasons why these errors occur in WordPress:
1. Incorrect web server configuration
If your web server (whether it be Apache or IIS) is configured with incorrect directives, they can cause 500 errors to occur. The problem is that web hosting support will often blame the error on software you have installed without even checking to see what is contained in their error logs. Just know that after you have checked the following remaining causes, and they fail to resolve the issue, you will need to (sometimes forcefully) get your web host to help diagnose and fix the problem.
2. Incorrect file permissions
With very few exceptions, file permission for WordPress, plugins, and themes need to be set at 755 for folders, and 644 for files. You may think that setting permissions more loosely, like 777, will relieve the problem, but you would be wrong. Setting permissions either too strict or too loose often cause this and other errors.
3. Corrupt files or files that contain errors in code
Usually improper/errors in file transfers to the web server cause corruption to occur. It may look like the file is sitting there just fine, but something in the process caused the file to be unusable by the server. For example, if you uploaded a text file in binary language instead of ASCII it will render the file unreadable by the web server. Coding errors can also create this error, whether that be in WordPress, a plugin, or a theme.
By far the most common 500 error produced by a file is related to the WordPress .htaccess file. The .htaccess file is primarily designed to be used with custom permalink structures. But it is also used by some third party plugins, and for overriding certain server configuration directives if allowed. If it contains errors, it can return the dreaded 500 internal server error. The .htaccess file is located in the root folder of your WordPress installation (not the theme).
4. PHP memory limits set too low, There two ways to solve this problem.
5. Conflicting Third Party Plugins Should Be Deactivated
Recommended PHP configuration limits are as follows:
How To Verify Your Current PHP Limits
You can verify your PHP configuration limits by installing a simple plugin found here. In addition, you can always contact your host and ask them what the current settings are and have them adjust them if needed. Please note though that many hosts will try to keep the PHP limits low without reason. However you are paying for it, and therefor should be getting your money’s worth.