Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: [SOLUTION] Migrating categories using MySQL

  1. #1
    Thread Starter
    sciamannikoo's Avatar
    Join Date
    Jan 2011
    Posts
    23
    Thanks
    1
    Thanked 1 Time in 1 Post

    [SOLUTION] Migrating categories using MySQL

    I've just bought a license of this very interesting theme, after having tried another one from another company, that disappointed me for the very poor development and support (at least they refunded me).

    Hoping to not get disappointed also with this one, I'm trying to give my 2 cents to this forum support, with a solution I've found looking to similar issue's posts I've found here.

    My problem is that, after having created all the categories with the other theme, I didn't want to create them again, one by one, with this new theme that uses custom taxonomies (great idea btw!).

    So, I've wrote an SQL statement that solved the problem in a second.
    This requires access to MySQL: something easily solved installing the plugin wp-myphpadmin.

    The categories I wanted to migrate are all but a few ones (the ones with and ID <=3 must be kept as standard categories).

    Therefore, my statement will filter all terms in taxonomies that have ID > 3, are a "category" type and will update them ad "ad_cat":

    Code:
    UPDATE wp_term_taxonomy SET taxonomy='ad_cat' WHERE term_id>3 AND taxonomy='category'
    That's all.

    Of course, if you want to exclude more categories, you can add them in the WHERE statement (you can find their ID browsing the "terms" table, or editing them from wordpress and looking at the last part of the URL).

    I hope to have helped people-too-lazy like me

    (sorry for my English )
    Last edited by pepsi; January 18th, 2011 at 05:14 PM.

  2. The Following User Says Thank You to sciamannikoo For This Useful Post:

    pepsi (January 18th, 2011)

  3. #2
    pepsi's Avatar
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    14,883
    Thanks
    91
    Thanked 804 Times in 718 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #3
    Member iamfabian's Avatar
    Join Date
    Aug 2010
    Location
    London, ON
    Posts
    60
    Thanks
    0
    Thanked 18 Times in 11 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    i do. print. web. media. iamfabian

  5. #4
    Thread Starter
    sciamannikoo's Avatar
    Join Date
    Jan 2011
    Posts
    23
    Thanks
    1
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    pitarr's Avatar
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    2
    Thanked 3 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #6
    pitarr's Avatar
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    2
    Thanked 3 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #7
    pitarr's Avatar
    Join Date
    Dec 2010
    Posts
    55
    Thanks
    2
    Thanked 3 Times in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #8
    Rookie thriftynickel's Avatar
    Join Date
    Jul 2010
    Location
    United States
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #9
    Senior Member navjottomer's Avatar
    Join Date
    Nov 2009
    Location
    Bareilly, India
    Posts
    246
    Thanks
    4
    Thanked 36 Times in 24 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. #10
    Thread Starter
    sciamannikoo's Avatar
    Join Date
    Jan 2011
    Posts
    23
    Thanks
    1
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: May 20th, 2012, 03:35 PM
  2. [SOLVED] Migrating old posts from 2.9 to Ads in v.3.5
    By kinski in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: December 29th, 2010, 04:34 PM
  3. Replies: 6
    Last Post: December 15th, 2010, 08:29 AM
  4. Replies: 1
    Last Post: July 13th, 2010, 11:59 PM