I opted to install Grav via the ZIP package, as documented here. My hosting provider does not give me shell access, so I would not be using git or the Grav Package Manager (GPM), but limiting myself to FTP or the cPanel File Manager.

OS X

Installing Grav on OS X via ZIP is straight forward. If not, have a look at my previous post on Enabling Apache and PHP.

Download a Grav Skeleton. I'm using Blog Site skeleton and the default Antimatter theme included with Grav.

Gripe: the Antimatter theme is really pretty, but is based on a custom Nucleus styling framework. As it's not documented, and I struggling to tweak it! Maybe sticking to Bootstrap Skeleton would have been a better idea.

Extract the contents and move it to the Apache documents root or create a new directory under it, e.g. /User/[user]/Sites/grav. Using the latter would give me flexibility to maintain multiple versions of Grav in separate sub directories.

Currently the skeleton does not include the fantastic Beta Admin Plugin, so that's the first order of business. Download and extract plugins into the user/plugins folder, renaming the target folder to just admin. Repeat for:

  • Admin
  • Login
  • Form
  • Email

Add any other plugin in the same way, e.g. External Links, Highlight, Featherlight, etc.

Next create the first admin user. Create a file users/accounts/admin.yaml, changing the details as appropriate (the password will later by hashed by Grav - nice!):

password: 'admin'
email: 'youremail@mail.com'
fullname: 'Johnny Appleseed'
title: 'Site Administrator'
access:
  admin:
    login: true
    super: true

Point your browser to localhost/grav/admin (or localhost\admin if you did not place Grav in its own folder). If all has gone according to plan, you'll be greed with the login page.

cPanel Hosting Provider

I pretty much did the same thing as above, but was greeted with a 403 Forbidden error while trying to use an ErrorDocument to handle the request":

Forbidden

You don't have permission to access /admin on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I don't have access to logging via cPanel, so it took a little bit of digging to figure out why. The reason is permissions as documented in the Grav Requirements:

  • For files, 644 - especially for index.php.
  • For folders, 755 - who knew that having additional permissions would not work!

cPanel Folder Permissions

Once that's fixed, make sure .htaccess is merged with your default (i.e. cPanel auto-generated) version. Keep a copy since cPanel configuration may overwrite it.

Now you'll be able to visit the /admin page and login!