Update March 2019: Yes, it can be scary to think that you’ve lost your website! But don’t panic; we have a solution. And now we have a visual solution too, thanks to the addition of screenshots. Let us know if you have any problems!

Today I ran into a pretty darn frustrating problem. I had moved a WordPress-based client website offline to work on it, and somehow lost ALL of my interior pages.

My home page, the index.php page, came up fine, but every link I clicked on led me to a 404 Not Found Page.

After double-checking that the WordPress database had been moved properly, I started poking around online.

As you probably know, trying to figure out the solution to your problem online can be just as frustrating as the problem itself. I figured I would post this solution in the hopes of saving you hours of searching around to try to fix your problem.

If this happens to you, there are several things you should try.

(NOTE: I shouldn’t have to say this, but pretty, pretty please back up your database and files before you do any of this stuff!!)

Here’s the solution to the problem of all your WordPress page showing a 404 error except the homepage.

If You’re Using WAMP

I was using WAMP, so if you’re using WAMP, go to Apache > Apache Modules  and make sure rewrite_module is checked. (This was my issue and it is a super easy fix.)

WAMP Server rewrite module

Fixing 404 Errors Through WordPress Permalinks

If you’re not using WAMP, here’s a compilation of other things you can try that might solve your problem:

Simple first! Go to your WP dashboard and go to Settings > Permalinks and make sure your permalinks are set appropriately if you have a custom structure. I usually just use /%postname%/ but if you have something like /%catagory%/%postname%/ make sure that everything is spelled correctly and that you have the appropriate slashes.
Setting Permalink
Permalink setting 1024x536

Fixing 404 Errors Through Your Server

Access your httdp.conf file on your server and find where it says  AllowOverride None and change it to AllowOverride All There are a few of these commands, so make sure you get the one in the Directory section.httdp.conf file

If neither of those works, you can try out some of the other fixes suggested by WordPress.

And of course, please post your own solution if you figured this out so that everyone else can find it too!

If you’re running into the WordPress 500 Error, we have the perfect guide for you: How to Easily Fix the WordPress 500 Internal Error.