Joomla Administrator password protection: secure /administrator with .htaccess
Do you want to secure the Joomla admin area with .htaccess password protection? The htprotect plugin does it in 30 seconds via the Joomla Extension Manager: install the ZIP, assign a user name + password - done. After that, the plugin uninstalls itself automatically. Compatible with Joomla 3.10, 4, 5 and 6.

Download plugin
→ htprotect-joomla.zip (approx. 7.5 KB) - free, open source.
Installation in 4 steps
- Download ZIP (do not unzip).
- In the Joomla backend: Extensions → Manage → Install → upload the ZIP.
- After successful installation, click the green "Set up password protection now" button.
- Assign user name + password → "Activate protection & remove plugin".
The next time you open /administrator, the password prompt appears before the Joomla login.
What the plugin does in the background
- Creates
.htaccessand.htpasswdin the/administratordirectory. - Automatically selects the appropriate hash method (APR1-MD5 or Bcrypt) - depending on what your Apache supports.
- Generates the password hash directly on your server - the plain-text password never leaves your hosting.
- Uninstalls itself after successful setup - no plugin code is left behind.
Tip
Do not use the same login details for htaccess protection as for the Joomla login. The point of the second door is that it is independent.
Don't want a plugin?
The tool is also available as a standalone PHP script: htprotect.zip simply upload via FTP to /administrator, open it in the browser, set up protection - the script then deletes itself. It also works outside of Joomla, e.g. for subdomains and staging environments.
More than just the admin area? HTProtect Server Shield
Has your Joomla backend already been compromised? Go here for Joomla emergency help.
- Details
- Last Updated: 08 May 2026

