PhilippHeuer / wordpress-heroku

This project is a template for installing and running WordPress 5.x on Heroku.
MIT License
273 stars 316 forks source link

Setting up Multisite #25

Open amireds opened 6 years ago

amireds commented 6 years ago

Description of your issue

How do activate wordpress multisite.

I must say, great job for this solution Thanks

PhilippHeuer commented 6 years ago

It should work in theory, but i never tried it myself.

You need to set the following values in your .env to enable multisite:

WP_ALLOW_MULTISITE=true
WP_MULTISITE_MAIN_DOMAIN=example.com
amireds commented 6 years ago

Yeah, Figured it out later on. Thanks @PhilippHeuer. Something else have been battling with....

I set up the multisite as a sub-domain. But on creating a new site, The url keeps taking me to a 404 page. I think I have to set some form of CName or something... Any Cues??

PhilippHeuer commented 6 years ago

We would need some adjustments in the nginx configuration for the subdomains, but i don't think that heroku supports subdomains in the first place? https://github.com/PhilippHeuer/wordpress-heroku/blob/master/config/heroku/nginx.conf

Can you give an example how the url would look like, do you use a custom domain?

amireds commented 6 years ago

http://dsa.applyed.herokuapp.com

That's an example of the sub-domain I got. But on accessing it, it shows a 404 heroku page.

PhilippHeuer commented 6 years ago

I don't think that herokuapp subdomains support subdomains of their own, if you want to use multisite you need to use a custom domain and create a wildcard dns entry pointing to your heroku app.

I tried to search on the net for subsubdomains suppport natively on heroku, but i haven't found anything except the answer to use custom domains.

amireds commented 6 years ago

Hello @PhilippHeuer Having decided on taking to your advice, am having issues mapping my domain to the heroku app. And creating the wildcard dns entry. Please can you kindly suggest a link to a tutorial that can help me through?

After adding the domain and adding it in the env file. What am getting is too many redirects error