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

James Ingmire
James Ingmire
11,901 Points

Moving an already existing database to a Wordpress.org site?

Is it possible and if so are there any links to a tutorial?

Thank you in advance.

Colin Marshall
Colin Marshall
32,861 Points

What is in the database that you wish to use with WordPress? Users? Posts?

5 Answers

Joe Hirst
PLUS
Joe Hirst
Courses Plus Student 6,489 Points

Hi James,

Is the existing database a WP database, or just a pre existing one that you’re trying to put into your Wordpress install?

Matt Campbell
Matt Campbell
9,767 Points

This isn't going to work. The database keys aren't going to be the same as those generated by WordPress so it's not going to happen.

You're going to have to convert the old database into a WordPress database which means changing over the all the keys to match what WordPress will want to see.

James Ingmire
James Ingmire
11,901 Points

This take a while i'am guessing? Around 700 members in the old database. Do you know of any articles available to read regarding the process, or would you recommend not using WordPress and learn about databases from scratch, I've got a few months before building begins, if so again do you know any good places to start to gain the knowledge to do this kind of stuff, Treehouse?

Thanks for reply.

Matt Campbell
Matt Campbell
9,767 Points

If you don't want to input the information again, you have two choices:

1) Build something custom revolving around the custom database structure.

2) Work out what WordPress will and can use, delete what it won't and can't and then run search and replaces converting what's left into the corresponding WordPress format. You'll need to know your way around mySQL and have some patience, back up after every run and do it a little at a time.

James Ingmire
James Ingmire
11,901 Points

Just a pre existing one. Thanks

Joe Hirst
Joe Hirst
Courses Plus Student 6,489 Points

Okay, gotcha!

Assuming you have the database downloaded, if you navigate to your “phpMyAdmin” through your web host or localhost and log in (Depending on where you are working). You should have a list of databases in front of you.

From here, you can either edit, change, create a database etc.. Click the “databases” tab (it should be one of the first tabs at the top of your phpMyAdmin page) you should see the option to create a new database now. Go ahead and create a new database. After that, click the database you have just created in the list below the “create a database” area.

Now, you will be inside your new database. from here you can select “import” and follow the import instructions for the database you are importing to Wordpress.

While i’m not 100% sure what your overall goal is with this database, I may be able to help you further depending on your needs. I hope this at least helps you get your database where it needs to be.

Here is a comprehensive link to transferring databases in Wordpress, it might be of further help.

James Ingmire
James Ingmire
11,901 Points

Thanks very much yea that's some good info and can work with the process you described. Ultimate goal is to create a new WordPress site with the existing customers from the old non wp-site. So presume once the database is connected then i can use a plugin on the site to connect the two, first time properly using wp so bit of a beginner on this one:( Many thanks again.

James Ingmire
James Ingmire
11,901 Points

Hi Colin, just user and password details. Thanks