Support » Fixing WordPress » Categories and tags problem – moved from one host to another

  • Hi,

    I was moving multiple blogs from one host to another, and one of them is giving an error I am unable to figure out. During the restore of the SQL script through phpMyAdmin, the following error shows up:

    SQL query:

    INSERT INTO wp_term_taxonomy
    VALUES ( 1301, 1096, ‘category’, ”, 12, 1 ) ;

    MySQL said:
    #1062 – Duplicate entry ‘1301’ for key ‘PRIMARY’

    And all the posts have missing categories and tags.

    The ‘wp_terms’ table has only 2 entries. I tried reading up the Codex entry for database tables and also, but not sure whether these are the same problem.


Viewing 3 replies - 1 through 3 (of 3 total)
  • What method did you use to move the database? One database backup plugin that I used in the past (I forget which one) caused this error.

    Here is an article with the steps I use to migrate (copy) a site:

    Thanks for the response. These are the steps that I followed:

    1. Exported SQL backup using WP-DB-Backup plugin and saved SQL to my local machine.
    2. Setup domain on new host
    3. Install WP on the new account with same admin and pwd
    4. Through phpMyAdmin, on the same DB, import SQL saved in step 1

    This worked for many of the domains, but failed in this specific case.

    That will work as long as the domain name and path remain the same. However, the way paths are constructed varies among hosts.

    For example, a path on HostGator looks like this: /home/farful/public_html

    while a path on GoDaddy looks like this: /home/content/44/963572/html

    To move a site, you must use a method that will properly substitute the new path for the old one.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Categories and tags problem – moved from one host to another’ is closed to new replies.