aprivette/bedrock-auth

Environment-specific basic auth for the Bedrock WordPress framework.

Installs: 436

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 0

Type:wordpress-plugin

1.1.0 2024-02-18 17:32 UTC

This package is auto-updated.

Last update: 2024-05-18 18:12:13 UTC


README

A WordPress plugin designed to be an addon to the Bedrock WordPress framework.

It adds environment-specific basic authentication to WordPress sites. There are a few use cases for this. For example, if you were to set up a staging site and only wanted to protect only this setup while not affecting version control, then this package could be of use. Alternatively, you can exclusively protect wp-login.php to protect against brute force attacks.

Setup

  1. Add the package to your bedrock installation with composer require aprivette/bedrock-auth.
  2. Activate the plugin in WordPress.
  3. Add the BASIC_AUTH_USER and BASIC_AUTH_PASS variables to your .env file.
  4. Choose an authentication level by setting the BASIC_AUTH_LEVEL variable to either site or login. Choosing site will require auth for the entire site while login will exclusively protect wp-login.php.
  5. Navigate to the site and it should require you to login.