500 Internal Server Error – WordPress Fix

We’ve all had that ‘holy sh*t’ moment, where you’ve been happily updating your WordPress website, perhaps updating a few plugins and doing a bit of housekeeping. If you’re like me, you’ll spend hours tinkering with lots of little areas of the site before committing your changes and backing up the newly updated website. In truly typical fashion, any catastrophic errors you’re going to face are going to happen just before you go to backup your server.

Today was no exception. I’d noticed a slow increase in server resource usage and wanted to combat that by making the website that little bit lighter and doing a bit more caching. Just as I’d finished up all the changes I wanted to make I decided to install a performance profiling tool to highlight those areas still needing work – this was a big mistake. The second I activated the plugin, the website ceased to work with users simply presented with a Server 500 error.

I did the usual – I disabled all plugins from the MySQL database and I renamed the entire plugin directory to be ‘plugins1’, which would effectively cause WordPress to ignore their existence. Neither of these solved the problem.

After lots of playing around, I deleted the htaccess file from the directory and the site rose from the ashes like some sort of marvelous nerdy swan but the links on the site were still dead. So, I simply loaded up /wp-admin, navigated myself to the settings>permalinks page and hit save.

From then on in, everything worked perfectly for me, hope it does for you too.