Recently some sites I host which use WordPress came under a brute force attack. Being a cli admin I figured there had to be a way to rename the admin user from the command line.
Since I didn’t find a quick answer figured I would post something here. use mysql to connect to the database server and select the database. Then issue something like the following:
update wp_users set user_login = REPLACE(user_login, 'admin', 'NewAdminNameGoesHere') where user_login LIKE user_login;