• Any help much appreciated. I tried to import using PHPMyAdmin a backup *.sql file from a previous WP site (older version) to my new host with a 3.9.1 fresh install. I got the following error.

    #1062 – Duplicate entry ‘4’ for key ‘PRIMARY’

    It did upload a bunch of files and when I tried to redo it I got the following also. Now I’m lost what to do. Help please.

    INSERT INTOwp_commentmeta(meta_id,comment_id,meta_key,meta_value`) VALUES
    (4, 5, ‘_wp_trash_meta_status’, ‘0’),
    (3, 6, ‘_wp_trash_meta_status’, ‘0’),
    (5, 10, ‘_wp_trash_meta_status’, ‘0’),
    (6, 9, ‘_wp_trash_meta_status’, ‘0’),
    (7, 8, ‘_wp_trash_meta_status’, ‘0’),
    (51, 282, ‘_wp_trash_meta_status’, ‘0’),
    (50, 275, ‘_wp_trash_meta_status’, ‘0’),
    (10, 29, ‘_wp_trash_meta_status’, ‘0’),
    (11, 32, ‘_wp_trash_meta_status’, ‘0’),
    (12, 31, ‘_wp_trash_meta_status’, ‘0’),
    (13, 28, ‘_wp_trash_meta_status’, ‘0’),
    (14, 25, ‘_wp_trash_meta_status’, ‘0’),
    (15, 19, ‘_wp_trash_meta_status’, ‘0’),
    (16, 49, ‘_wp_trash_meta_status’, ‘0’),
    (17, 48, ‘_wp_trash_meta_status’, ‘0’),
    (18, 47, ‘_wp_trash_meta_status’, ‘0’),
    (19, 46, ‘_wp_trash_meta_status’, ‘0’),
    (20, 45, ‘_wp_trash_meta_status’, ‘0’),
    (21, 44, ‘_wp_trash_meta_status’, ‘0’),
    (49, 274, ‘_wp_trash_meta_status’, ‘0’),
    (23, 42, ‘_wp_trash_meta_status’, ‘0’),
    (24, 41, ‘_wp_trash_meta_status’, ‘0’),
    (25, 40, ‘_wp_trash_meta_status’, ‘0[…]`

Viewing 1 replies (of 1 total)
  • I tried to import using PHPMyAdmin a backup *.sql file from a previous WP site (older version) to my new host with a 3.9.1 fresh install.

    You cannot mix WordPress versions like that. You need to import the database to an install using the same version of WordPress that was used when the backup was made.

Viewing 1 replies (of 1 total)
  • The topic ‘Import sql backup error’ is closed to new replies.