-
Notifications
You must be signed in to change notification settings - Fork 14
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
Beginnings of multisite support #2
base: master
Are you sure you want to change the base?
Conversation
Wow! This is really awesome to see!!! I'm swamped between WPSessions and WordCamp Los Angeles right now, but I've made a note to read through your code as soon as possible. Thank you for submitting this! I've wanted to see true network support in UBP for a long time! |
Conflicts: readme.txt uploads-by-proxy.php
So there's a problem with sub-folder multi-site that happens with the default .htaccess that WP generates. I don't know if it is actually an Apache problem or a WP problem, but you can read more here: https://core.trac.wordpress.org/ticket/20746 I came up with a workaround and added the instructions to the readme. Hopefully smart(er) WP core contributors will come up with a better solution. With the workaround, it seems to work good on both sub-folder and sub-domain multi-site installs. My fork should be synced with the latest changes from your master as of 2/22/14. |
Hi @pdclark, just wanted to check in and see if you could merge this pull request. I'm going to submit another for a non-multisite issue fix, but realized this one was still in waiting :) |
I started looking at multisite support for this, at first it didn't seem promising b/c ms-files.php doesn't have any hooks available to plugins... Then I found this ticket: http://core.trac.wordpress.org/ticket/19235 and this article: http://halfelf.org/2012/dumping-ms-files/
So if I force my local system to use the new style multisite files by adding to wp-config.php:
define( 'UBP_SITEURL', 'http://example.com' );
define( 'UPLOADBLOGSDIR', 'wp-content/uploads/sites' );
and removing this rule from my .htaccess:
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
I could get uploads by proxy to retrieve the files from the live site and put them in the new wp-content/uploads/sites structure.
I also added a "UBP Site URL" setting to the site settings in wp-admin/network/ -> Sites -> All Sites -> Edit -> Settings Tab (very bottom). This will override the UBP_SITEURL define if present, incase someone wants to have a multisite setup where subsites point to completely unrelated live sites.
I haven't (yet) tested subdomains.