# Craft CMS 6 database syncing

Source: https://docs.fortrabbit.com/guides/craft-cms/craft-6/database
Published: 2026-11-27
Updated: 2026-11-27
Reviewed: 2026-11-27

> Bring the local Craft CMS 6 database to fortrabbit and back, with the MySQL export and import guides.


## Install and deploy run down

1. [Install Craft CMS 6 locally](/guides/craft-cms/craft-6/install)
2. [Set up an app at fortrabbit](/guides/craft-cms/craft-6/setup)
3. [Deploy code via Git](/guides/craft-cms/craft-6/deployment)
4. **Database syncing** _← you are here_
5. [Assets](/guides/craft-cms/craft-6/assets)

## Database up

Bring the local database to fortrabbit with DDEV and the [frbit CLI](/platform/automation/cli/intro). Run these in the local project folder:



```shell
# Export the local database
ddev export-db --file=dump.sql.gz

# Replace the database of the environment with it
frbit db push dump.sql.gz {{app-env-id}}

# Deploy again, so craft:up applies the project config
frbit environments deploy {{app-env-id}}
```

Then log in to the Control Panel at `/admin` with the local account. Without DDEV or the frbit CLI, see [database up via terminal](/platform/mysql/export-import/database-up-terminal) or [via a MySQL GUI](/platform/mysql/export-import/database-up-gui).

## Start empty on fortrabbit

To start with an empty site instead, install Craft over [SSH](/platform/code-access/ssh) after the first deployment:



```shell
ssh -t {{app-env-id}}@ssh.{{region}}.frbit.app php artisan craft:install
```

It asks for the admin account and the site settings, and to confirm the run in production. The next deployment deletes the project config the install wrote on the environment, and `craft:up` writes it again from the database. To develop locally, pull the database down and commit the project config from there.

## Database down

Download the live database to develop locally with current content:



```shell
frbit db pull {{app-env-id}}
ddev import-db --file={{app-env-id}}.sql.gz
```

Without DDEV or the frbit CLI, see [database down via terminal](/platform/mysql/export-import/database-down-terminal) or [via a MySQL GUI](/platform/mysql/export-import/database-down-gui).
