Admin access is protected by in-app authentication. Email/password login and admin authorization are required for all protected /admin/* routes.
Note: The app always trusts X-Real-IP / X-Forwarded-For headers for client IP resolution (used for login rate limiting and telemetry dedupe). It must be deployed behind a trusted reverse proxy (Caddy) — never exposed directly to the internet.
echo 'secure-password' | wpcomposer admin create --email admin@example.com --name "Admin" --password-stdinwpcomposer admin promote --email user@example.comecho 'new-password' | wpcomposer admin reset-password --email admin@example.com --password-stdin- Login:
GET /admin/loginrenders a login form.POST /admin/loginauthenticates with email/password and creates a server-side session. - Logout:
POST /admin/logoutdestroys the session and clears the cookie. - Session cookie:
session, HttpOnly, Secure (in production), SameSite=Lax. - Session lifetime: configurable via
SESSION_LIFETIME_MINUTES(default 7200 minutes / 5 days).
Expired sessions accumulate in the sessions table. Clean them periodically:
wpcomposer cleanup-sessionsRun via systemd timer or cron (daily recommended).
If locked out of the admin panel:
# SSH to the server
ssh deploy@your-server
# Reset the password
echo 'new-password' | wpcomposer admin reset-password --email admin@example.com --password-stdinNo database access or application restart required.