Skip to content
Daniel Hensby edited this page Dec 7, 2015 · 6 revisions

Set up a clean SilverStripe install

Follow these instructions to create a clean SilverStripe install running on a local vagrant machine.

Requirements
  1. Git - Install Guide
  2. Vagrant - Install Guide
  3. Virtualbox - Install Guide

Steps

Open your favourite CLI client, these commands should work on *nix systems and Windows using PowerShell.

Navigate to a location where you want to manage your files, for the purpose of this example it'll be ~/sites

Step 1

$ mkdir ~/sites
$ cd ~/sites

Step 2

Then we need to grab the latest Skeleton files from the GitHub repository. This will "clone" the repository into the folder ~/sites/new-project

$ git clone https://github.com/BetterBrief/vagrant-skeleton.git new-project

Step 3

(Optional) Once this is complete, we can remove the .git folder from the new-project folder, as we probably don't want it to be versioned at this time

#Linux:
$ rm -rf new-project/.git

#Windows:
$ del new-project/.git -R -Force

Step 4

Next change directory into new-project and create a www folder, this will be our "webroot". Then we need to run vagrant up to create our VM

$ cd new-project
$ mkdir www
$ vagrant up

This can take a few minutes, especially if you need to download the OS image (this will be cached locally once you have it)

Step 5

Once the machine is booted and provisioned you need to SSH into the vagrant machine (this can be trickier on windows) and set up the SilverStripe project using composer

$ vagrant ssh -c 'sudo composer create-project silverstripe/installer /var/www/html'

Step 6

Once this has run, navigate to http://localhost:8080 and voilà, a new SilverStripe site ready for you to play with.

Extra resources


Common problems

My computer gets stuck trying to connect to the vagrant machine

You need to enable virtualisation on your BIOS