Build Your Own Business Website header image

Community Library Website – Part 13 – Import Existing Data Using the CSV Importer Plugin

Difficulty Level -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

This is the thirteenth in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). We are using the CSV Importer plugin to import an existing database from a CSV file. In this step we actually import the data, find an error and restore the database to the pre-import condition. Next, we fix the error and try again.

Community Library Website – Case Study Part 1 – Site Organization
Community Library Website – Case Study Part 2 – Create Custom Post Types
Community Library Website – Case Study Part 3 – Custom Post Type Configuration
Community Library Website – Case Study Part 4 – Custom Taxonomy Decisions – Theory
Community Library Website – Case Study Part 5 – Custom Taxonomy Decisions – Practical Application
Community Library Website – Case Study Part 6 – Incorporating Existing Data Into the Project
Community Library Website – Case Study Part 7 – Creating Hierarchical Custom Taxonomies
Community Library Website – Case Study Part 8 – Creating Non-Hierarchical Custom Taxonomies
Community Library Website – Case Study Part 9 – Creating Custom Post Meta
Community Library Website Case Study – Part 10a – Restore the Database Using BackupBuddy
Community Library Website Case Study- Part 10 – Creating Custom Post Meta – Continued
Community Library Website – Part 11 – Importing Existing Data to the Website
Community Library Website – Part 12 – Prepare Existing Data for import by the CSV Importer plugin
Community Library Website – Part 13 – Import Existing Data Using the CSV Importer Plugin
Community Library Website – Case Study Part 14 – Date in Permalink Configuration
Community Library Website – Part 15 – Importing Images
Community Library Website – Part 16b – Final Data Import
Community Library Website – Part 17 – Add Thesis Post Meta to Custom Post Type
Community Library Website – Part 18 – Add WordPress 3.0 Menus
Community Library Website – Part 19 – Add Post Meta and Taxonomy Information to the Post Display
Community Library – Part 20 – Add topics and audience to book display
Community Library – Part 21 – Display the Rest of the Post Meta in the Post
Community Library Website – Part 22, Create the Permalink Structure
Community Library – Part 23 – Remove Custom Post Meta from Post Display
Community Library Website – Part 24, Add Taxonomy and Post Meta Data to the Teaser
Community Library Website – Part 25, Add Taxonomy Data to the Teaser
Community Library Website – Part 26, Adjust the Teaser Styling Using Design Options
Community Library Website – Part 27, Styling the Teaser Using CSS
Community Library Website – Part 28 – Fine Tune the Teaser Display
Community Library Website – Part 29, Designing a Custom Catalog Page
Community Library Website – Part 30, Using a Query String in a URL
Community Library Website – Part 31, Adding Custom WordPress Menus
Community Library Website – Part 32, Add Custom Menus to the Catalog Page
Community Library Website – Part 33, Add Another Custom Menu to the Catalog Page
Community Library Website – Part 34, Troubleshooting Custom Menus
Community Library Website – Part 35, Add Styling to WordPress Menus
Community Library Website – Part 36, Add HTML Markup to WordPress Menus
Community Library Website – Part 37, Add WordPress Menus to Archive Pages
Community Library Website – Part 38, Add and Style a List of Tags
Community Library Website – Part 39, Add a Search Box to the Sidebar
Community Library Website – Part 40, Add Links to the Sidebar
Community Library Website – Part 41, Add Taxonomy Drill Down Browsing
Community Library Website – Part 42, Custom Loop to Display Custom Post Types
Community Library Website – Part 43, Simple Custom Query
Community Library Website – Part 44, Custom Taxonomy Query
Community Library Website – Part 45, Add Thesis HTML Structure to Teasers
Community Library Website – Part 46, Display Posts from the Last 60 Days
Community Library Website – Part 47, Custom Loop If Have Posts
Community Library Case Study – Part 48, Increase the Number of Posts that Display on the Custom Catalog
Community Library Website – Part 49 – Naming Conflicts in Custom Taxonomies
Community Library Website – Part 50 – Find and Replace Semi-colons in the Database
Community Library Website – Part 51 – Modify Taxonomy Names Directly in the Database
Community Library Website – Part 52 – Sort Posts by Meta Value
Community Library Website – Part 53 – Show the Term Label Only when a Term Exists
Community Library Website – Part 54 – Sort Archive Posts by Meta Value
Community Library Website – Part 55 – Add Sort Order to Custom Taxonomy

Video Transcript

Rick: And then we’re going to go back to our website and import it. And it’s not going to work right, I just wanted to go through the process of fixing it once it doesn’t work right once. So if we come down to CSV Importer and we choose a file and we scroll down here to wherever book 1 is. Book1.csv, open that up. Import and in about 12 seconds, we’re going to have something that says it imported. Okay, 1049 posts were inserted and if we come over and look at catalog items, now you can see that we have all of these different posts here. And if we look at patron saints for post moderns, you can see that the book has been selected for the media type. Biography has been selected for locations. No topics were added. It was given an adult… it was given 2 authors: Armstrong and Chris. And then we got a barcode and a call number and an ISBN number and a publication year. And what we didn’t get was a circulation time although we actually did get a circulation time because if you looked down at our custom fields, it shows 14 days. It just doesn’t show up here. But which I don’t think really matters that much.

And so, we’ve got all this data in but this is a mistake. And so, what we have to do is throw this all away, fix our mistake, and reimport it. And so, the way we’re going to do that now is we come back over to Bluehost and we’re at our database. We check all of the database tables. We drop all those database tables. We say yes to that. So now, we have no database tables left in that so all that data is gone. And then what we’re going to do is we’re going to import the data that’s down here that we saved before. And so, we’re just going to choose the file and the file for me is in Downloads and… what’s the name of that file again? I’ve forgotten already. BYOB tuto and so… let’s see… byobtutoword27, this is it. So now we’re going to say go, okay. Now we can look and we’ve got our old database back and if we come back over here to catalog items, we no longer have any catalog items there. But our custom post types, if we look at our manage custom post types, we’ve got that in as we saved it and we’ve got manage taxonomies in as we saved it. And we’ve got our Verve meta boxes in as we saved it. And I had to do this myself. Since you’ve seen me worked this out, you probably won’t have to do this often but really, I had to do this like 15 times in order to get this right. And so, if you do this little backup at this very point, at which you are 100% ready to upload, then you can just get back to this 0 point anytime you want by clearing the database and then restoring the old database.

And so we’re going to fix this file one more time. We’re going to go to this and then go to our author and we’re going to command H and we are going to replace…actually, the first thing we’re going to do is… no. What we’re going to do is we’re going to replace *, *. So that’s this condition, that’s some letter wildcard, a comma, a space and another wildcard and we’re going to replace that condition with semi-colon space. So we replace all of those… no, that’s not what we wanted. Control Z… okay, close. Control Z, okay. Maybe that’s all we have to do. It’s just control H, forget the wildcards and it’s going to be comma space and we’ll replace with semi-colon space. Replace all… okay comma space, replace all. Okay, replaced 210 of them, close. So now we’ve got our semi-colons in there. So now we can save this again, save as… and we’re saving it as book 1 again. Save it… yeah, okay. And now, we’ll import it and it should actually work fine.

So go down to our CSV importer, choose the file… oh it’s on my desktop. Book1.csv, import and hopefully what we’ll have now is a single author name where there is a single author. Okay, we’ve imported 249 posts and now we go back to our catalog item. What ha Christianity every done for us? We hit enter and now we’ve got a book, a non-fiction location, no topics associated with it. We’ve got adult audience and we’ve got Jonathan Hill as the author. And if we wanted to just take a look at topics for a moment and see how many topics have been added to the site, not very many actually. Yeah, these are the only topics that have been added to the site and there are not very many catalogs or items with that. Pam, I’m going to turn your microphone back on. Does that look right? Is that… how many…

Pam: Yes, probably because I’ve just started adding topics. So there’s a lot of… most of the list don’t have topics yet.

Rick: Okay. And so, we’ve got these audience members, we’ve got tons of authors obviously. And we have these media types and these locations. And if we open a catalog item, we have you know, each of these things that can be chosen and added to and that kind of stuff. And so, what we’re going to do next is we’re going to start looking at ways to view these and yeah…I think that’s what’s next. You know, look at ways to view them. So let’s see, I’m going to turn your microphone back on here for just a second, Pam. Pam, is there anything else you want to ask or add to this?

Pam: Yes. I was hoping that the body of the post would show the field summary. Now, every item does not have a summary but the ones that do, the summary is what actually describes the book. And I thought that…

Rick: Why don’t you give me an idea, a name…one with the summary in it?

Pam: Hang on a second. I have to check my…

Rick: Actually you know, I can find one here. I’ll just look in my thing here. Okay, so summary…so A Place of Healing.

Pam: Yes, that’s a good example.

Rick: Okay. So if we search for… okay, healing.Okay, A Place of Healing. If we hit edit here, there it is. The summary did end up inside this section here. And in fact, so did the subtitle right? The subtitle we have showed up down here as a custom field and that was one thing we haven’t done yet was set up the other bits of catalog information. I forgot about that. So we need to add that into here as well so I’m going to work on that. We’ll do that again tonight but… so does that work the way you thought it should?

Pam: Yes, that’s right. When you get farther down the road, you’ll want subtitles to appear at the top of that body of post because it will be formatted in a way that stands out a little more as a subtitle.

Rick: Yeah and so, it’s never… the subtitle will never be in this box here. We’ll just add the subtitle to the display. That’s the way it’ll work.

Pam: Okay, that’s great. Looks great.

0 Comments… add one

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
THIS IS A LIMITED TIME OFFER!
Subscription Options
0 comments… add one

Leave a Comment