PHPackages                             johannschopplich/kirby-locked-pages - 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. johannschopplich/kirby-locked-pages

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

johannschopplich/kirby-locked-pages
===================================

Password-protect pages for the Kirby CMS

2.2.0(7mo ago)403.8k3[2 issues](https://github.com/johannschopplich/kirby-locked-pages/issues)MITPHP

Since Dec 24Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/johannschopplich/kirby-locked-pages)[ Packagist](https://packagist.org/packages/johannschopplich/kirby-locked-pages)[ Docs](https://github.com/johannschopplich/kirby-locked-pages#readme)[ RSS](/packages/johannschopplich-kirby-locked-pages/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (22)Used By (0)

Kirby Locked Pages
==================

[](#kirby-locked-pages)

Protect pages that you want to hide from unwanted views with a password.

Key Features
------------

[](#key-features)

- 🔒 Easily password-protect single pages
- 🪝 Custom logout hook
- 🖼 Panel blueprints included

Requirements
------------

[](#requirements)

- Kirby 3.7+

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

[](#installation)

### Composer

[](#composer)

```
composer require johannschopplich/kirby-locked-pages

```

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-locked-pages`.

Usage
-----

[](#usage)

When a locked page is visited, Kirby will redirect to a login form ([virtual page](https://getkirby.com/docs/guide/virtual-pages)), where a password may be entered. Once the user enters the correct password, he will be redirected back to the page URL which was locked before.

The user session also records that this page is now unlocked for further requests. After the session expires, the user has to enter a password again.

### Configuration

[](#configuration)

See the list of [available options below](#options).

### Blueprints

[](#blueprints)

Add the protection field group to a page blueprint, which shall be lockable by password:

```
sections:
  access:
    type: fields
    fields:
      security: fields/locked-pages
```

The field group `fields/locked-pages` is registered globally by the plugin.

> ℹ️ Note: The error page is not lockable. Although it is possible to add the fields, they will have no effect.

### Templates

[](#templates)

You probably want to customize the template which will show the password form. The [template provided](templates/locked-pages-login.php) is suited to be used as-is, but you are welcome to create a `locked-pages-login.php` template inside your `site/templates` folder. The plugin's included template may be used as a starting point.

Once you've defined a custom template, Kirby will automatically use the one you've created rather than the one included by the plugin.

### Logout Hook

[](#logout-hook)

It is often helpful and good UX to provide the user a way of logging out. You can use a custom [Kirby hook](https://getkirby.com/docs/reference/plugins/extensions/hooks) for this use-case.

Trigger the `locked-pages.logout` hook to clear the user's plugin session data. Once logged out, he will have to enter the password again.

```
kirby()->trigger('locked-pages.logout');
```

Options
-------

[](#options)

> All options are namespaced under `johannschopplich.locked-pages`.

Option DefaultDescription`slug``locked`Slug for login form (absolute to the site URL).`template``locked-pages-login`Optional name of custom template (has to be created manually).`title``Page locked`Title of the login form.`error.csrf``The CSRF token is invalid`Error message for invalid CSRF.`error.password``The password is incorrect`Error message for invalid password.> All of the `error` options have to be wrapped in an array.

To give an example for your `config.php`:

```
return [
    'johannschopplich.locked-pages' => [
        'slug' => 'geschuetzt',
        'title' => 'Geschützte Seite',
        'error' => [
            'csrf' => 'Der CSRF-Token ist nicht korrekt',
            'password' => 'Das Passwort ist nicht korrekt'
        ]
    ]
];
```

Credits
-------

[](#credits)

- Inspired by [kirby-securedpages](https://github.com/kerli81/kirby-securedpages)

License
-------

[](#license)

[MIT](./LICENSE) License © 2021-PRESENT [Johann Schopplich](https://github.com/johannschopplich)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance61

Regular maintenance activity

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~248 days

Total

21

Last Release

230d ago

Major Versions

1.3.3 → 2.0.02022-09-21

PHP version history (2 changes)v1.0.0PHP &gt;=7.3.0

1.3.2PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9be5bf8dd3a36f63c00f92a115f1109567745fb3b068617341ffc8a90755d6c?d=identicon)[johannschopplich](/maintainers/johannschopplich)

---

Top Contributors

[![johannschopplich](https://avatars.githubusercontent.com/u/27850750?v=4)](https://github.com/johannschopplich "johannschopplich (57 commits)")[![animaux](https://avatars.githubusercontent.com/u/446874?v=4)](https://github.com/animaux "animaux (1 commits)")[![tobimori](https://avatars.githubusercontent.com/u/29142128?v=4)](https://github.com/tobimori "tobimori (1 commits)")

---

Tags

kirbykirby-pluginpasswordpassword-locksecuritypasswordsecureprotectkirbypanel

### Embed Badge

![Health badge](/badges/johannschopplich-kirby-locked-pages/health.svg)

```
[![Health](https://phpackages.com/badges/johannschopplich-kirby-locked-pages/health.svg)](https://phpackages.com/packages/johannschopplich-kirby-locked-pages)
```

###  Alternatives

[ircmaxell/password-compat

A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password\_hash

2.1k56.8M122](/packages/ircmaxell-password-compat)[symfony/password-hasher

Provides password hashing utilities

813137.2M91](/packages/symfony-password-hasher)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[pechente/kirby-password-guard

Kirby Password Guard

345.0k](/packages/pechente-kirby-password-guard)[aidantwoods/secureheaders

A PHP class aiming to make the use of browser security features more accessible.

433689.3k2](/packages/aidantwoods-secureheaders)[rych/phpass

PHP Password Library: Easy, secure password management for PHP

248801.7k4](/packages/rych-phpass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
