WP-CLI Command – Export Subcommand

wp migratedb export <output-file> [--find=<strings>] 
[--replace=<strings>] [--include-tables=<tables>] 
[--exclude-post-types=<post-types>] [--skip-replace-guids] 
[--exclude-spam] [--gzip-file] [--include-transients] 
[--subsite=<blog-id|subsite-url>] [--prefix=<new-table-prefix>]

Export your local DB to a file.


  A file path to export to. Filename will be modified to end in .sql or
  .sql.gz if necessary.

  A comma separated list of strings to find when performing a string find
  and replace across the database.

  Table names should be quoted as needed, i.e. when using a comma in the
  find/replace string.

  The --replace=<strings> argument should be used in conjunction to specify
  the replace values for the strings found using this argument. The number
  of strings specified in this argument should match the number passed into
  --replace=<strings> argument.

  A comma separated list of replace value strings to implement when
  performing a string find & replace across the database.

  Should be used in conjunction with the --find=<strings> argument, see it's
  documentation for further explanation of the find & replace functionality.

  Exclude post revisions from export. Available only in WP Migrate DB.

  Do not perform a find & replace on the guid column in the wp_posts table.

  Exclude spam comments.

  GZip compress export file.

  Include transients (temporary cached data).

WP Migrate DB Pro Options

When running WP Migrate DB Pro the following option replaces the --exclude-post-revisions option in WP Migrate DB.

  A comma separated list of post types to exclude. Excluding this parameter
  will migrate all post types.

The following option is only available in WP Migrate DB Pro.

  The comma separated list of tables to migrate. Excluding this parameter
  will migrate all tables in your database that begin with your
  installation's table prefix, e.g. wp_.

Multisite Tools Addon Options

When the Multisite Tools addon is installed and activated, you also have the following options.

  Export the given subsite as a single site install.

  A new table prefix to be used for a subsite export.