This legacy guide here follows the easiest path to get Craft up and running on fortrabbit. We also have a more advanced workflow to deploy Craft with Git.
Upload Craft with SFTP¶
On the fortrabbit side: Just grab your personal SFTP login credentials from the Dashboard. Use any SFTP client. Upload all contents of your local Craft folder into the
htdocs folder of your fortrabbit App. And you are good to go.
Doesn't work as expected? Keep calm and read on:
You might need to change file permissions. Make sure that Craft can write the files
vendor/* on the App. Set the file permissions for those files to
744 with your SFTP client.
Hidden .htaccess file¶
Don't forget to upload the hidden
web/.htaccess file. This file is required. You cannot see that file in your Desktop, unless you set the option to show hidden files. The file browser from your SFTP client most likely will show that file by default. Leave the other hidden
.env file — which is only for your local development — at home.
Service unavailable error¶
If you don't follow our suggestion to have a local development environment and just upload the latest
.zip package from Craft via SFTP, it will not work out of the box and will throw a service unavailable error. Within the logs you can see that the error was caused in line 515 in
Application.php. If you look at the lines before in that file you can see that a condition for the installer to run is that it has to be in "dev" mode.
To fix that: Change the ENV var in the Dashboard from:
Run the installer like so (the base URL will still throw an error):
You can then change the ENV variable back to
production. We actually assume that the Craft you have on fortrabbit is the production version, and that all development is done locally. Please read our guides!
A downside of the SFTP workflow is that you have to keep both of your Craft environments in sync manually. Our manage assets with rsync is optional but still helpful for SFTP users.