Skip to content
Sign in

HTTP Auth

HTTP Basic Auth for WordPress: protect admin pages on production and complete staging or dev sites, per site and multisite ready.

Not scanned yet WordPress plugin 6k installs

Install in

No install steps yet

Follow the steps on the source page.

HTTP Auth adds a browser username and password prompt (HTTP Basic Authentication) in front of your site, before WordPress or any login form loads.

Use it to:

  • Protect production admin pages from brute-force attacks: the login page, admin pages and XML-RPC ask for an extra username and password.
  • Hide development and staging sites from visitors and search engines by protecting every page.
  • Use one database everywhere. Choose the protection for each site URL, so production, staging and dev each get the right protection, even after your host copies the site between environments.

Features

  • Sites: set None, Admin Site or Complete Site for each site URL, with wildcards like *.example.com and a default for any other site.
  • Push safe: hosts like WP Engine, Kinsta and Pantheon rewrite URLs when copying a site. HTTP Auth stores its site list so it is not rewritten, and site URLs can also be defined in wp-config.php or code.
  • Credentials per mode and per site: Admin Site and Complete Site have their own username, password and message, and any site can use its own instead.
  • Multisite: when network activated, manage every site from Network Admin.
  • Brute-force throttling: too many failed attempts from one IP are blocked for a while.
  • Lockout escape: define( 'HTTP_AUTH_DISABLE', true ); in wp-config.php turns it off without touching settings.
  • Secure storage: passwords are hashed, never stored or shown in plain text.
  • Works with caching, WP-Cron and WP-CLI: protected pages are not cached, and cron and CLI requests are never blocked.

Help Us Improve!

If you are happy with the plugin, please leave a review on WordPress.org. Your feedback keeps it improving.

Bug Reports

Bug reports are welcome on GitHub. For questions and help, please use the support forum.

Written by Joobi from the project's own listing. See the source page

Basic authBrute Forcehttp authPassword Protectstaging
23 Nov 2026
Version 1.1.0 released. Not scanned yet.

1.1.0

  • Sites tab: choose None, Admin Site or Complete Site for each site URL, with wildcards and a default for other sites.
  • Site URLs can be defined in code with HTTP_AUTH_SITE_URLS or the http_auth_site_urls filter.
  • The site list is stored so environment pushes (WP Engine, Kinsta, Pantheon) can not rewrite it.
  • Custom credentials per site.
  • Multisite: network wide settings in Network Admin, each site’s old settings are imported.
  • Settings moved under Settings > HTTP Auth, with a new design and a Support box. The About page was removed.
  • Security: passwords are hashed and never shown, fixed a query string bypass of the admin only mode, XML-RPC is protected in Admin Site mode, failed attempts are throttled.
  • Fixed passwords with special characters (&, ", <) never matching.
  • Fixed CGI/FastCGI servers asking for the password again and again.
  • WP-Cron and WP-CLI are no longer blocked.
  • Protected pages are not cached.
  • HTTP_AUTH_DISABLE turns protection off from wp-config.php.
  • Upgrades from 0.3.x and 1.0.x keep the existing settings, and rolling back to 1.0.x keeps working.
  • Requires PHP 7.2.

1.0.1 – Dec 23, 24

Fix minor WPCS issues and change text for better understanding.

1.0.0 – July 28, 2023

* Fix WPCS issues

Earlier versions

* For the changelog of earlier versions, please refer to the separate changelog.txt file.
18 Feb 2016Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)