WordPress Internal Server Error

Receiving a 500 WordPress Internal Server Error is one of the most frustrating error messages out there in blogworld. And what makes it even scarier that you usually get this message after a WordPress update which should go smooth and effecting you not more than hitting a button.

But damn. Here you are. Your recently working site is down – or if you are lucky enough your site is working but you can’t log in or even reach your wp-admin area.

As the reasons behind a WordPress internal server error can be many, there are countless suggestions and solutions for this problem on the Internet. I give you here those solutions that actually proved to be successful for me so far. Also I show you a very simple reason for this problem, which is not being talked about very often.

WordPress Internal Server Error 1

So when WordPress Internal Server Error hits – how big the problem is?

Not really big. Staring at a blank screen with a scary number >>**500**<< and a mystical message like “Server Error” will cause not only your computer but also your brain freeze. You’ll shortly believe that the hard work of your last months or years is just easily gone.

Forpsi Internal Server Error
One of the scariest screens for a website owner out there

On the other hand the only two reasons you get frustrated about this is because it hits you unprepared and without any knowledge how to deal with it.

Dealing with a server error is common for people who operate websites. If you know the solutions, keep calm and don’t do anything stupid to your site, you can usually turn it back up and running within a few minutes.

The very first step

Before getting to the point, please give me and your site a few seconds. If you are here reading this, you’ve probably just experienced what WordPress Internal Server Error means and want a very fast solution. I think you must have been in the middle of a WordPress upgrade process, as this is it when the server error usually hits unsuspecting bloggers.

Always backup your files and database before update. If you haven’t do so, please go now and do it before doing anything else with your site. Log in to your ftp account, download and save your wp-content/themes/[yourteheme] folder, also your wp-content/uploads folder. In the meantime log in to PhpMyAdmin (accessible generally from your cPanel) and simply export your database. This will add another few minutes to the process, but it will surely save you from any data losses that might occur during the recovery process.

WordPress Internal Server Error: check file permission settings

This is what I rarely read about, but almost every time I experience a WordPress Internal Server Error, there is something messed up with the file permissions. This kind of problem never arises with a reliable webhost like Bluehost, but I work with a ton of hosts for some clients and you never know this before your first live WordPress update.

In your ftp client (I recommend Filezilla – it’s free) you have on option like “file permissions” (right click on any folder or file in Filezilla). Without being too technical, for directories you should see 755 and for files 644.

Set file permissions in your FTP client
Set file permissions in your FTP client

If this is messed up — you see things like 700 or anything similar — , just correct it. Enter 755 for all directories (you can do it recursively only for directories) and 644 for files, hit OK and let your ftp client go through all the files and set up the correct permissions.

For some hosts the file permissions also need to be 755. This is bad setting on the server side, but I had recovered a WordPress site from internal server error this way. Simply selecting every file and directory and setting the permissions to 755 recursively resolved the problem. If this is the case, I strongly recommend you to change your hosting provider, but for this time you solved the situation.

WordPress Internal Server Error: when plugins clash

One of the most typical reasons behind a WordPress internal server error after upgrade is that one or more of your plugins just don’t work together with the actual WordPress version. For this situation, the typical (and good) recommendation stars with “deactivate all your plugins“. But how can you do this if your main problem is that you can’t access your wp-admin area?

Here is the solution!

Deactivate WordPress plugins without wp-admin area

You can do this in two ways and I’m going to show you what I think it’s way more easier and less likely to cause any undesirable results.

Once again use your good old friend, the ftp client and go to your wp-content folder. (Note that if your server is OK in general, you’ll be able to use your ftp client even if your site or your wp-admin area says WordPress internal server error).

Inside the wp-content folder you can see a “plugins” folder, containing basically one folder for each one of your plugins.

wp-content folder
Your wp-content folder

Right click the “plugins” folder, click “rename” and give the child another name. Anything is OK, like plugins.old. The main point here is that once there is no plugins folder in your wp-content directory, WordPress will think there are no plugins, forcing itself to deactivate all previously activated plugins. And this is exactly that you want.

Rename plugins folder in wp-content directory
Rename plugins folder in wp-content directory

How to repair the bad plugin

  • Now try to log in to your wp-admin area, and in most cases you should see everything working. I promise you’ll feel so relieved after hard minutes or hours of trying to repair your site, the first time being able to log in to the admin area. But you are not finished yet. You need to manually reactivate all your plugins and find and kill the bad guy.
  • Go back to your ftp client and rename your plugins.old folder back to its original name, plugins. Don’t worry, this step won’t reactivate your plugins.
  • Now back to your WordPress admin area, under Plugins » Installed Plugins you should see all of your plugins listed but being deactivated.
  • What you should do now is update every plugin where applicable. This sometimes solves the problem as the plugin developer might have already handled the situation with an update.
  • Now go through all of your plugins one by one. Update them if applicable, then activate them. If the internal server error doesn’t come back than go to the next plugin.
  • When you find the bad guy, once again you’ll see the internal server error message. But this time stay strong and happy, you are just a few clicks away from the solution.
  • Once again go back to your ftp client. Go to wp-content/plugins and simply delete the directory with the faulty plugin in it. (Or keep and rename it like you did with your plugins folder if you wish to tweak it later.)
  • Go back to your admin area and continue activating your plugins one by one until you are done.

That’s it, I hope by this time you’ve corrected your WordPress 500 Internal Server Error 🙂 .

WordPress internal server error how to avoid

How can you avoid WordPress Internal Server Error?

The short answer to this question is there’s no way. If you use WordPress I bet you’ll bump into an internal server error sooner or later. But here are a few tips you might consider in order to lower the risk:

  • Choose a good, reliable and proven host. As always, I recommend Bluehost where I never experience this problem. At the time of publishing this post WPCookHouse runs on their server.
  • Don’t use unnecessary plugins. It’s very easy to jam-pack your WordPress installation with tons of useless and crappy plugins. It’s much harder to find out what’s wrong with your site in that case.
  • Only use reliable WordPress themes. A bad code in your theme can cause a server error, sometimes only years after installing it. And please note that these solutions I suggested here won’t fix your problem if the problem is in the theme files.
  • Remove all your plugins and themes that you don’t use.
  • Update your WordPress core files, plugins and themes periodically.

Good luck and let this be the last time you see an internal server error on your WordPress installation.

Keyboard picture courtesy of jronaldlee, Flickr.

2 thoughts on “WordPress Internal Server Error”

Leave a Comment