[worpress] wp-admin asks for yunohost credentials

What app is this about, and its version: wordpress 6.8.2
What YunoHost version are you running: 12.1.25
What type of hardware are you using: VPS bought online

Describe your issue

I installed WordPress from YunoHost and it works perfectly. When I go to the admin page hpps://mydomain.com/wp-admin, it asks me for my YunoHost credentials. What did I do wrong? I don’t want to have to enter my YunoHost credentials as well. How can I fix this? I just want to enter my WordPress credentials. Thanks.

Share relevant logs or error messages

none

You did nothing wrong, as an additional security measure Wordpress on YunoHost limits the access to admin panel to members on admins group, hence the YNH SSO interstitial.

This can be changed by granting Wordpress (admin) permission to the user that is not an YNH admin but should have access to said page anyway.

1 Like

So I need to create a younohost webadmin user, install WordPress with that user, and then have that yunohost user manage the site? I’m interested in creating a completely independent user without having my admin password. I assume that the user I create won’t be able to do anything on YunoHost, is that right?

You don’t need create another user, all the users from the group admins in yunohost have already an access for the admin wordpress. but you can then add another user from wordpress which will be not a yunohost user and give him from wordpress the admin privileges… You will need pehaps also give the permission wordpress admin in the group visitors ? I am not sure…

I need a non-administrator YunoHost user who can access the WordPress admin page. I don’t want the YunoHost user I create to be able to create emails, make updates, backups, etc. Is this possible? I hope I’ve made myself clear. Thanks.

Try this, with a user non-admin created for wordpress, choose admin (choice at he install) and then via the webui on the groups/permissions via the webui you add a personalise permission for this user wordpress admin and you remove this permission for the group admins.

  1. i create a normal user
  2. i installed worpress with wp admin the user 1)
  3. i added user 1) wordpress-admin permission
  4. go to mydomain/wp-admin → access_denied

Maybe it’s mandatory to be a YunoHost admin to access mydomain/wp-admin, but I don’t want it to be a YunoHost admin! Is there anything I can do to change this setting? Thanx

Have you try first connect with this user on the yunohost portal, and then on the wordpress admin (tile) from the portal ?

Or another way can be installing wordpress on a my_webapp,

I connect to YunoHost portal and then i try to connect to mydomain/wp-admin and YunoHost refuse to show me the login (wp-admin) page.
Maybe only admins group can access this page.
I don’t uderstand this “Or another way can be installing wordpress on a my_webapp” what i’ve to do?

well it is less safe than use a package wordpress maintained…

But I do this somatimes. Install a my_webapp with a database sftp user, download wordpress files on the folder and install it… There is also something to add in the personalisation for nginx.conf…

I have do a special fork of my_webapp for the sites wordpress I maintain with yunohost here GitHub - rodinux/my_webapp_ynh at wordpress_spec

But it can be less safe than use the official wordpress_ynh package if you are not don’t really sure…

Thanks, but I’m not so familiar with Linux, YunoHost and WordPress to try this system, I need another system or simple customization of WordPress/YunoHost. Thanx.

The way to do it would be to give Wordpress (admin) permission to Visitors group, though it’s not recommended for obvious security reasons (bots scan for that path on Wordpress installations trying to brute-force the password).

Sorry, I have tested on a local server what I try said you before…

I install wordpress and choose a user rodinux not in the group admins of yunohost, a simple user.

Then in the webadmin in Groups and Permissions

at the bottom you add a Individual user permissions look for the user (here rodinux)

and add wordpress admin permission

then you need first connect to the portal with this user (here rodinux), then click on wordpress tile, then add /wp-admin enter the ID (here rodinux) and the yunohost password, that’s it he is admin in wordpress…

Also I removed the permission wordpress admin in the group admins

I added “wordpress admin” (there is a wordpress admin for each wordpress installation) permission to “visitors” group.
Now i can go to mydomain.com/wp-admin but when i enter “myuser” and “mypassword” i get " Error: The password you entered for the username myuser is incorrect."

Password is correct, i’m sure, i also tryied to log off from yuno and log in again, nothing.
Why?
Thank you.

1 Like

Are you first connected in the portal with the user added on the wordpress install ? If you are connected with another user it can’t works, you lust first disconnect and be connected with the user added for wordpress.
Also Is your wordpress installed on tha main domain or a sub.domain ?

ok this works, thank you. maybe i got wrong something before, i dunno, maybe because there is one wordpress admin for each wordpress installation (without specificing what wordpress admin is) and i set the wrong one.
Thank you very much!