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.
- Add the package to your bedrock installation with
composer require aprivette/bedrock-auth
. - Activate the plugin in WordPress.
- Add the
BASIC_AUTH_USER
andBASIC_AUTH_PASS
variables to your .env file. - 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. - Navigate to the site and it should require you to login.