• Hi, I had a WP site hosedt with a provider. I moved it to my own server with very few problems. I now find out that one person has been using the old site (should have closed it down) and made many posts to it. The new location also has had a few posts added. Is there any way I can migrate the posts from the old site over? I can get a dump of the wp_posts table.
    I tried to add them to the new site bit got an error..
    ERROR 1062 (23000) at line 65: Duplicate entry ‘6’ for key ‘PRIMARY’

    I also tried dropping the wp_posts table in the new DB (less posts) and importing the one from the old site. It took them ok but put them all on the main page of the site?

    Is there anyway to migrate these posts over?

    Thanks.

    Pat.

Viewing 4 replies - 1 through 4 (of 4 total)
  • When adding them, try to remove the primary var and value from any line.

    Sorry, I was way too fast..

    When doing the inserts via SQL (phpmyadmin or similar) You have to remove ‘ID’ from any line and the corresponding value.

    INSERT INTO wp_posts (ID, post_author, …) VALUE (6, ‘Me’, …)

    In this case remove ‘ID’, and 6, .

    Thread Starter patc890

    (@patc890)

    Great thanks I’ll try that.

    Pat.

    Thread Starter patc890

    (@patc890)

    Hi again,

    Just to be sure. I have this…

    INSERT INTO wp_posts (ID, post_author, post_date,………
    and
    VALUES (6, 1, ‘2011-08-10 09:19:07’,…..

    So I should use?

    INSERT INTO wp_posts (post_author, post_date,………
    and
    VALUES (1, ‘2011-08-10 09:19:07’,…..

    Pat.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Moving posts’ is closed to new replies.