PHPackages                             pechente/kirby-password-guard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. pechente/kirby-password-guard

ActiveKirby-plugin[Security](/categories/security)

pechente/kirby-password-guard
=============================

Kirby Password Guard

1.3.1(1mo ago)345.0k↓44.3%[2 issues](https://github.com/Pechente/kirby-password-guard/issues)MITPHPPHP &gt;=8.0.0

Since Oct 25Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Pechente/kirby-password-guard)[ Packagist](https://packagist.org/packages/pechente/kirby-password-guard)[ Docs](https://github.com/Pechente/kirby-password-guard/)[ RSS](/packages/pechente-kirby-password-guard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Kirby Password Guard
====================

[](#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.

[![kirby-password-guard](https://private-user-images.githubusercontent.com/5963497/380140032-2e4596a7-56a9-4084-8b5c-4c3358e4f34c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNTg0MDQsIm5iZiI6MTc3NTM1ODEwNCwicGF0aCI6Ii81OTYzNDk3LzM4MDE0MDAzMi0yZTQ1OTZhNy01NmE5LTQwODQtOGI1Yy00YzMzNThlNGYzNGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNB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kI_FIk)

---

Installation
------------

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-password-guard`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/pechente/kirby-password-guard.git site/plugins/kirby-password-guard

```

### Composer

[](#composer)

```
composer require pechente/kirby-password-guard

```

Setup
-----

[](#setup)

### Configuration

[](#configuration)

Add the following lines to your config.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

[](#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:

```
DOCTYPE html>
