Skip to content

Instantly share code, notes, and snippets.

@tylerwillingham
Last active September 14, 2016 21:33
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerwillingham/0fbc921de0f79542aa3c to your computer and use it in GitHub Desktop.
Save tylerwillingham/0fbc921de0f79542aa3c to your computer and use it in GitHub Desktop.
PuPHPet: Craft CMS VM

PuPHPet for Craft Development

I wanted to get a VM configured quickly for building Craft sites, this is what I did:

https://puphpet.com/#deploy-target

Deploy Target: Local VM

I want a local VM working with Vagrant + VirtualBox.

Local VM Details

  1. Provider: VirtualBox
  2. Local VM OS: Ubuntu 14.04 LTS x64
  3. Local VM IP: Default
  4. Local VM Memory: Default (512mb)

Local VM Forwarded Ports

  1. Host port: default
  2. Box port: default

Sharing folders w/ local VM

  1. Box Sync Folder Source: Default
  2. Box Sync Folder Target: Default
  3. Shared folder type: Default

Server Packages

Installed Packages:

  1. vim

MailCatcher

  1. I chose to install MailCatcher

Custom files

Read this and determine if it's important to you. I copied my .vimrc

Firewall Rules

I didn't configure anything here.

Webservers

I chose Apache. I like nginx, but I won't be using it for most sites.

Apache Modules

I used the default (php, rewrite), I'm comfortable enough with installing modules after the fact if I need them.

I did not enable PageSpeed or Spdy

Apache Virtual Host

  1. Server name: craft.dev
  2. Server Aliases: www.craft.dev
  3. Document root: /var/www/craft
  4. Port: 80
  5. Environment Variables: default
  6. AllowOverride: default
  7. Directory Options: default
  8. Custom directives: none
  9. Enable SSL: Not this time.

Languages

PHP Quick Settings

  1. Install PHP: duh
  2. PHP Version: I choose 5.5, you can choose either.
  3. Composer: Yes
  4. ini Settings: default
  5. PHP Timezone: your call
  6. PHP Modules: cli, mcrypt, intl, curl, imagick
  7. Pear Modules: default (none)
  8. PECL Modules: default

PHP Libraries

I chose to install xdebug w/ the default settings

Databases

Install MySQL. You don't need my instructions for the rest :)

Work Queues

Skipped

Search Servers

Skipped

Create!

Next steps...

  1. Unzip the PuPHPet file and put the ./puphpet folder and ./Vagrantfile in the folder that you want to share with your VM.
  2. Run 'vagrant up'
  3. Wait...
  4. Wait some more...
  5. Hit the IP you configured as the host in your browser This page is coming from ./html/index.html
  6. Configure yout hosts file so that craft.dev points to the aforementioned IP

A note on connecting to your db

I'm using Sequel Pro. Connect via SSH. Enter the MySQL credentials that you supplied. For the SSH credentials, 'vagrant' is the user, 127.0.0.1 is the host. Instead of entering a password, specify the private key found in puphpet/files/dot/ssh/ (id_rsa)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment