Database syncing with Craft CMS

# Install and deploy run down

  1. Install Craft CMS locally
  2. Setup an app at fortrabbit
  3. Deploy code via Git
  4. Database syncing ← you are here
  5. Assets syncing

# Database configuration setup

In most cases, the Craft CMS installation on fortrabbit can already connect to the remote MySQL database through pre-populated environment variables.

But when initially installing Craft CMS on your fortrabbit environment, after Git deployment or SFTP upload your database is still missing. In most cases you want to import your local database now, to have database content and structure up.

Visit the MySQL import/export guides to learn how to sync the database up and down using different techniques.

# Database up

  1. Export the local database
  2. Upload the the dumped .sql file
  3. Import the database dump into the app environment database

# Database down

In later live cycle stages of your project you more often likely would like to download the database.

  1. Export the remote database
  2. Download the dumped .sql file
  3. Import the database in your local development

Found a tpyo?Edit