Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Question about migrating that website to live server.

I have followed the video and build up my local website, but I meet some troubles when I migrated that website to live server. I do the exactly same as in the video but after uploading files (already modified wp-config.php), import SQL files. The Wordpress still ask me to install the new wordpress! I have get around this problem over 4 hours... Please help me!

Zac Gordon

6 Answers

Tawny Bartlett
Tawny Bartlett
24,674 Points

Hi there. I just need to ask, you may not have showed it in your screenshot so you may have put it in, but have you included define( 'DB_NAME', 'database_name_here' ); somewhere in wp-config?

Yes. I put it on the top.

define('DB_NAME', 'imlewis_personal_test');

Tawny Bartlett
Tawny Bartlett
24,674 Points

Hm, if you've done a find and replace to replace your old URLs etc... how strange! (your pw is on show by the way, but presume that's just a fake one!) And your user has the correct access to the database etc? Good luck with troubleshooting sorry I'm no use...!

I have no any idea about this problem, maybe I need to contact with Dreamhost team. Thank you anyway, Tawny! (BTW, the pw is just a fake one :)

Zac Gordon
Zac Gordon
Treehouse Guest Teacher

A few suggestions :

  • double check the DB info is all the Live server info and not local
  • Double check the server address for Dreamhost
  • Worse case, try contacting the hosting company, they may a suggestion

Try that:

  1. Backup your database through your local phpMyAdmin
  2. Upload all your files to your web server (except wp-config.php)
  3. Open the sql file with an editor and find and replace the old URLs with the new ones, for example find "http://localhost/mysite" and replace with "http://mysite.com" * don't put in find and replace the last slash (/)
  4. Open your phpMyAdmin from your live server and import the sql file to the database you have created.
  5. Change the wp-config.php to the live server's DB_Name DB_User and DB_Pass.
  6. Now if everything is ok you are ready to go.

Note: Try if you want to create a new database and double check if you assigned a Database user with all privileges to this specific database. Also see the suggestion Zac Gordon provided you.