How to Fix the 500 Internal Server Error on WordPress Website

How to Fix the 500 Internal Server Error on WordPress Website

Hello everyone. Iโ€™m gonna show you few methods to fix the 500 internal error you may be experiencing on WordPress. So letโ€™s get right into it.

The 500 internal server error runs on every page of your site when thereโ€™s a problem with the server or file system. The cause most likely occurs in the root directory where your WordPress files are but it can also be caused by a problem on your host server. Iโ€™m going to show you a few ways, you can fix this problem.

But before we begin I recommend you make Backup of your site before trying any of this solution in case something goes wrong.

Create a New โ€œ.htaccessโ€ file

A common cause of this error is a corrupted โ€œ.htaccessโ€ file. It can become corrupted after you install a plugin or make other change to your WordPress site. The fix is simple since all you need to is create a new โ€œ.htaccessโ€ file.

Open up your WordPress root directory in preferred FTP client. This is typically called public_html. If you see folders name wp-admin, wp-content, wp-includes, youโ€™re in the right place. If you donโ€™t see your โ€œ.htaccessโ€ file or Dot files, for that matter make hidden files viewable by clicking the server and selecting force showing hidden files. Now This will differ for every FTP client. Iโ€™m Using FileZilla But it should be pretty similar.

Once you should find your โ€œ.htaccessโ€ file, rename it โ€œ.htaccess.offโ€. This essentially deletes your siteโ€™s โ€œ.htaccesโ€ file. So now we need to create a new one. Go to your WordPress admin area, hover over setting and click permalinks. Scroll down to the bottom of the page and hit Save Changes. Now reload your site and see if the 500 internal server error is gone, it was caused a corrupt ".htaccess" file.

Itโ€™s also worth mentioning that an improperly named โ€œ.htaccessโ€ file will cause this error to run on your site. So make sure itโ€™s not named anything other than โ€œ.htaccessโ€.

So if youโ€™re still having an issue, then letโ€™s talk about another common cause of this issue, which is exceeding your servers โ€œPHP Memory Limitโ€.

PHP Memory limit Issue In WordPress

This usually happens because of poorly coded plugin running on your site or using too many plugins. Youโ€™ll begin to exceed the PHP memory limits set by your hosting provider and either of those things happens, the result becomes a

500 internal server error.

Once again open up your root directory and locate the wp-config.php file. Open your file in your preferred text editor and add this bit of code under the opening PHP tag:


PHP Memory Limit
define( 'WP_MEMORY_LIMIT', '256M' ); 

Save the file and re-uploaded it to your root directory. Now go ahead and refresh your website. If youโ€™re still seeing the error, then youโ€™re not having โ€œPHP memory limit issues. If that did not fix the issue, then remove those line of code. Because it wasn't a problem. If those line of code worked, then great.

I still recommended figuring out what caused you to reach the limit and you could always ask your host to increase the limit on your server.

But if both of those solutions did not work for you then letโ€™s try a few less common solutions.

Deactivating Plugins

If youโ€™re able to access the WordPress admin area, deactivate your plugins one by one. Refresh your website after each deactivation and if the error disappears, it likely caused by that plugin.

If you cannot access the WordPress admin area, then go back your FTP client and open the root directory and open up the wp-content folder. This folder contains your plugins, your themes and other folders. Rename the plugins folder to anything you wish likeย "". This deactivates all the plugins on your site.

Now refresh your site and check If the error is gone.It was caused by a faulty plugin. After going back and enable them one by one to figure out the culprit. If that didn't work then be sure to revert your folder back to just plugins.

File Permission

AS for other solutions which are more unlikely. You can check the file permissions in your WordPress directory. They should be 755 or 644. If not, the could be causing the 500 internal server error.

Upload Fresh Version

You can also upload fresh versions of wp-admin and wp-includes to your site. But this should be a last resort. Again backup your website before trying this.

Once you do simply redownloadย  WordPress and only upload the wp-admin and wp-includes folder to your root. If this works, that means you had a corrupted core file.

If none of these solutions worked for you then the only option left is to give up.

Ha Ha Haโ€ฆDonโ€™t worry, Iโ€™m just kidding.

What you need to do now is contact your host. Many hosts wonโ€™t be much of a help in and theyโ€™ll actually blame your siteโ€™s files for the issue which again is definitely a possibility. So you've really tried all the steps I mentioned before contacting them. If you tried everything then politely ask them their server logs to see if the issue is there.

At the end of the day, I recommended you backup your website on a regular basis and update your plugin, themes, and WordPress core files as soon as theyโ€™re available to prevent this from happening

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Privacy Policy