Private Grav Plugin
New version is Private Site
Private is a Grav Plugin.
Private provides an authentication form to keep your entire Grav site or part of it private from the general public.
Installing the Private plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method allows you to do so by downloading a zip file to place in the Grav plugins directory.
GPM Installation (Preferred)
The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's Terminal (also called the command line). From the root of your Grav install type:
bin/gpm install private
This will install the Private plugin into your
/user/plugins directory within Grav. Its files can be found under
To install this plugin, just download the zip version of this repository and unzip it under
/your/site/grav/user/plugins. Then, rename the folder to
private. You can find these files either on GitHub or via GetGrav.org.
You should now have all the plugin files under
By default, the password is
password, username is not needed and Grav is fully private.
To customize this parameters (and more), you first need to create an override config. To do so, create the folder
user/config/plugins (if it doesn't exist already) and copy the private.yaml config file in there and then make your edits.
Recommended changes to be made to ensure your site is secure (See Options section below)
- Change the default password in your
- Change the default security salt in your
- Customize your privacy rules
Enable or Disable the entire plugin (default:
Routes of login and logout. You can customize it by replacing value (e.g: login: "/admin" for "mywebsite.com/admin" )
routes: login: "/login" logout: "/logout"
true, the entire site is private. If false, then Private can be enabled on a page by page basis by using the
private_tag ( See after ) (default:
If the private_site value is
false, you will need to add the
private_tag on your private page. (default:
See Grav Taxonomy for more information.
Username on login page
true) or Disable (
false) the username field on the private page's login form. (default:
Note : If you disable the username, you need to keep
no_userusername in the
usersparameters. enable_username: (true|false)
List of users. For adding user, just create a new line keeping the identation. (default password:
Note : If enable_username is
false, you must not delete the
no_useruser in the list.
Note : The password MUST BE a SHA1 value. For quick checking see SHA1 Online to generate your SHA1 password. But it is adwised to generate it locally as http and any transmission is not as secure as no transmission at all. Use command:
echo -n "yourpassword" | sha1sum. You can remove it thereafter from bash history with
history -d 1234and sourcing the ~/bashrc.
users: no_user : sha1_password
This section allows you to change the text which will appear on the login form on Private enabled pages.
fields: username: label: "Username" placeholder: "Enter your username"
As development for the Private plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Private is easy, and can be done through Grav's GPM system, as well as manually.
GPM Update (Preferred)
The simplest way to update this plugin is via the Grav Package Manager (GPM). You can do this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following:
bin/gpm update private
This command will check your Grav install to see if your Private plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type
y and hit enter. The plugin will automatically update and clear Grav's cache.
Manually updating Private is pretty simple. Here is what you will need to do to get this done:
- Delete the
- Download the new version of the Private plugin from either GitHub or GetGrav.org.
- Unzip the zip file in
your/site/user/pluginsand rename the resulting folder to
- Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing
Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in
user/config/plugins) will remain intact.