Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms

I am importing a large DB from an Excel spreadsheet into a wordpress DB. I was going to do it manually by creating a new table but decided to import it into the existing wordpress framework as it will allow me to change information manually in the wordpress back end.

I was importing all 2000 rows into the wp_posts table when I realised this table doesnt have a term column. The terms are stored in other tables.

My question is… how can I import the spreadsheet into the database and keep all of the important data, especially the terms, as my site queries all information by the “term” and uses jQuery tabs to display the different terms as sub-categories.

My information looks like this:

post-title(title)---category(term)---description(content)---imageUrl---price

Note: I will create a seperate column in the wp_posts table to handle the price, or any other information I need bringing in, Im just unsure about how I can get the term information into the corresponding tables…

Thanks 🙂

2 Answers
2

I don’t think you should create a new column in wp_posts…

This kind of info is stored in wp_postmeta.

When I need this kind of importing (Excel->WP), I use CSV Importer, as you can assign categories, tags and custom field to the imported data.
You’ll probably need to do a couple of tests with few entries until get the right CSV format.

And maybe, you’ll also need to manipulate the CSV in an advanced text editor before importing (as Microsoft software is not always that smart).

Leave a Comment