I was recently moving a small website from my localhost to the live server on Dreamhost using my standard deployment process.
Everything was running smoothly after installing WordPress on the live server, but when I migrated the database the installation screen came back. This was driving me crazy.
- I installed WordPress using “One-Click Installs” in Dreamhost admin panel.
- I uploaded theme, plugins and uploads folders to the live server and run the WordPress installation.
- The site was showing the default theme when viewed in the browser. Perfect.
- I used WP Migrate DB to export the database from my localhost.
- I dropped all tables in the current live database.
- And imported the database to the live server using phpMyAdmin.
- When I viewed the site in the browser again it did show the installation screen again. Hm that’s weird, I did this so many times before and never had the same issue. I repeated the whole process couple of times, thinking that I have made some mistake on the way. After few tries I got crazy, and you probably going crazy now.
Relax, the fix is very simple
Dreamhost by default sets the table prefix in the wp-config.php file to something like this:
// Dreamhost default table prefix $table_prefix = 'wp_ab23rB';
Your localhost wp-config.php looks probably something like this:
// Localhost default table prefix $table_prefix = 'wp_';
Fix the issue
- Simply change ‘wp_ab23rB’ to ‘wp_’ in the wp-config.php on your live server.
- Drop all tables and repeat database import in phpMyAdmin again.
You should now see the same site as you have developed on your localhost.
It took me some time to figure out what is going on, so I am putting it out here to save someone else’s time.
Like What You're Reading?
Sign up to receive my future tutorials and demos straight to your inbox.
No spam, Unsubscribe at any time.