how to fix the 500 internal server error wordpress

Definite fix for 500 internal server error in WordPress

Spread the love

*Little or no coding knowledge required

The HTTP 500 internal server error happened to me twice in two days.

Now before it actually happened, I could open the website and see the home page; but the navigation menu and links were not working. In order to correct this problem, I made some changes to the code which made it worse. I got the scary little ants of Http 500 internal server error. I knew I had to spend at least couple of more hours rectifying the problem. Here’s the solution, to make it easier for you.

There was a reason it happened again the next day, and I’d tell you all about that in a while. The primary reason I got the first internal server error was that I made a lot of changes to the code. You might have a simpler problem.

Let’s see what we need to do:

Step 1.
Most commonly diagnosed problems occur with the installed plugins. So, most probably, one of your WordPress plugins is misbehaving. You might have already guessed the solution now! And that is disabling your plugins and re-enabling them one by one.

Step 2.

Now, go to permalinks in your admin panel and click on the save button to create a new .htaccess file. It’s time to refresh the web browser to see if the home page opens up.

If it does, you’ve conquered and won. All you gotta do now is delete the bad plugin. Also, make sure to check all the links are working.

But I can’t get to my Admin Panel” you say. If you can’t login or access the ‘yourdomain/login.php’ page. Fire up FileZilla. If you don’t have it click on the link and download it. Check the mail from your hosting provider for FTP login credentials.

When you have them, go to the file menu and click on Site Manager to login. Alternatively, login to your CPanel and open the hosting directory. It’s almost the same, except FileZilla or an FTP makes it easier to access this directory whenever you want, with a fewer clicks.

Once you log in, open public_html folder in the root directory or where your WordPress install is and inside it, find a folder called Plugins. Now rename the folder, such as “plugin-old.” This will deactivate all the plugins on your website. Check if your website opens up and all the links are working.

If it opens up and the links are working, it’s time to pop a beer and celebrate. Now revert back to the original name of the folder via your FTP: Renaming it back to ‘plugin’. Recreate the .htaccess file as mentioned above. Activate the plugins one by one to see which one’s at fault. Contact the plugin writer to fix the issue. Please don’t lambast them or piss them off.  They have probably made an awesome plugin for you to use.

If the links aren’t working but the home page is opening up, try checking your code in the WordPress admin panel. We’ll talk about this in another post because, like me, you have probably messed it up.

However, if the website is still not opening up and you are unable to access the login page of your admin panel, move to step 3.

Step 3.

If the internal 500 error is like my ex, she won’t give up. What do you do? Get a fresh download of WordPress, and replace wp-admin and wp-includes folder via your FTP/CPanel. Recreate the .htaccess file, if you haven’t already. Still no resolution?

Step 4.

If you are using a child theme (not same as having a baby), the solution is way easier for you. We’ll talk about how to create a child theme in a later post; however, if you do have a child theme, go and make a copy. You can do this by dragging and dropping the ‘child theme’ folder from the ‘themes’ folder inside ‘wp-content’ folder to your PC using the FTP or the CPanel. Now delete this child theme and everything should go back to normal. To delete you have to select a new theme and revert back from your WordPress admin panel.

Now see if you remember the customizations you had made earlier.  Copy them to the new child theme. If it doesn’t work, keep the child theme, delete the parent theme, get a fresh installation of your theme and try again.

Step 5.

The second time I got the 500 internal error on my WordPress website was because I had changed file permissions for the .htaccess file and forgot to revert. The default permission for all files and folders are either 0644 or 0755.

You can see the permissions in your hosting browser panel on the right-center in FileZilla. If you find an anomaly change the permissions back to default by right clicking on the file or the folder.

The permissions panel in FileZilla

Checking permission in wordpress and changing only takes a right click

I bet it’ll work this time. If it did, give us a treat by sharing this page.

If you want to learn how to use CPanel: Go to your hosting providers website. Search using keywords “Using CPanel”. Don’t be afraid to experiment. Take your backups and nothing can go wrong. You are invincible.

FileZilla is free and open source. Always download it from official page.

 

 

 

 

 

Posted in Blogging, Hosting, Social Media, WordPress Hacks and tagged , , , .

Leave a Reply