vip dev-env import sql
Import SQL to your dev-env database from a file
Usage
vip dev-env-import-sql [options]
Options
Option | Description |
---|---|
-d , --debug |
Activate debug output |
-h , --help |
Output the help for the (sub)command |
-i , --in-place |
Search and Replace explicitly on the given input file |
-q , --quiet |
Suppress prompts and informational messages |
-r , --search-replace |
Perform Search and Replace on the specified SQL file |
-k , --skip-reindex |
Do not reindex data in Elasticsearch after import |
-S , --skip-validate |
Do not perform file validation |
-s , --slug |
Custom name of the dev environment |
-v , --version |
Output 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
Last updated: May 07, 2024