Database syncing with Craft CMS
Reviewedbyfl
Markdown ↓Export and import your Craft CMS database between local development and fortrabbit using MySQL tools and techniques.
Install and deploy run down
- Install Craft CMS locally
- Setup an app at fortrabbit
- Deploy code via Git
- Database syncing ← you are here
- 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
- Export the local database
- Upload the dumped
.sqlfile - Import the database dump into the app environment database
Database down
As your project matures, you may want to download the database for local development.
- Export the remote database
- Download the dumped
.sqlfile - Import the database in your local development