Installing Grav Locally

Before starting this training, please make sure you’ve already installed MAMP: [tutorial here]

Grav is an open source CMS focused on speed and simplicity. Unlike most other platforms like WordPress, Grav does not rely on a database. Instead, it uses a system of folders and markdown files for content. This makes Grav less robust and but still fairly flexible.

Step 1. Download Grav

Go to https://getgrav.org/downloads and download the Grav Core + Admin. Unzip the file and move the copy to your MAMP Document Root folder.

In the future for every new Grav site you want to create locally, you will need a new grav-admin directory. In other words, each site you have on your local machine should be built on a copy of this grav-admin folder.

Step 2 – Change the Document Root in MAMP

In MAMP, go to Preferences and change the document root to point to the grav-admin folder you just unzipped.

Step 3 – Start MAMP & Create Account

In MAMP, click Start. A MAMP page should automatically open as a new tab in your browser. If a new tab doesn’t automatically open, click on the Webstart button in MAMP.

You can also type your localhost address into the address bar. Most Macs have the url be http://localhost:8888/. Your localhost url will depend on the Apache Port. You can check by going to MAMP and clicking on Preferences. Then go to Ports.

The number you see as your Apache Port should go after “http://localhost:”

Once you’ve opened the MAMP page, click on My Website.

This should take you to a Grav create user page. The URL for this page should be http://localhost:YOUR-APACHE-PORT. Every time you work locally using MAMP, this will be the base URL.

Enter the necessary information and click Create User. 

You will be redirected to your Grav dashboard. Notice that the url is http://localhost:YOUR-APACHE-PORT/admin

This is the Admin dashboard (the behind the scenes):

This is the Front-facing site (what the website actually looks like):

Congrats! You’ve successfully installed Grav!

Remember: Every time you want to work on a project, make sure that your Document Root in MAMP is pointing to the right site. For example, if I am working on my “Grav Training Site”, it should point to my Grav-Training-Site folder.

To continue to the Gantry training: https://sites.la.utexas.edu/kb/2021/10/07/grav-building-your-own-site-using-gantry-5/

This entry was posted in Coding. Bookmark the permalink.

Comments are closed.