Sail Knowledgebase

How to Import a WordPress Database Backup with Sail CLI

In this article you will learn how to use the sail db import command to import a database backup to your production WordPress site.

Sail db import

Sail allows to import any .sql or .sql.gz file to the production database with sail db import:

sail db import path/to/database-backup.sql.gz

Note that this will overwrite your existing database in production and it is recommended that you make a database backup first. Also note that importing a database does not affect the database credentials defined in the wp-config.php file.

If you're having trouble with importing/exporting database files with Sail, please refer to our getting help section.


Was this article helpful?

This helps us improve our knowledgebase.

Thanks!