PROBLEM: All my pages and posts return 404 errors after migration.
This is what I did:
From my original server (Server A):
1. exported the mysql database to my desktop
2. downloaded all wordpress files to my desktop
To my new server (Server B):
3. Uploaded all wordpress files from my desktop
4. Created a new database
5. Uploaded all wordpress files to my new server
6. Edited the DB_NAME, DB_USER, DB_PASSWORD and DB_HOST settings in the wp-config.php file on the new server.
At this point the site looked and worked great on the new server.
BUT, I noticed that when I clicked on any link (image, page, post) it redirected to the files on my old server.
7. I installed the Search & Replace plugin to change all the initial URL strings from server A to server B. Everything worked fine, but pages and posts were still redirecting to the Server B.
This is where I went wrong:
8. In the General Setting section of the wordpress admin tool I changed the WordPress Address and Site Address settings to reflect the new server location.
That's when everything stopped working.
I've deleted the database and all the wordpress files on the new server and repeated steps 3-6 above. The home page shows up ok, but clicking on anything gives now me a 404 error.
Bizarrely, the same is also now true for Server A.