Getting Statamic 3 running locally on a Mac

It's easy. Just open up the terminal, type this command...then I heard myself.

As seasoned developers, we make a lot of assumptions as to the experience of others in the tech community.

My talented designer mate Alan wanted to launch a new website, his initial thought was a WordPress site but:

Alan wanted to get Statamic running locally but getting a modern PHP application configured with composer etc can be a lot to take in and learn to build a quick website.

So, I wrote this script that does much of the heavy lifting for you.

This script does the following:

  • installs Homebrew package manager for Mac
  • installs Nodejs for compiling the assets (CSS and JavaScript)
  • installs Composer for installing PHP packages
  • installs Laravel Valet, a lightweight way to run modern PHP apps
  • clones Jack's Statamic starter Git repo
  • installs the PHP packages that the above Git repo needs
  • installs the Nodejs packages that it needs
  • creates the environment file
  • compiles the assets

To use the script - and there's no easier way I can think of for this: 

1. download the script to your Mac's home directory

2. open terminal.app

3. type this command that changes the permissions on the script for it to run

4. execute the script

Voila!

This should get you running locally with your first Statamic 3 site. 

If you've got problems with any of this, ping me on the Twitters and we can jump on a Tuple call to work through it.

Tooling for modern web development can be rough, hopefully, this script eases the initial setup pain.

Next up, I'll give some options for deploying to a live web server.

Thanks for reading.