One of the most common website errors is the “500 internal server error”. This generic error does not provide information about what has caused the error, so searching for a solution could take some time. When the 500 error pops up, it may raise your heartbeat for a couple of seconds, but please try to stay calm as often the solution is nearby. In my career I’ve dealt with a couple of these errors and was able to solve them all within a short period of time. I realize that a lot of time is saved by knowledge and experience in this matter, so I decided to provide you with some hands-on tools. It will also be good to mention that this is not an error that is related to specific software. Often it is a combination of things or just a simple typo.
The .htaccess file
The .htaccess file is located in the main directory of your software installation. Sometimes the .htaccess file is not visible due to a restriction on showing hidden files. Please make sure there’s no restrictions to view hidden files within your FTP program or cPanel file browser.
Show hidden files in FileZilla
In the FileZilla top menu, click on “Server – Force show hidden files”
Show hidden files in the cPanel File Manager
Log in to your cPanel and click on “File Manager”. The program will open in a new browser tab. Within the File Manager, click on “Settings” and select “Show Hidden Files (dotfiles)”.
After you have located the .htaccess file, rename it to something like .htaccess_old. Now refresh your browser window and see if this has resolved the error. In most cases it does. When you’re working in WordPress you can generate a new .htaccess file by logging in to your admin panel and go to “Settings – Permalinks” and click the save button.
Increase the PHP memory limit
A 500 server error sometimes happens when your website is exhausting the PHP memory limit of your web server. You can easily raise the PHP memory limit by creating a blank text file and name it php.ini. Now paste this in the php.ini file you just created:
Upload the php.ini file to your server (for WordPress upload it to your wp-admin folder).
Alternatively you can increase the PHP memory limit in your WordPress config.php file. Although the new WordPress editions already have this covered. However, if your website is still running on an old WordPress version, you can try increase the PHP memory limit by pasting this into your wp-config.php file:
If increasing the PHP memory limit had fixed your 500 error, please also contact your web host as it might occur again after installing or updating plugins and/or software. The error could’ve been caused by a badly coded plugin or CMS template. Further investigation is absolutely necessary.This is how I solved my 500 internal server error Click To Tweet
If none of the above worked for you, it is time to roll up your sleeves and try the following: – In WordPress, deactivate all plugins and see if this fixes the issue. If it did, activate all plugins one by one and also refresh your website after activating each plugin. This will tell you which plugin(s) has caused the issue.
– Change the permissions of your admin folder to 755
– Make a backup of your files and database and upload all core files. Do not upload the theme and config files as this might cause other errors. If you’re working in WordPress, it will be safe to upload clean versions of your wp-admin and wp-includes folders.
Submit a ticket to your web host
Still no luck? Submit a ticket to your web host and ask them to investigate the issue. It might help to also include the steps you have already taken to try solve this issue.
Share you experience
Did you find the tips in this article helpful or do you have another experience with 500 server errors that you want to share? If you have a solution that is not been mentioned, please reply as well. I am curious about your experience.