We’re excited to announce one of our new VIP-CLI feature: Partial Database Exports
This functionality makes it faster and easier than ever to copy exactly the data you need from your database to work on your VIP Local Development Environments or in GitHub Codespaces.
Why this matters
Traditionally, teams that need production data for testing or troubleshooting face long waits and complex rebuilds. Even filtered exports can take their time. Partial Database Exports solves this by working directly from the current state of your application’s database, so you can:
- Export only the specific tables or network sites you need
- Apply granular filters with SQL WHERE clauses
- Use reusable config files or custom WP‑CLI commands for complex cases
- Sync smaller data sets directly into local environments
No more waiting for full backups and complex queries. Just the data you want, when you need it.
Try it today
This feature is available now to anyone with the latest version of the VIP-CLI. You can update your VIP-CLI through npm:
npm i @automattic/vip
Example usage
Export SQL
Extract the database and download it locally with different filters:
# Export only wp_posts and wp_comments
$ vip @example-app.develop export sql --table=wp_posts --table=wp_comments
# Using comma-separated syntax
$ vip @example-app.develop export sql --table=wp_posts,wp_comments
# Export only network sites with IDs 2 and 3
$ vip @example-app.develop export sql --site-id=2 --site-id=3
# Comma-separated syntax for network sites
$ vip @example-app.develop export sql --site-id=2,3
# Use a config file for advanced filtering
$ vip @example-app.develop export sql --config-file=~/db-export-config.json
Dev-env sync
Bring data straight into your VIP Local Development Environment:
# Sync wp_posts and wp_comments tables into local site "example-site"
$ vip @example-app.develop dev-env sync sql --slug=example-site --table=wp_posts --table=wp_comments
# Using comma-separated syntax
$ vip @example-app.develop dev-env sync sql --slug=example-site --table=wp_posts,wp_comments
# Sync only network sites with IDs 2 and 3
$ vip @example-app.develop dev-env sync sql --slug=example-site --site-id=2 --site-id=3
# Using comma-separated syntax for network sites
$ vip @example-app.develop dev-env sync sql --slug=example-site --site-id=2,3
# Use a config file for flexible, sharable setups
$ vip @example-app.develop dev-env sync sql --slug=example-site --config-file=~/db-export-config.json
Example config file
Config files give you fine-grained control over exports and syncs. For example:
{
"type": "tables",
"tables": {
"wp_posts": {
"no-create-info": true,
"insert-ignore": true
},
"wp_postmeta": {
"no-data": true
},
"wp_users": {
"insert-ignore": true,
"where": "ID IN (SELECT DISTINCT post_author FROM wp_posts WHERE post_status = 'publish')"
},
"wp_options": {
"skip-add-drop-table": true,
"replace": true
}
}
}
This example shows you how to:
- Skip CREATE TABLE statements
- Exclude certain data while keeping the schema
- Filter rows with SQL WHERE clauses
- Control whether to use INSERT, IGNORE, or REPLACE
What’s next?
Our plans are to extend the feature in the future by adding more support to the VIP Dashboard and allowing users to easily configure their exports.
We’re actively improving this feature, and your feedback will help shape it. Please try it out, experiment with exports, subsites, and config files, and let us know what works and what needs more polish.
For detailed documentation, see the Partial Database Exports documentation.
If you have any questions related to this release, please open a support ticket, and we will be happy to assist.