Statamic deployment options
Published
Updated
Statamic keeps its content in files, on top of Laravel. Deploy it to fortrabbit by SFTP, by rsync, with Git for the code and rsync for the content, or with Git for both.
Get ready
- Have a local development environment with PHP and a web server ready.
- Have Statamic installed and running locally.
Deployment considerations
Like Grav and Kirby, Statamic stores content as files. Built on Laravel, it also uses Composer. That makes both file sync and Git deployment work.
With content in a database, book the MySQL component and move the data with export and import.
Deployment options
1 - SFTP upload
Upload all contents of your local Statamic folder - including the hidden .htaccess file and the vendor folder — into the www directory of the environment. A good starting point if you are new to web development, but consider moving to rsync for anything recurring.
2 - rsync
A scriptable command-line flow that works in both directions: push template and config changes up, pull content down. Easy to automate with AI agents. See the general rsync article. A good fit for solo projects and quick demos.
3 - Git + rsync
The most advanced option, suited for team projects. Manage code with Git for revision history and deployment automation (composer install, cache clearing, migrations); sync content separately with rsync. See Git + rsync deployment for Statamic.
4 - Git only
Code and content both live in the repository, and every deployment replaces the content on the environment with the state in git. Content edited online is lost unless it is committed first, so edit content locally. See content in git.