0

I have more than 2 wordpress subdomains. Before this, I tried using wordpress multisite, but my hosting doesn't has wildcard subdomain. I want to manually change subdomain directory to be appointed on public html, but my hosting doesn't has that functionality too. So my last option is to make single sign on using cookies. I have created custom user table anda custom user meta, also created same cookies path between 2 of my wordpress sites, following this tutorial: https://jeffmikels.org/posts/single-sign-on-for-multiple-wordpress-installations/ I have success, but there is a problem. When I log in into second wordpress, I doesn't have a same role as my first site. Do you guys have a solution so I can create sso with shared user role for 2 or more wordpress subdomains? Thanks.

  • if you read the comments section on the tutorial in your question, there is mention of the problem of capabilities and a potential solution. This might what you are looking for? I suppose you could come up with a way to automatically sync the capabilities (copy the user meta from one key to another) on login. – majick Jan 29 '18 at 23:30
  • I think using custom user meta is just same with copy the user meta from one key to another. I already try anything to make this thing work, but still the result is not like what I had expected. – Kevin Jan 30 '18 at 5:50
  • suggest adding the code you are using to try to do that to the question. – majick Jan 30 '18 at 10:01
0

did you try to use a plugin instead,

https://premium.wpmudev.org/forums/topic/configure-single-sign-on-for-multiple-wordpress-sites-and-make-it-secure

have a look at this and this one https://wordpress.org/plugins/wp-multisite-sso/

hope this might help

  • I need plugin with multiuser functionality too. All of plugin that I met just have SSO, but the user that come into second site just login as quest, even the administrator from first site. – Kevin Jan 30 '18 at 5:48
  • ok, how about this plugin wordpress.org/plugins/worpit-admin-dashboard-plugin it has "Automatically log into your WordPress sites without remembering your WordPress login details." this feature. Also, what i guess with your situation, you need to have look into this one as well, developer.wordpress.com/calypso it's a new project from wordpress team. – John Jan 30 '18 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.