Forums

Importing Posts, Tags, etc From SQL Backup (13 posts)

  1. TomBeasley
    Member
    Posted 7 months ago #

    So I just did a completely new WP installation. I have a database back-up with all of the posts, tags, comments etc from my old WP site that I want to import. How can I get it to work? Is there a plug-in or something?

  2. keesiemeijer
    moderator
    Posted 7 months ago #

  3. TomBeasley
    Member
    Posted 7 months ago #

    I've tried that, but I get an error.

    Error
    SQL query:

    --
    -- Dumping data for table wp_ak_twitter
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table wp_commentmeta
    --
    CREATE TABLE wp_commentmeta (

    meta_id BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
    comment_id BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0',
    meta_key VARCHAR( 255 ) DEFAULT NULL ,
    meta_value LONGTEXT,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =176;

    MySQL said:

    #1050 - Table 'wp_commentmeta' already exists

  4. TomBeasley
    Member
    Posted 7 months ago #

    Is there for instance any way I can just import the tables for posts, comments, etc?

  5. ChristiNi
    Member
    Posted 7 months ago #

    Hi Tom,

    There is at least one plugin that will allow you to import (WP-DBManager) but it may not work on all web hosts. The most reliable way to restore your SQL backup is by using phpMyAdmin, instructions can be found here:

    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

    Hope this helps!

  6. keesiemeijer
    moderator
    Posted 7 months ago #

    Are you trying to import this into an old WordPress database? Try importing it into a new blank database.

  7. TomBeasley
    Member
    Posted 7 months ago #

    I've just emptied the database and then tried to import from my backup, as per the instructions on that link. But now I'm getting a "page cannot be found" error from my ISP.

  8. ChristiNi
    Member
    Posted 7 months ago #

    Hi Tom,

    From the error you are receiving, the wp_commentmeta table has already been created. If this was in error and that table doesn't already have your data, you will need to drop the that table. You can drop tables within phpMyAdmin.

  9. keesiemeijer
    moderator
    Posted 7 months ago #

    But now I'm getting a "page cannot be found" error from my ISP.

    Where are you getting this error? When in phpmyadmin? wp-admin? frontend of your website?

  10. TomBeasley
    Member
    Posted 7 months ago #

    @keesiemeijer: Getting that from the front end of my site.

  11. keesiemeijer
    moderator
    Posted 7 months ago #

    Check if al the database information is still correct in wp-config.php

  12. TomBeasley
    Member
    Posted 7 months ago #

    It's gone really weird now. It displays my homepage, but seemingly without CSS and a lot of the content. Clicking any further brings up an ISP error like the one I was getting from the homepage earlier.

  13. keesiemeijer
    moderator
    Posted 7 months ago #

    Try setting your site url to the correct url with the functions.php method:
    http://codex.wordpress.org/Changing_The_Site_URL#Edit_functions.php

Reply

You must log in to post.

About this Topic