Install Craft CMS local
# Install and deploy run down
- Install Craft CMS locally ← you are here
- Setup an app at fortrabbit
- Deploy code via Git
- Database syncing
- Assets syncing
# Get ready
- Have a local development environment running. DDEV is recommended.
- Use the official Craft CMS install guide as your guideline.
- Skip this step when you have a Craft project running locally and a GitHub repo connected see below.
# Choose your install workflow
The way you will install Craft will set the course on how you will deploy Craft CMS here on fortrabbit:
# A - Create with Composer (recommended)
This is the recommended - more sophisticated - way. You will use Git and Composer in the Terminal. Run this command on you local machine to create a Craft CMS project to get started:
composer create-project craftcms/craft my-projectshell
See an error? Check your local development. Later on you can deploy Craft with Git on fortrabbit.
# B - Download zip file
Are you more "designer" and less "developer"? Just download Craft directly from the Craft website: craftcms.com/latest-v3.zip. Unpack that zip file to get to the actual project files.
# Install Craft CMS locally
Configure it to work on your local machine now. You have two options to install Craft:
# A - Terminal setup (recommended)
# 1. go into your local Craft folder $ cd my-project # 2. run the terminal installer $ ./craft setupcontent/index.mdshell
This will ask you some questions, the defaults will work mostly, you can change these settings later.
# B - Browser setup
You can also run the installer in the browser by visiting this address: http://{{host}}/index.php?p=admin/install in your browser. Substitute {{host}} with the host name of your local development environment.
# Add your magic
Installing a plain Craft CMS will not do much. Now add your templates, database structure, design, plugins and content to make it shine. We recommend to do this work mostly in your local development environment.
# Choose a code deployment workflow
Now is a good time to think ahead a bit. How do you plan to keep your local project and the remote app environment at fortrabbit in sync? Understand that Craft CMS basically consists of three parts that needs special treatment for deployment:
# A - Git deployment (recommended)
To connect your app environment to a GitHub repo set up one now. Init git and add GitHub as remote repo - either as a public or private. Here is an example using the GitHub CLI.
# Initialize a new git repository git init # Add files and commit git add . git commit -m "Init" # Create a new public repository on GitHub from the current directory gh repo create --public --source=. --pushbash
We recommend to exclude asset volumes from Git to sync them up and down. In most cases this is already the case.
Skip this step if your code is already at GitHub, see Git provider integration for other providers with CI/pipeline/actions flows. If this fuzzy to you see:
# B - SFTP / rsync deployment
Later on you can upload Craft with SFTP.