PHPackages                             imarc/craft-password-protection - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. imarc/craft-password-protection

ActiveCraft-plugin[Authentication &amp; Authorization](/categories/authentication)

imarc/craft-password-protection
===============================

Password protect any page on the CMS.

1.1.3(4y ago)22.4k4[3 issues](https://github.com/imarc/craft-password-protection/issues)[4 PRs](https://github.com/imarc/craft-password-protection/pulls)proprietaryPHP

Since Aug 21Pushed 3y ago3 watchersCompare

[ Source](https://github.com/imarc/craft-password-protection)[ Packagist](https://packagist.org/packages/imarc/craft-password-protection)[ RSS](/packages/imarc-craft-password-protection/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (7)Used By (0)

Password Protection plugin for Craft CMS 3.x
============================================

[](#password-protection-plugin-for-craft-cms-3x)

This is a Craft CMS plugin that allows for password protecting any page in your CMS intuitively and without any hassle.

[![Screenshot](resources/img/plugin-logo.png)](resources/img/plugin-logo.png)

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

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

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

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require imarc/craft-password-protection

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Password Protection.

Configuring Password Protection
-------------------------------

[](#configuring-password-protection)

#### Default Password

[](#default-password)

When you set a default password that value will be used as a default for any page where Lock Screen is enabled and the password field is left empty. When this setting it left empty and no password is provided for a lock screen then the lock screen will automatically be disabled.

#### Password Cookie Duration

[](#password-cookie-duration)

This setting defines how long the user will be remembered for. The value entered is in seconds, so for example to get one day you would do 86400. Default is 1 day.

#### Template

[](#template)

This allows for defining of a custom login page. Simply create a template in your project where you have a form with a field that is named `password_protect` and then define the route for that template in the settings for password protect. For a template located in `tempalates/password-protect/login.twig` the path entered would be `password-protect/login` or `/password-protect/login`. Here is an example of a simple template:

```

    {{ 'Enter Password'|t }}

        {{ csrfInput() }}

        {% set message = craft.app.session.getFlash('protect_error') %}
        {% if message|length > 0 %}

                {{ message }}

        {% endif %}

```

Using Password Protection
-------------------------

[](#using-password-protection)

To start using Password Protection on a page simply login to the admin panel, then go to Entries and click the entry that you would like to protect. Once on the edit page on the right side of the screen you will see a lightswitch labeled 'Enable Password Protect'. Just toggle it on/off and enter a passphrase if you want that page protected. When you're done don't forget to click save in the top right and then you are ready to go!

Now when users go to that page they will get prompted with a default password page, or a custom password page if defined. [![Screenshot](resources/img/protect-screen.png)](resources/img/protect-screen.png)

#### Note

[](#note)

Once a user enters a password correctly, a cookie will be stored and they won't have to re-enter the passphrase until the cookie expires. Also any user that is logged in will automatically be granted access to ALL password protected pages. It's on the road map to allow customization of which users will be prompted on certain pages.

Password Protection Roadmap
---------------------------

[](#password-protection-roadmap)

Some things to do, and ideas for potential features:

- Allow customization of which logged in users will be prompted for a password on certain pages

Brought to you by [Imarc](https://www.imarc.com/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~73 days

Total

5

Last Release

1798d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00725533df5fd021ac93639028725bf46bef78f6d924618a987b9bfd5c32c3eb?d=identicon)[jeffturcotte](/maintainers/jeffturcotte)

---

Top Contributors

[![VadimBeliak](https://avatars.githubusercontent.com/u/24794702?v=4)](https://github.com/VadimBeliak "VadimBeliak (9 commits)")[![khamer](https://avatars.githubusercontent.com/u/1452?v=4)](https://github.com/khamer "khamer (2 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginpassword protection

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/imarc-craft-password-protection/health.svg)

```
[![Health](https://phpackages.com/badges/imarc-craft-password-protection/health.svg)](https://phpackages.com/packages/imarc-craft-password-protection)
```

###  Alternatives

[verbb/knock-knock

Password protect your public facing Craft website with a single password.

17122.8k7](/packages/verbb-knock-knock)[matt-west/craft-recaptcha

Integrate Google’s reCAPTCHA into your forms.

1959.9k1](/packages/matt-west-craft-recaptcha)[jamesedmonston/graphql-authentication

GraphQL authentication for your headless Craft CMS applications.

2917.0k](/packages/jamesedmonston-graphql-authentication)[thejoshsmith/craft-fab-permissions

Give yourself better control over your sections with Craft Field and Tab (FAB) Permissions. Restrict which tabs and fields are visible to different user groups.

1611.5k](/packages/thejoshsmith-craft-fab-permissions)

PHPackages © 2026

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