Admin_user: change does not affect default admin username for /wp-admin

Hi There

Is it by default that regardless of the definition of admin_user in all/users.yml the default Username for the Admin Account to login at /wp-admin remains “admin”?

If so, maybe its worth it to provide a hint within the docs?

Those are 2 different admin_user. The top level variable in group_all/users.yml is for an OS system user.

If you want to change WP’s admin username, then set admin_user for your site in wordpress_sites.yml.

1 Like

was this solved before the config files were slimmed down?

my wordpress_sites.yml file has no admin_user setting?

it looks like this :

- canonical: my-site.local
local_path: …/site # path targeting local Bedrock site directory (relative to Ansible root)
admin_email: admin@my-site.local
enabled: false
enabled: true
provider: self-signed
enabled: false

can I just add the admin_user setting?

Yes :slight_smile:. We just have a sensible default now.

@swalkinshaw do you suggest to change the default admin_user in the group_all/users.yml with another name or it can bring problem? (i mean instead of admin, use another name)
i was thinking this, because I think that followed an online tutorial and he changed the admin_user for an extra security reason, but I am not sure if this is a good practice or it is better to keep the default one (admin).

Now I am updating trellis to the latest version, and I am thinking if put it back the admin_user to the default (admin) or keep it with a different username.

what is the best practice for this?

I don’t personally think it matters too much. However changing it won’t cause any issues.