
WP Admin Generator
Generate SQL queries or WP CLI commands to create WordPress admin accounts. Useful when you're locked out or need quick database-level access.

When you need this
WordPress lockouts happen more often than people admit. A client changes their password and forgets it, a security plugin locks everyone out, or a migration breaks the users table. When you can still access phpMyAdmin or WP-CLI but not the WordPress login screen, creating an admin account directly in the database is the fastest way back in. This tool generates the exact SQL you need — no guessing at password hashing or remembering which tables to insert into.
How the SQL works
WordPress stores users in two tables: wp_users holds the login credentials and wp_usermeta stores the role. The generated INSERT statement creates a row in wp_users with a properly hashed password using WordPress's phpass-based MD5 format. A second INSERT into wp_usermeta assigns the wp_capabilities meta key with the administrator role serialized as PHP expects it. The wp_user_level meta is set to 10, which is the legacy admin level WordPress still checks in some places. If your database uses a custom table prefix, the tool adjusts both table names automatically.
Security reminder
This tool is meant for recovering access to your own sites. After you regain access, change the password through the WordPress dashboard, enable two-factor authentication, and delete any temporary admin accounts you created. Leaving database-generated accounts active without proper password rotation is a security risk. If you suspect your site was compromised, audit all user accounts in the wp_users table and remove anything unfamiliar.
Related Tools
WP Search & Replace
Generate SQL queries for safe search-replace operations. Perfect for WordPress domain migrations.
WP Permissions Fixer
Generate correct chmod and chown commands to fix WordPress file and folder permissions.
htpasswd Generator
Generate Apache .htpasswd entries for basic authentication with MD5, SHA-1, or plain text hashing.