Some technical knowledge required
You'll need some experience running virtual machines and PHP applications to get Rooftop CMS running locally. If you just want to try out Rooftop, get in touch with Ed and the team and we'll set up a demo account for you. No installation required!
VVV is a ready-built set of scripts for running PHP in a vagrant machine, from the folks at 10up and makes it dead easy to get set up. We have forked from VVV master to add some plugins: primarily Elasticsearch (not used yet) and Redis (used for queues, caching and etags). Periodically we merge the upstream master branch of VVV.
In the location you want to install the VVV virtual machine (inside which you'll add Rooftop CMS), run the following:
git clone https://github.com/rooftopcms/VVV.git git submodule update --init --recursive
Clone the Rooftop git repo inside the VVV one:
cd VVV/www git clone https://github.com/rooftopcms/rooftop-cms.git git submodule update --init --recursive
There are a couple of entries in the Composer file you'll need to remove because they're not open-sourced (yet). They don't affect the running of Rooftop for your site; they're just stuff we have in the project for our hosted version. There's work in progress to remove these and put them elsewhere.
Remove the line from VVV/www/rooftop-cms/public/composer.json which contains this:
You'll need Composer installed locally
Composer is a package manager for PHP. You'll need to have it installed to run this command. Installation instructions are at https://getcomposer.org/download/ - for OSX it's easiest to use Homebrew:
brew install composershould do it.
We've hit one or two issues getting VVV to install the composer packages on first run. To get around that, install them locally in the place VVV will access them:
composer install -d public/
Rooftop is a Wordpress Multisite installation with subdomains. To develop locally, you need to configure Vagrant to update your hosts file with entries you need
vagrant plugin install vagrant-hostsupdater
VVV/www/vvv-hosts to include the subdomain(s) to the sites you're developing locally.
You should be good to start the Vagrant machine. On first run it'll take ages to install everything - on a 10Mb connection with a fast machine it takes us about half an hour.
Run this from the rooftop-cms folder:
…and go and do something else for a while.
When it's done, it'll drop back to a command prompt and you should be able to access http://vvv.dev on your local machine.
Redis is used for etag caching and queues.
vagrant ssh apt-get install redis-server
Sometimes it's useful to access your VM MySQL database from your local machine. To do this you need to grant the root user access from other machines:
From a console on your machine, inside the rooftop-cms project:
# ssh into the vagrant machine vagrant ssh #log into mysql - password is root mysql -u root -p # grant access grant all on *.* to [email protected]'%' identified by 'root'; exit
Updated less than a minute ago