Build Your Own Business Website header image

Community Library Website – Part 51 – Modify Taxonomy Names Directly in the Database

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 51st in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS) for a Community Library Website. In this lesson we directly modify the data in our database using phpMyAdmin and MySQL statements.  We previously changed the name of a custom taxonomy, now we search for that taxonomy name and replace it with the new name.  We use the UPDATE and REPLACE statements.
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: Yeah and unfortunately, now what has happened is I have in this process… I have… it looks like I killed all my catalog… oh no, I didn’t. There they all are. Okay, so edit and audience… you know, we killed all our authors though with this. I can see that now. I lost all the authors when I made that change with this thing being full.

Pam: Oh, they may not have come in because that was what was preventing authors from importing correctly.

Rick: Well, but this was my old system and I had authors earlier today. So I’ve killed the authors by making this change with all the authors in place, it looks like. Somehow when I did this edit, it demolished authors.

Pam: What the semi colon replacing… I’m wondering if that’s something that should be done in the test field as part of sanitizing the data before…

Rick: Well in fact, that’s what I did. That is the one I worked on. Nobody else knows about this and I’m going to find time to go through this process but one of the conclusions that I drew as Pam and I were working through this process of importing that data was that the data… rather than importing the data directly into our working website, what we ought to do is import the data into another website. Sanitize it in that other website and then use the WordPress export feature to export the data as a WordPress export file and then import it back into the working site. And you know, I don’t think that’s going to work… I didn’t really anticipate doing that here so I don’t believe I have all of my images correctly laid out in here. I’m going to do one quick thing though. I’m just going to look at this, see if I can repair that database. That was word 27 and if we go to terms… I have 204 terms in here.

And so I clearly have names in here. So I’m going to term taxonomy and look at… I’m going to look for all instances of author. So in the terms taxonomy table, let’s go ahead and select from term taxonomy where taxonomy…we’ll just say like and then single quote that author… percent sign single quote. Let’s just see if this produces… go. Okay, that produces 94 results and they are… you know, I think we can change this really. I think what we can do here… we’re just going to try that. Since I screwed up the database anyway, we’re just going to go back to MySQL and we’re going to say update wp term taxonomy and we’re going to set taxonomy equals replace and then that’s going to be taxonomy… comma and then it’s author comma and then we’re going to say item-author. You know, I bet this is going to fix that problem. Let’s give ourselves a space there so… the wp term taxonomy table, set taxonomy equals replace taxonomy… looking for this string of author. We’re going to replace its string with item-author. Let’s go ahead and go. Okay, 92 rows were affected. Let’s go back to our catalog items and then let’s look at our authors list. There we go, it worked. Okay, hot dog. So I got my authors back so not only did we learn something…

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