Last week my site was down 4 days -ouch! I wasn’t checking the Uptime Robot emails like I should have been. By the way, if you’re not using Uptime Robot to monitor your site, you should be. But with that said, you also shouldn’t panic every time your site goes down. Sites go down. It happens. But they are usually only down for a few minutes here and there and it doesn’t really affect anything. My site was down four days and boy, that hurt my stats. Here’s what happened:
When I realized my site was sending 500 errors, the first thing I think is permission errors – has to be my htaccess file, and probably one of my security plugins was causing problems.
A quick note here: if you’re getting a 500 error on your WordPress site, there is a good chance that your htaccess file has been corrupted. You can find that file in your root directory. To get your site up and running again, change the name of your file to something like .htaccess.bak. Then, refresh your browser and go into your dashboard to Settings > Permalinks and click save. This will generate a fresh, new .htaccess file for you and get your site running again. Now, if you’d made changes to your .htaccess file, you will need to update the new file with those changes.
Now, back to the story. I figured it was one of my security plugins, so I turned them all off (I’ve turned these back on since I did the detective work), regenerated my .htaccess file and the site was back up, so I thought I was good. Then, my site went down again a couple days later. That’s when I decided I needed to investigate a little more. Looking at the backup of the .htaccess file that I had kept, and realized it was filled with referrer spam. So, I did a little investigating and found out one of the plugins I was using Block Referer Spam was no longer being supported by the author and was causing problems on other sites as well. I deleted that plugin and my site has been up ever since.
So, moral of the story is that if you’re using this plugin, time to find an alternative.