-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL issues on multisite #250
Comments
Btw, I'm including this info for someone who might end up here before your fixes are merged! I'm not suggesting this as a better solution or smth, your PR is awesome. |
Adding
To network_site_url function in link-template.php fixes it, but that's obviously not a correct fix. For now what I did was use the network_site_url filter to fix the urls. |
@sandrodz do you have your example .htaccess and nginx configs above in a gist or webpage so that they can be easily cut and pasted? |
@henscu no, but I can provide them. I also have a very nice docker dev env for wp and laravel with respective nginx configs - I'm planning to share it soon - it contains correct configs for multisite too. |
@sandrodz that would be great. I'm also working on getting my Docker env going, and am looking at the entire workflow from initial generation of WP database & code in Vagrant using Trellis, then migrating the db from inside Vagrant to use with Docker and merging upstream changes from Trellis etc... I'm not sure if anyone else has done this yet... |
From #251:
|
Hi all, I'm just going to leave this link here: https://github.com/felixarntz/multisite-fixes/blob/master/mu-plugins/wpms-site-url-fixer.php It's not mine, but it works well for me. I've tried many times to get multisite (subdomain) + bedrock working on a managed WP host (I'm with Kinsta) with no luck, but after another 6 hours of tearing my hair out today, I stumbled across this. Simply add it as an mu-plugin and define a constant in application.php for
and that's it. |
@smarterdigitalltd I specifically wrote this with Bedrock in mind :) |
Hey everyone! I've finally had a chance to take a look at this ticket. Please check out https://github.com/roots/multisite-url-fixer (install this as an mu-plugin, run Thanks again to @felixarntz for the og code (hi Felix!!). |
Very happy to read that this is now in official hands - thanks @JulienMelissas! :) |
Im getting
with
Whenever I activate that plugin and use that config. Is there a guided tutorial somewhere to get multisite up n running with bedrock? |
@JulienMelissas The new plugin seems to be working for me. One question though… in @felixarntz's original repo, it says:
Does this still apply? Thanks in advance. |
@greatislander, we're working on that over here: roots/multisite-url-fixer#2 Would you be willing to test? Would be a great help for me and maybe I could then close out these issues and finish this all up! Thanks. |
@JulienMelissas will do 👍 |
Thanks for the feedback and testing @greatislander! I'm going to close this now with the solution of people using https://github.com/roots/multisite-url-fixer. Bedrock Docs are coming. |
@Preen - regarding your issue, can you please make a thread on Discourse and maybe someone can help you there? I think your issue might lie in |
I have recently set up my first multisite with Bedrock, and I have encountered several issues where the URLs are not correct. After some investigation, I figured that the issues are a result of a problem in WordPress Core - in some places it does not honor the site URL setting. This is no problem with a regular WP install, but when WordPress is installed in a subdirectory as it is in Bedrock, the site URL is different from the home URL.
The most significant problem is that some areas in the network admin will direct me to /wp-admin instead of /wp/wp-admin, for example when you're on the My Sites section and click on "Edit Site".
To be clear, this is not a Bedrock bug, but I think it would be great if Bedrock provided a fix for it, so that other people do not run into this problem. While there are ways to workaround this with nginx / htaccess rewrites, I'd prefer to actually fix it from the code site. As of now, I have fixed these issues on my site, so I'll create a pull-request with my approach.
Btw I also created a ticket on Core Trac, the first responses told me that WP doesn't officially support this - so not sure whether there will be a Core fix soon.
The text was updated successfully, but these errors were encountered: