Skip to content

vip dev-env sync sql

Sync the database of a VIP Platform environment to a local environment.

Usage

vip dev-env sync sql [options]

Options

OptionDescription
-a, --app [value] Target an application. Accepts a string value for the application name or an integer for the application ID.
-e, --env [value] Target an environment. Accepts a string value for the environment type.
-h, --help Retrieve a description, examples, and available options for a (sub)command. (default: false)
-v, --version Retrieve the version number of VIP-CLI currently installed on the local machine. (default: false)
-d, --debug [value] Generate verbose output during command execution to help identify or fix errors or bugs.
-s, --slug [value] A unique name for a local environment. Default is “vip-local”.
-t, --table [value] The name of a table to include in the partial database sync. Accepts a string value and can be passed more than once with a different value, or add multiple values in a comma-separated list. –site-id [value] The ID of a network site to include in the partial database sync. Accepts an integer value (can be passed more than once with different values), or multiple integer values in a comma-separated list.
-w, --wpcli-command [value] Run a custom WP-CLI command that has logic to retrieve specific data for the partial database export.
-c, --config-file [value] A local configuration file that specifies the data to include in the partial database sync. Accepts a relative or absolute path to the file.
-f, --force [value] Skip validations.

Examples

- Sync the entire database of the develop environment in the "example-app" application to a local environment named "example-site".
$ vip @example-app.develop dev-env sync sql --slug=example-site

- Sync only the wp_posts and wp_comments tables from the database of the develop environment to a local environment named "example-site".
$ vip @example-app.develop dev-env sync sql --slug=example-site --table=wp_posts --table=wp_comments

- Use comma-separated syntax to specify that only the wp_posts and wp_comments tables are synced.
$ vip @example-app.develop dev-env sync sql --slug=example-site --table=wp_posts,wp_comments

- Sync only the tables related to network site ID 2 and network site ID 3.
$ vip @example-app.develop dev-env sync sql --slug=example-site --site-id=2 --site-id=3

- Use comma-separated syntax to specify that only the tables related to network site ID 2 and network site ID 3 are synced.
$ vip @example-app.develop dev-env sync sql --slug=example-site --site-id=2,3

- Reference a local configuration file that specifies the data to sync to a local environment.
$ vip @example-app.develop dev-env sync sql --slug=example-site --config-file=~/dev-env-sync-config.json

Last updated: July 07, 2026