Appearance
Admin Lockout Recovery
If you lose access to the admin panel (forgotten password, deleted account, etc.) and still have FTP or SSH access to the server, there are two recovery paths.
Option 1 — Delete all users and re-run setup (recommended)
Connect to your server via FTP or SSH.
Delete all files inside
cms/storage/users/:bashrm cms/storage/users/*.jsonYour content is safe. Only user accounts live in
cms/storage/users/. Content entries, media, and content types are stored in separate directories and are not affected.Visit
https://yourdomain.com/adminin your browser. CometCMS will detect that no users exist and show the first-run setup screen.Create a new admin account.
Option 2 — Replace the password hash directly
If you want to preserve the existing user account, you can reset the password by editing the user's JSON file directly. Access tokens are stored separately in cms/storage/api-tokens/.
Find your user file in
cms/storage/users/. Files are named{userId}.json. Open each one to find the right username.Generate a bcrypt hash for your new password. Any cost factor works — PHP's
password_verify()reads the cost factor from the hash automatically.Via PHP CLI:
bashphp -r "echo password_hash('yourNewPassword', PASSWORD_BCRYPT) . PHP_EOL;"Open the user JSON file and replace the
password_hashfield value with the new hash:json{ "id": "...", "username": "admin", "password_hash": "$2y$12$yourNewHashHere", "role": "admin", ... }Save the file. Log in with your new password.
Important notes
- Never expose the
cms/storage/directory to the public web. Your web server should only serve files throughindex.php. - Generate password hashes on a machine you trust.

