WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Restored from backup but get an error (2 posts)

  1. lesleyab
    Member
    Posted 1 year ago #

    Hi

    So ... I installed WordPress into a development directory on a remote server let's say public_html/dev.

    Got some work done then decided to go live so copied over everything to a public_html/live.

    Unfortunately 'I hadn't twigged teh serialisation problem' so mucked up the database transfer.

    In the mean time I also managed to screw up some content the original development database.

    But I did have a back-up - an export from phpMyAdmin of the original development database.

    So I thought it would be okay to re-install from the backup... it is after all a straight mysqldump of the database.

    I deleted the table content from the existing development database, imported the previously exported data to that database, getting a complaint about attempting to install a duplicate row in the wp_comments table.

    I checked the dev_comments table and it looked okay so attempted an access the development site at example.com/dev and was horrified to see

    "Error establishing a database connection"

    instead of the development site. So I tried example.com/dev/wp-admin and got

    One or more database tables are unavailable. The database may need to be repaired.

    Following the link to repair the database, I edited the wp-config.php file as instructed, decided to Repair and Optimize, getting these results:

    The dev_users table is okay.
    The dev_users table is already optimized.

    The dev_usermeta table is okay.
    The dev_usermeta table is already optimized.

    The dev_posts table is okay.
    The dev_posts table is already optimized.

    The dev_comments table is okay.
    The dev_comments table is already optimized.

    The dev_links table is okay.
    The dev_links table is already optimized.

    The dev_options table is okay.
    The dev_options table is already optimized.

    The dev_postmeta table is okay.
    The dev_postmeta table is already optimized.

    The dev_terms table is okay.
    The dev_terms table is already optimized.

    The dev_term_taxonomy table is okay.
    The dev_term_taxonomy table is already optimized.

    The dev_term_relationships table is okay.
    The dev_term_relationships table is already optimized.

    The dev_commentmeta table is okay.
    The dev_commentmeta table is already optimized.

    But it hasn't resolved the issue.

    The database user example_dev is still there and still associates with the example_dev wordpress database - I've checked using cPanel.

    So ... what can I do now to repair the existing development site - which is a re-install from a backup that appears to have gone wrong?

    Looking forward to hearing any advice.

    Kind Regards

    Lesley

  2. lesleyab
    Member
    Posted 1 year ago #

    S'okay.

    I got it working again.

    I used the sql backup, edited the table names to a different prefix, created a new development directory, and restored relevant parts of the initial site backup into that directory.

    Then I imported the new tables and edited the wp-config.php value for the table prefix.

    Mercifully it all worked. I needed to use the Search and Replace script, nmentioend in Moving WordPress to change some serialized values in the tables. But it all worked.

    Which is a huge relief :)

    Kind Regards

    Lesley

Topic Closed

This topic has been closed to new replies.

About this Topic