In this post, I'll walk through downloading and running an existing Statamic repository. This is a handy reference if you've got a new machine, have a fresh install of macOS, or maybe you've inherited a Statamic repository.
Once you've cloned the site into your
Sites folder, it's handy to ensure that your project folder has the same name as the domain so valet can run it easily, e.g. for my site—https://jaygeorge.wip—my project folder is called
If you're running
valet park on your
Sites you should be able to boot up http://yoursitename.wip (or maybe http://yoursitename.test if you haven't changed the default TLD). You can go a step further and run your domain on HTTPS by typing
valet secure yoursitename
Installing the Site with Composer
Composer needs to do its thing and install the site. Run the following commands:
At this point, you need to ensure you have an environment file since these are not committed to git by default, since every machine will have a slightly different environment.
I find the easiest way to add an environment file:
Make sure you have hidden files revealed on macOS. You can do this by using the keyboard shortcut
cmd + shift + .in Finder to toggle hidden files.
cmd + d
Rename the newly duplicated file as just
Now you can run the following commands:
php artisan key:generate php artisan optimize php please cache:clear php please stache:refresh