The following details how to backup only the database from "Site A" and deploy it to "Site B". Please note these steps will only move
the database, so if your files are not in sync with the Database you will have issues. Please use the approach with caution and be sure that
your files are not out of sync with the database.
1. Create DB Only Package
- Goto Duplicator ❯ Packages ❯ click "Create New" button
- On Step 1 Setup ❯ Archive ❯ check "Archive Only the Database"
- Build and download package (installer.php & archive.zip/daf) files
2. Transfer Package to Target
- Login to target location via FTP, cPanel or your host's control panel tools
- Transfer installer and archive to target location
- Open web browser and browse to http://yoursite.com/installer.php
3. Run Installer
- Installer should have 'Database Only Mode' in upper right corner.
- On Step 1 ❯ Click the next button
- On Step 2 ❯ Enter database setup info ❯ test connection ❯ click next
For the database setup enter in information on an empty database. You can easily create a new one
or simply contact your hosting provider to have them set it up for you and have them give you the setup info. Some hosting
providers have specific instructions for connecting to their databases, so be sure ask them what to use.
- On Step 3 ❯ Click the next button
- On Step 4 ❯ Login remove installer files
- Only the database will be updated
Database & File Synchronization:
How do I know if my files and database are in sync? There is no real clear answer to this question
however there are some general rules you can consider. Typically the file system is only updated when you do the following actions:
- Add a new image/video/file to a page/post or media content
- Install a new plugin or theme
- Update a plugin setting that writes to files like the .htaccess file (i.e. security plugins)
So if any of these actions have been performed then its likely that WordPress wrote to both your file-system and database. For example say you
both have "Site A" and "Site B" where "Site B" is a mirror copy of "Site A". You then install a new plugin on "Site A" and create a Database
only archive and try to move it over to "Site B" using the "Database Only Install" option.
In this scenario the files on "Site B" are not in sync with the database created on "Site A", because "Site B" does
not have the plugin files. So if you try to install the "Site A" database onto "Site B" you may run into issues because "Site B" did not get
the plugin files that "Site A" just installed. In many cases you can simply install the plugin on "Site B" and things will be in working order.
However if you do allot of changes on "Site A" then it is recommend to go ahead and also update those files onto "Site B".