# Kirby Password Guard **Kirby Password Guard** is a simple password protection for your [Kirby](https://getkirby.com/) website. It allows you to set a password that needs to be entered in order to access the site. This can be useful for staging sites to prevent unwanted access. Logged in users can access the site normally but any guest will run into the password entry page.  **** ## Installation ### Download Download and copy this repository to `/site/plugins/kirby-password-guard`. ### Git submodule ``` git submodule add https://github.com/pechente/kirby-password-guard.git site/plugins/kirby-password-guard ``` ### Composer ``` composer require pechente/kirby-password-guard ``` ## Setup ### Configuration Add the following lines to your config.php: ```php return [ 'pechente.kirby-password-guard' => [ 'enabled' => true, // Optional - default is true 'password' => 'password', // Required - The password used to access the site. If left empty the plugin will not be enabled. 'pattern' => '(:all)', // Optional - The pattern to protect. By default, all pages are protected. Check the Kirby documentation for more information. ] ]; ``` ### Template You can overwrite the template for the password form by creating the file `site/templates/password-guard.php`. Here's a minimal example of what this file needs to include: ```php