Forums

[resolved] Import data in table into existing table (7 posts)

  1. Oscar
    Member
    Posted 3 years ago #

    Hi, I've got a quite delicate MySQL/PHPMyAdmin vs. WordPress problem.

    I have the data from an old site, that was running WP 2.2.3, I've managed to import the old data into my database. All of the tables are using another name. I'm currently running WP 2.6 on the site, and I would like to import the data within the tables (posts, comments, users etc) into the current installation of the site running 2.6.

    I ran this query in PHPMyAdmin:
    INSERT IGNORE INTO new_tbl SELECT * FROM orig_tbl;

    On the old posts table, which successfully imported all of the data within the table to the 'new' (2.6) posts table. However, as some of the tables in the old installation is different, and tagging is different, it didn't quite end up the exact same way (of course).

    I was now wondering what I should do in order to make this work? Is there a work around this? Is there an easier way even though the tables are formatted differently?

    I guess the one thing I could do is install a fresh 2.6, run it off the old DB (2.2.3), upgrade the DB/e.g. posts to 2.6 and then import this data into the 'old' 2.6 currently running. Would this work? Is there an easier way?

    Any help is appreciated.

    Thanks

  2. mrmist
    Forum Janitor
    Posted 3 years ago #

    Your suggestion should work and I can't think of many "easier" ways, though it depends on what you find easy.

  3. @mercime
    Member
    Posted 3 years ago #

    How about exporting XML of the 2.2.3 and importing that to the 2.6 already running?

  4. Oscar
    Member
    Posted 3 years ago #

    That was another idea I had as well, unfortunately I don't have access to it, but only have the .sql for it.

    mrmist: Easy, as in working basically :)

  5. @mercime
    Member
    Posted 3 years ago #

    Easier is relative. Another way would be to set up an install of the 2.2.3 version (http://wordpress.org/download/release-archive/) in your computer XAMPP or even in a separate folder online, set up new DB with the SQL you have and then export the XML which you then import into your 2.6 on webhost. Like I said, "easier" is relative.

  6. Oscar
    Member
    Posted 3 years ago #

    Yeah, thanks. I'll go for the try of setting up a new installation, first try 2.6 and try to upgrade the old posts, and then XML importing them into the existing one.

  7. Dgold
    Member
    Posted 3 years ago #

    Thanks for the thread. I'm getting ideas, at least, to help me with doing basically the same thing.

    Following your idea, I upgraded my OLD website (old database) that has all my Users with their Passwords and Emails..... Now it's WP 2.6.

    I need to Import the Users from that old database, into my new WP 2.6 website, which is a different URL, different database, and different table prefix.

    What's my next step? Should I go into phpMyAdmin and try to copy the "old" Users Tables ---> then how to I insert it in my "new" database?

Topic Closed

This topic has been closed to new replies.

About this Topic