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

WordPress

Migrating WordPress site

Hi everyone,

I've built a WordPress site for someone which I have uploaded for testing here - nomaankhalid.wordpress.edeharrison.com. Now I'm ready to move it to his domain name - blackbeard-mma.com.

Both are registered in my GoDaddy account, along with hosting. During a migration you usually have to export your database, create a new one in the phpmyadmin related to the new domain, then import it there.

Because I'd just be exporting, then importing into the same phpmyadmin, is there a way around this?

Essentially, I would be pointing two sites to the same database. I'm guessing that wouldn't work? But if I deleted the testing site, could I just leave the database as it is and point the new site to it?

Cheers,

Ede

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

When you're exporting multiple Wordpress sites on the same domain you can usually separate them (or distinguish them) with something called a table prefix. There's an option to add this when you install Wordpress to your service.

So one Table prefix could be wp1_ yourdatabasename and the other could be wp2_ yourdatabasename here. I've not done this myself as I tend to prefer one database for each Wordpress installaton but it should work. :-)

Hi Jonathan,

Cheers for the answer, that's some useful info. Didn't know about that option on a WordPress install. I'll keep an eye out next time I go through the process.

All the best,

Ede