Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

Various strategies for data migration.

While Duplicator does an extremely good job of moving your entire site and various sub-sections. There are some use cases where custom work-a-rounds are needed.In this section we try to cover those various options.

General Scenarios

Scenario 1-AParts of Site
How to move only part of a website?

A WordPress site consist of two primary assets “Files” & “Database Tables”. By excluding these assets with filters you can create any version of a site you want.The installer (Pro Only) has features to re-deploy a package and exclude specific data froman existing package. Below are workflows that will allow you to filter/exclude data for you package.


Package Process

File Management: When creating a new package you can exclude any files/folder, file extensions or database table you want. With Archive Filters(Packages > Create New > Archive > File filters) along with Overwrite orImport install modes users have the flexibility to move portions of there site. To move just aportion of your site exclude all the files that do not need to be moved. For file filters enter the full path of the directory(s) you want to exclude. You can separate additionalexclusion paths with a semicolon. This process can be useful if you havelarge files such as images or videos that you don’t want to package.

Database Management:Table filters (Packages > Create New > Archive > Database Tab > Table filters) will allow you to exclude any table from being added to the database.sql file which contains the dataneeded to restore your database.


Install Process

At install time you can then perform the Overwrite or Import Install process which allows you to move only the files you have in the archive. Another key feature of the installerthe “Skip Files” option (Pro Only) on step 1 of the installer (Installer > Step 1 > Options > Skip Files). These options include the following:

  1. Extract all files: Extract all files from the package archive. This option is selected by default.
  2. Skip extraction of WP core files: Extract all files except WordPress core files. Choose this option to extract only the wp-content folder and other non-core files and directories.
  3. Extract only media files and new plugins and themes: Extract all media files, new plugins, and new themes. The installer will not extract plugins and themes that already exist on the destination site.


Warning: Moving portions of your site requires a deep understanding of the assets you are trying to move. When moving small portions of your website into an existingwebsite it is strongly encouraged to perform these operations in a staging environment beforehand. Do not perform these type of migrations on a production server without knowingthe end results from a test run!

Scenario 1-BLarge Sites
How can I more quickly move larger sites/packages?

Option 1In the event you have a very large site that you need to continually move around and have issues with upload/download speeds you can quickly improve this workflow by using the“Classic Overwrite Install” method.

  • You have two sites i.e. a Development and Staging site
  • The sites files are identical except for their physical location.
  • The sites databases are the same except for locations which could be the same or different servers.
  1. Create a new package on the Development site and exclude/filter the \wp-content\uploads\ directory.
    This can also be other locations that might have large files.
  2. Download the package files locally then transfer them to your Staging site in the WordPress root
  3. Browse to the installer.php file on the staging site and exact the archive.
  4. Upon completion that Staging site should have all the updates of the Development site minus the filters from step 1.
  5. Since the sites were identical initially the \wp-content\uploads\ should still be functional on the Stage site.
Notes: This process typically becomes more impactful the larger your site, it also requires that you have a good understanding of the files you arefiltering and moving. The basis of the workflow is that you don’t always have to bundle your complete site with every migration as long as you are awareof the structure of your data.

Option 2The Duplicator import install mode can rapidly improve your workflow.

Scenario 1-CSync Dev to Prod
How to sync a staging/development site with a large production site?

  1. Install Duplicator Pro on both sites
  2. On the main site set the engine to DupArchive (Settings > Packages > Archive Engine = DupArchive)
  3. Build a package on your main site
  4. Perform an import URL install as described here Import Link section

After doing the above your staging site will match the original site. After the upgrade you can then perform the reverse procedure. Note that the database gets fully replacedwhen a package is installed (so if you have any customer payments or other records coming in on the main site while you are working on the staging site then those would get erasedwere you to install the staging site back onto the main site)

Database Specific Scenarios

Scenario 2-ACustom SQL
How can I manually execute my own custom SQL file?

In the event you need to execute custom SQL code instead of what is placed in the archive via that database.sql file. This process can be done by following these instructions:

  1. In a new browser tab, go to phpAdmin or the equivalent on your destination machine.
  2. Remove existing database tables from your the destination database.
  3. Import your own custom script (this should represent a copy of your site in most cases).This can be done via the phpMyAdmin import procedure.
  4. Launch the Duplicator Pro installer.php in a browser tab
  5. Switch to Advance Mode > Choose “Manual SQL Execution” from the database option.
    this will prevent the installer from using the .sql within the archive and skip past the data insertion step all-together.
  6. Finish the install process

Scenario 2-BExisting Tables
How to prevent existing database tables from being changed during a migration?

Option 1There may be situations where you need to keep an existing table on a particular site. For example say you have development site (dev site) and a staging site. On the staging siteyou do NOT want to overwrite any of the sites current posts from the wp_posts table. In order to retain the table follow these steps.

  1. Login to your development site and goto Duplicator Pro > Packages screen > “Create New” button
  2. Archive > Database Tab > Check “Enable Database Table Filters” > check “wp_posts” table & build package
    Note: This will exclude/ignore the “wp_posts” table from being created in the database.sql script
  3. On staging site open the installer.php and location the “Setup” area on Step 1.
  4. Choose Action “Overwrite existing tables” > Click the “Validate” button
    Note: This will keep all the existing tables in the database and overwrite those with the same name.
  5. Validate the “wp_posts” table is NOT in the removal list
    See: Validate tables Validate > Database > “Tables Flagged for Removal or Backup”
  6. Continue with the install process & upon completion the “wp_posts” table should remain unchanged

Un-Supported Scenarios

Question A Is there a setting for incremental or differential backups?

Option 1At the moment Duplicator does not support differential or incremental backups. Many people use filters to cut back on backup size, though – for instance you could do a full backup withall files every week or x days and then a database only backup every x hours or every day, based on your needs.

Question B How can I copy ONLY the blog posts (with images, comments, categories, tags, etc.)?

Option 1Duplicator does not currently migrate individual items such as just blog posts, however the WordPress import/export tool combined with FTP transfer of files should allow users to do this process.More details about this process can be found here.

Was this article helpful?

Related Articles