wordpress_ynh icon indicating copy to clipboard operation
wordpress_ynh copied to clipboard

Multisite wordpress and urls

Open eauchat opened this issue 6 years ago • 8 comments

Hey hello, thanks for the nice wordpress_ynh package :)

I'm stumbling upon some issue but didn't find any related issues. I'm trying to create a wordpress instance with multisite support that would allow different sites to be served at for example: (a1) mywpdomain.tld <= let's say this would be the main domain, where wordpress administration interface is served (a2) sub.mywpdomain.tld (a3) myfriendswordpressPage.tld ...

It seems that at the moment none of the previous three setup are possible, in multisite situation, every sites would have to be for example: (b1) mydomain.tld/wordpress/mySite (b2) mydomain.tld/wordpress/sub (b3) mydomain.tld/wordpress/myFriendsSite ...

From what I know, at least the (a1) and (a2) or* (b) options are supported by wordpress multisite installation (if not using wordpress_ynh). I'm not so sure about (a3). Is there a possibility to achieve at least (a1) and (a2) and maybe (a3) with wordpress_ynh app?

Thanks a lot :)


*you chose it when installing wordpress

eauchat avatar Nov 14 '19 12:11 eauchat

Hello

The YunoHost package for wordpress doesn't support sub domains multisite. As said in the readme, https://github.com/YunoHost-Apps/wordpress_ynh#limitations.

The reason for this is simple, using sub domains means also updating your DNS, that the package can't do. You can do it on your own though, it should go through the update process without problem.

maniackcrudelis avatar Jan 02 '20 11:01 maniackcrudelis

You can do it on your own though, it should go through the update process without problem.

Not sure to understand what you mean by this.

I wouldn't expect wordpress yunohost app to update my DNS. The behavior I was imagining was that one would add a domain from the normal yunohost admin interface, and then it could be used in wordpress.
But from what I understand a big missing piece in that is how the wordpress yunohost app will tell yunohost that this domain should be directed to itself (= modify nginx config). It could be imaginable that it has to be done manually from ynh admin, but I think it's not possible to choose multiple domains for one app. Did I get it right?

So from what I understand, the way to achieve sub-domain multisite with yunohost, would be to:

  • install the ynh wordpress app as sub-folders multisite,
  • edit it's configuration files to turn it into sub-domains multisite,
  • for every site added, manually add the appropriate nginx configuration.

Is that it?

eauchat avatar Jan 10 '20 12:01 eauchat

Yes your process is right. You can modify the config of wordpress, which wouldn't be a problem for future update of the package. And then add the correct nginx config, as well as the sso config to allow your domain to be reached.

maniackcrudelis avatar Jan 11 '20 20:01 maniackcrudelis

And what do you think of allowing to install wordpress multisite at the root of a domain? I understand that it can enter in conflict with other apps that one could try to install in the same domain, but one could choose to dedicate a domain name only to wordpress. It would be nice to be able to have sites as following: mywordpressdomain.tld/mySite mywordpressdomain.tld/myFriendsSite But the app doesn't allow this possibility. What do you think?

eauchat avatar Jan 12 '20 01:01 eauchat

That's actually an issue with wordpress itself, at the time I made that package, wordpress didn't allow such installation, except with a manual modification of the config. So far, the app allows only to install the app in multisite with sub path. But, you can as well install multiple wordpress in dedicated sub domains if you want.

maniackcrudelis avatar Jan 12 '20 18:01 maniackcrudelis

Ok, thanks for the explanations :) I thought I had tried to install multiple monosite wordpress and couldn't. But could be that I remember wrong. I'd vote to leave this issue open to remember that it can be nice some day to have the possibility to install wordpress in sub domains multisite setup and all the things mentioned here, even if it's not in a near future. But if you prefer otherwise, it's up to you.

eauchat avatar Jan 15 '20 15:01 eauchat

I cant get this running correctly, and get a redirect loop on additional multisite admin panels, plus issues loading resources on their pages, all pointing to an issue with the nginx config. The generic multisite advice doesn't map well to the ynh provided one. @eauchat could you share your config for that please?

harcesz avatar Mar 18 '25 19:03 harcesz

Sorry @harcesz, I don't have the config anymore since a while ago I stopped using wordpress in multisite mode. It was too problematic for me not to be able to have a subdomain for each site so I switched to using multiple wordpress single site installs.

eauchat avatar Mar 20 '25 22:03 eauchat