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¶
This workflow is simple and common. It doesn't need much explanation. Everybody and his dog knows how to use SFTP. Check the downloading an archive file manually workflow from the official Craft docs as your detailed reference.
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 hidden
web/.htaccess file. This file is required. You can not 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¶
When you don't have a local development environment like suggested and just upload the latest .zip package from Craft via SFTP (and not made any of the errors above), it will not work out of the box and throw the service unavailable error. Within the logs you can see that the error was caused in line 515 in
Application.php. When 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 back to production. We actually assume that the Craft you have on fortrabbit is the production and that all development is done locally. Please read our guides!
A downside of the SFTP workflow is, that you have keep both of your Craft environments in sync manually. Our manage assets with rsync is optional but still helpful for SFTP users.