You move your lovely stable site from your odl server over to a shiny new system. All should work fine. the wp-config.php is the same, the database backups have been working for years and ahve been used for previous migrations so you know that encoding and all those other things that can go wrong during a database migration are all absolutely fine. But yet when you launch the site on the new server, you are presented with the lovely WordPress install wizzard. Not really what you had expected was it?
I encountered this today and spent about two hours looking through absolutely everything to try to find out what was going on.
- database connection string hadn’t changed so that was correct.
- Table prefix hadn’t changed of course. But we’ll come back to that one in a minute.
- Database permissions were all correct.
- No funny characters had crept in during the migration of the database.
- Nothing was wrong with the backup archive. Checksums matched.
- Just in case, I did a full restore all over again.
- I even ran a comparason between all the config files.
I found a few posts around the Internet that said the prefixes had to be the same but that’s strange. I don’t have all my prefixes the same. At some point during a previous installation or a test many years ago I changed the prefix but then just left that old test system in the same database. Not very good. I know. But anyway. It worked on the old server so it should work here.
So how did I resolve this?
It’s strange and I really don’t like it. But here goes.
- go change your wp-config.php
- Give it the old prefix
- Fire up the site. You’ll see the old test database tables are now used.
- That’s no good to you of course. But wait.
- Go back to the wp-config.php file now change the prefix back.
- Jump over to your site again and give it a talking to. By just refreshing the page, the damn thing came back up perfectly as if the past few hours never happened!
I really hate technology sometimes.
Anyway, it’s working again and that’s another site migrated over. It’s also about two hours of my life I’ll never get back again.