An Easy Fix To The Evil WordPress 404 Error

An Easy Fix To The Evil WordPress 404 Error

So, you’ve recently changed your site’s URL or moved your blog files around on your server, and now your blog is broken.

You’ve tried a million things and you can’t figure out why it’s happening or how to fix it.

Every time you navigate to your wp-admin or wp-login screen, you get an endless loop of redirects that finally ends at… “Error 404 – Not Found”.

Or, maybe you can log onto your WordPress admin panel just fine, but all of your site posts and pages still give a 404 Error.

You’re ready to give up WordPress  for good, cry like a baby, or pull an “Office Space” on your computer. Maybe all three.

Not so fast, PUT THE BASEBALL BAT DOWN.

There’s still hope.

When I first ran into this problem, I searched high and low for a solution for literally hours on end. I nearly gave myself an aneurysm figuring it out, but I finally did it.

I’m sharing it with you for the sake of your blood pressure. No one should have to go through that alone.

Instead of following all of these steps, it’s simpler to do one at a time, seeing if your site is up and running again after each step.

    1. Clear your browser’s cache.

    2. If you can access your WordPress dashboard and admin panel, and you’ve been using custom (otherwise known as “pretty”) permalinks, change your permalinks back to the default setting.

    3. Through FTP, CPANEL, or your hosting provider’s File Manager dashboard, find your WordPress blog’s wp-config.php file. Save a backup copy before you make any changes, just in case you accidentally delete something you didn’t mean to. Then, add this code to the original file and save it:

      define(‘WP_HOME’,’http://example.com’);

      define(‘WP_SITEURL’,’http://example.com’); 

      Make sure that you change ‘example.com’ to your actual website’s name.

    4. If you have the “Customizable Permalinks” plugin installed and activated, disable it. If you don’t have access to your WordPress dashboard, you can do this by going to the PLUGINS folder on your server, finding the one that says “Customizable Permalinks”, and deleting it. Don’t worry, you can always easily reinstall it again later if you need to. 

    5. If you have the “All-In-One-SEO” plugin installed, disable that as well.

    6. If you have a lot of plugins installed, it’s a good idea to rename your plugins folder temporarily and see if that fixes the problem. If it does, you can reactivate them one-by-one from your WordPress panel. If your site stops working again after activating a plugin, you know which one is the culprit.

    7. Repair the tables in your database. This might be a little tricky if you’ve never dealt with MySQL or phpMyAdmin before. I found a great short tutorial with screenshots that is aimed at beginners here. Follow those instructions, then come back and proceed to the next step.

    8. Change permalinks back to whichever custom setting you were originally using.

Now, everything should be back to normal.

Now go have yourself a celebratory beverage of some sort.

Questions or comments? Feel free to post them in the comments section and I’ll do my best to help you out.

You might also like: