WordPress.org

Ready to get started?Download WordPress

Forums

Installing a WP site to a local host from a downloaded backup (10 posts)

  1. Jindrak
    Member
    Posted 2 months ago #

    I'm attempting to install a WP site to a local host that I had backed up from an automated backup plugin. I've had this site backed up on a hard drive since mid 2012 and would like to install it to a subdomain as an example of work. Unfortunately, I backed this site up before I knew anything about databases and how to migrate WP from one server (or a local host) to another server. I am now comfortable with that process. However, I seem to be having some difficulty establishing a database that is recognized by MAMP.

    So far I have downloaded and installed WP to my local host.
    I do have the original database name, UN, PW as retrieved from the wp-config.php file.
    Unfortunately, this site is no longer available on a live server. I am only working with the downloaded WP files.

  2. J.D. Grimes
    Member
    Posted 2 months ago #

    Do you have the backup of the database? You need to import it using phpMyAdmin.

  3. Jindrak
    Member
    Posted 2 months ago #

    Yes, but when I tried to import it, I got the following message:

    Error
    SQL query:

    -- --------------------------------------------------------
    --
    -- 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 =1;

    MySQL said: Documentation

    #1050 - Table 'wp_commentmeta' already exists

  4. esmi
    Forum Moderator
    Posted 2 months ago #

    You are trying to import into a pre-populated database. Try creating a new database.

  5. Jindrak
    Member
    Posted 2 months ago #

    Created a new empty db in MAMP with a different name, and then tried to import the backup .sql and got the same message as above.

  6. esmi
    Forum Moderator
    Posted 2 months ago #

    Are you sure that you are trying to import into the correct database?

  7. Jindrak
    Member
    Posted 2 months ago #

    It's the only one that I know of. Inside my WP Content Folder are two files called:
    hastensdb-backup-core.sql
    hastensdb-backup-plugins.sql

    They were generated by the wp2db (wordpress to drobbox) plugin.

  8. Jindrak
    Member
    Posted 2 months ago #

    The server where the site was installed no longer has cpanel or phpmyadmin access, so I can't go export the database. I was, however, still able to log into the server via FTP and copy the entire website folder contents. I don't know if that will help though?

  9. jgtjones
    Member
    Posted 2 months ago #

    I am no expert, but I move databases between desktop, laptop and remote server frequently. The way I do it is:

    1. Create a backup using mysqldump on a Windows PC or the standard Debian backup on the server.
    2. Edit the backup file to change the domain name and folder names etc., using Notepad++ on a Windows PC. Depending on which way the database is moving, the DB is uploaded/downloaded before/after editing.
    3. Using a MySQL Command Line Interpreter "use dbname;" followed by "source editedbackup;". Insert your file database names. I use Putty for the server.

    Very basic approach and you have to know what you are doing, but works for me.

  10. 2ninerniner2
    Member
    Posted 2 months ago #

    that I had backed up from an automated backup plugin.

    Perhaps contact the plugin developer for the method to restore from this plugin.

Reply

You must log in to post.

About this Topic