How to fix a random 500 internal server error on your website

How to fix a random 500 internal server error on your website

Recently, my Uptime monitor notified me of a site I manage being down. I immediately went to check out what was going on and found the site giving off a 500 internal server error.

I hadn’t performed any updates on the site recently and was the only one with access to modify code. My security monitor affirmed there was no recent intrusion, malware or nefarious code on the site. Nothing I could point to that could have been the cause of this error.

The culprit? A corrupted .htaccess file.

How .htaccess files can  lead to 500 internal server errors

The .htaccess file is an essential WordPress file that controls how your server functions and runs. Sometimes this file can inadvertently get corrupted by plug-in, host or server inputs.

To check if the .htaccess file is the culprit, simply:

  1. Access the server via SFTP
  2. Find the .htaccess file in the root directory
  3. Rename the file to something like “.htaccess.old” and then save (with no .htaccess file visible, the server will automatically regenerate a new file)
  4. Wait a few short minutes for the server to regenerate the new .htaccess file
  5. Once regenerated, check your site’s  homepage and see if the 500 internal server error is gone.
  6. If it is, log-in to your WP-Dashboard and reset your permalinks (Dashboard -> Settings -> Permalinks -> DON’T CHANGE ANYTHING, just Click “save changes”)
  7. Go back out and check the rest of your site to make sure everything is appearing properly

This simple fix, helped me quickly get my client’s site back up and running without hardly anyone noticing the downtime.

If only all fixes were so simple 😉

Want to ensure your site stays secure and maintained without you having to do the heavy lifting?

See how we can save you time, money & free you up to pursue your passion & focus on what you do best.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top