500 internal server error runs on every page of your site when there’s a problem with a server or file system. It’s mostly likely occurs in the root directory where your WordPress files are, but it can also be caused by a problem on your host server.
Let’s check out some few useful methods to get rid of this error, but before we began it’s recommended to make a backup of your site. Before trying any of these solutions in case something goes wrong.
This issue mostly cause during migrating you website from localhost to live server. If you want to know how to Migrate WordPress Website.
1. 500 Internal Server Error (Htaccess File)
A common cause of this error is a corrupted htaccess files it can become corrupted after you install a plugin or make another change to your WordPress site. Fix is simple since all you need to do is create a new htaccess file.
Open up your WordPress root directory in your preferred FTP client if you see folders named. wp-admin, wp-content, wp-includes you’re in the right place.
If you cannot see dot htaccess file or any dot file, for that matter make hidden files viewable. By clicking server and selecting Force showing hidden files this will be different on every FTP client, we are using FileZilla.
Once you find your dot htaccess file rename it htaccess.bak this is essentially deletes your site’s htaccess file. Now we need to create new one. Go into your WordPress admin panel area hover over setting and select Permalinks.
Scroll down to the bottom of the page and click on Save Changes. Now check the 500 internal error is gone if it is then it was caused by a corrupt htaccess file.
It’s also worth mentioning that an improperly named dotty htaccess file will cause this error to run on your site. So make sure it’s not named anything other than .htaccess
2. 500 Internal Server Error (PHP Memory Limit)
If you’re still having an issue, then let’s checkout the other common cause of this error which exceeding your servers. PHP memory limit this is usually happens because of a poorly coded plug-in running on your site or using too many plugins.
You’ll begin to exceed the PHP memory limits set by your hosting provider and once either of those things happened. The result become a 500 internal server error.
Once again open up your root directory and locate the wp-config.php open this file in your preferred text editor. And add this bit of code under the opening PHP tag.
Copy this code: define(‘WP_MEMORY_LIMIT’,’64M’); Save the file and re-upload it to your root directory and refresh the page to checkout the error is fixed or not.
If it’s fixed then It was caused by the PHP memory limit, if not then remove the code from the wp-config.php file. This line of code is worked then great or else, you can ask your hosting provider to increase the limit on your server.
3. 500 Internal Server Error (Deactivate Plugins)
Both of these method didn’t work for you then let’s try a few less common solutions. If you’re able to access the WordPress admin area. Deactivate the plugins one by one refresh the website after each deactivation and if the error disappears. It was likely caused by that plugin.
If you cannot access the WordPress admin area go back to your FTP client open the “root directory” and open wp-content. This folder contains your plugins, themes and other folders.
Rename the plugins folder to anything you wish like plugins.test this will deactivate all the plugins on your site. Refresh your site and check if the error is gone if it is then it’s caused by some faulty plugins. You have to go back and enable them one by one.
To figure out the culprit if it didn’t work then be sure to revert your folder back to just plugins.
4. 500 Internal Server Error (Debug Log)
Another solution would be to debug your website and this is a bit intimidating for beginners but if you want to give it a shot. Head on over the given link which shows you step-by-step how to do it
5. 500 Internal Server Error (File Permission)
As for other solutions which are more unlikely you can check the file permission in you WordPress directory. They should be 755 or 644 if not they could be causing the 500 internal server error. You can upload fresh version of wp-admin, wp-includes.
To your site but this should be your last resort again back up your website before trying this once you do. Simply re-download WordPress and only upload wp-admin, wp-includes folder to your root directory.
If this works that means it caused by the corrupted core file if none of these solution worked for you then only option is left. Contact your hosting provider many host much of a help and they’ll actually blame your site files for the issue.
Which again is definitely a possibility so make sure you’re really tried all the steps and shown above the article.
Note: We recommend to backup your site on regular basis and update your plugins, themes and WordPress core files as soon as. They’re available to prevent this from happening.
If this article helped make sure to share with others and comments down below
Thanks For Reading…
If you found this article useful then don’t forget to share with others also. For more interesting tech articles visit our website: BLOGGSTERS