Skip to content

vip dev-env import sql [options]

Import a SQL database file to a local environment

Options

ArgumentDescription
-d, --debugActivate debug output
-h, --helpOutput the help for the (sub)command
-i, --in-placeSearch and Replace explicitly on the given input file
-r, --search-replacePerform Search and Replace on the specified SQL file
-S, --skip-validateDo not perform file validation.
-s, --slugCustom name of the dev environment
-v, --versionOutput the version number

Examples

   # Import the contents of a WordPress database from an SQL file
    $ vip dev-env import sql some-wp-db-file.sql

   # Import the contents of a WordPress database from an SQL file into `my_site`
    $ vip dev-env import sql wordpress.sql --slug=my_site

   # Import the contents of a WordPress database from an SQL file and replace the occurrences of `testsite.com` with `test-site.go-vip.net`
    $ vip dev-env import sql wordpress.sql --search-replace="testsite.com,test-site.go-vip.net"

   # Import the contents of a WordPress database from an SQL file and replace the occurrences of `testsite.com` with `test-site.go-vip.net` in place (modifies the original SQL file)
    $ vip dev-env import sql wordpress.sql --search-replace="testsite.com,test-site.go-vip.net" --in-place

Global Options

ArgumentDescription
-a, --app=<app>Specify the app
-d, --debugActivate debug output
-e, --env=<env>Specify the environment
-h, --helpOutput the help for the (sub)command
-v, --versionOutput the version number
-y, --yesRun the command in production without a confirmation prompt

Last updated: January 05, 2023