Database syncing with Craft CMS

Published

Updated

Export and import your Craft CMS database between local development and fortrabbit using MySQL tools and techniques.

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 connection

Craft CMS on fortrabbit connects to the MySQL database through the ENV vars of the software template. After the first deployment, the database is still empty: import the local database to bring content and structure up. The MySQL export and import guides cover the terminal and GUI ways.

Database up

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

Database down

Download the database once editors work on the live site, to develop locally with current content.

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

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗