[resolved] Restore/cloning database (5 posts)

  1. maximan
    Posted 3 years ago #

    Hi there,

    I'm struggling with restore/cloning and would appreciate some help. I have a backup of a site that I ftp'd to a new domain. When I try to import the database I get error message "#1046 - No database selected". It seems I must first have an existing database to select so I did a clean WP install that created a database. I selected this new database and was able to import the backup .sql but this created some duplicate tables. I've read wp codex on importing databases but wonder if there's little more explanation on the sequence and process in restoring to a new domain (i.e. a clone). TIA.


  2. Tom Willmot
    Human Made
    Plugin Author

    Posted 3 years ago #

    Hi Maxim,

    You should delete the existing database tables before you do the import.

    You'll also need to do a find and replace in the database dump file to replace all instances of your old domain with your new domain. I've used this tool before to do that; https://github.com/interconnectit/Search-Replace-DB

  3. maximan
    Posted 3 years ago #


    I did another clean wp install and deleted all tables. I successfully imported backup .sql. Because this was the same domain (it's an experimental site) I did not have to change domain info, although I believe I can do that via phpmyadmin to access the _options table. I copied all backup wp files and folders except wp_config.php and backup .sql dump contained in the backup zip. However, when accessing the site is shows the clean install only, i.e. no posts/plugins that were copied. I then copied the backup wp_config.php but was unable to access the site, with message "error connecting to database" Clearly I'm missing step in this process. Can you offer more hints to a noob?

  4. maximan
    Posted 3 years ago #

    A slight correction: all files were ftp'd successfully but settings, pages, media etc. are not showing on the back-end except for plugins (but plugins are not activated, unlike source plugins). I kept the clean install wp-config.php file (not the backup version). Clearly I'm missing an important step in this cloning process. Any suggestions?

  5. maximan
    Posted 3 years ago #

    Disregard for now - further digging points to maybe domain in subdirectory or maintenance mode when making source backup.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BackUpWordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.