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.
did you try to use a plugin instead,
have a look at this and this one https://wordpress.org/plugins/wp-multisite-sso/
hope this might help