wp db import <file>
Imports a database from a file or from STDIN
Arguments
Name | Description |
---|
file | The name of the SQL file to import. If ‘-‘, then reads from STDIN. If omitted, it will look for ‘{dbname}.sql’ |
Options
Name | Description |
---|
--dbuser <value> | Username to pass to mysql. Defaults to DB_USER |
--dbpass <value> | Password to pass to mysql. Defaults to DB_PASSWORD |
--field=value | Extra arguments to pass to mysql. Refer to mysql binary docs |
--skip-optimization | When using an SQL file, do not include speed optimization such as disabling auto-commit and key checks |
--defaults | Loads the environment’s MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration |