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

Joe Consterdine
13,965 PointsWorking from home with Wordpress. Do I need to create a new database?
Hi guys,
basically I need to do some work at home on a wordpress site I've been working on at work.
I'm using SourceTree and Codebase to commit and push. That's what we use.
Basically I've installed Xamp on my home computer and I've copied the repository from Codebase to Sourcetree. I've then added the SSH keys to Codebase so I can commit and push the changes.
So currently I have Xamp installed with all the files in the right place.
However now when I goto the site on my home computer it asks me to install Wordpress again, which makes sense right as I've just installed Xamp on my home computer.
I don't know anything about databases. It's now asking me to begin putting in my username/password details for that like it always does when you install Wordpress.
My question is am I supposed to install as normal and create a new account and database? Or am I supposed to transfer the current database that's stored from when I was on my work computer?
My concern is I'm going to overwrite something if I create a new one? I may be wrong.
Thanks Joe!
1 Answer

geoffrey
28,736 PointsYou are right, you need to install a database for this project to work on it locally. Either you create a new one within PHP my admin, either you import the database from you work.
This course might help you.
Joe Consterdine
13,965 PointsJoe Consterdine
13,965 PointsHi Geoffrey. Thanks for replying!
Yeah I'm still not sure. I don't have the database from work on my local machine, I don't know if I can get in any other way?
My only worry is if I create a new database from home it will override my work one?
I don't know how they work but surely if I can't access my work database how will I be able to edit the site? Does it matter?
Joe
geoffrey
28,736 Pointsgeoffrey
28,736 PointsIf you don't have it locally ( the database from your work), you have to export this one and import it at home.
If you choose to create a database at home, to work on your project, indeed you 'll loose some of your job done at work which has its own database.
I don't know on what you 've especially worked at work but elements like blog posts, pages and etc are stored in the database at your work, this means that you won't be able to get back them locally at home without exporting them and then importing them locally... If you don't, you'll have to create them again.
Same with the plugins you installed at work (if you did) you'll have to install them again locally, even if they are not "installed in the database", there is a record of the installed plugin inside the wordpress database.
However if you work on your own templates and etc, that shoudn't be a problem as It doesn't really rely on the database.