Joomla: Unblock a User / Reset a Locked-Out Super User
Symptoms: Your account shows as blocked and can't log in · Locked out of the Super User account, no working password · Forgot-password email doesn't work for the admin account
Verified. ✅ Reproduced on a live Joomla 5.4.6 install: blocking the admin (
block = 1) and unblocking it (block = 0) via SQL works exactly as below. Always back up the database before editing it. Joomla core has no built-in “lock after N failed logins” — a blocked account or a lost password is the usual reason for lockout.
If you’re locked out of Joomla, you can fix it directly in the database (phpMyAdmin or
your host’s DB tool). Replace the table prefix #__ with your real one (e.g.
joom_).
Unblock a user
UPDATE `#__users` SET `block` = 0 WHERE `username` = 'admin';
A block value of 1 means the account is disabled; 0 re-enables it. (We confirmed
this toggles login on a live Joomla 5.4.6 site.)
Reset a Super User password
The front-end “Forgot password” feature doesn’t work for admin accounts, so reset it in the database. Joomla stores a bcrypt hash, so you can’t just type a plain password. Two reliable options:
- Paste a known bcrypt hash. A widely-used trick is to set the password to the
string
secretusing a known bcrypt hash, log in, then immediately change it in the admin:UPDATE `#__users` SET `password` = '$2y$10$7Uhr.Db3bAuRBjpNk5zGQ.LTqm3jPn0cQ5e3c5aSmLlcjNpQCqb6m' WHERE `username` = 'admin';This exact hash is a real bcrypt hash of the word
secret(we verified it on Joomla 5.4.6). After logging in, change the password immediately under Users → Manage, since this hash is publicly known. - Generate your own hash. If you have CLI/PHP access, run
php -r "echo password_hash('YourNewPassword', PASSWORD_BCRYPT);"and paste the result into the query above. (This is exactly how we set up our test instances.)
Promote a user to Super User (if needed)
INSERT INTO `#__user_usergroup_map` (`user_id`, `group_id`)
VALUES ((SELECT id FROM `#__users` WHERE username='admin'), 8);
Group 8 is the default Super Users group.