why do the subdirectory blogs insist on accessing wp-content/, wp-includes/, etc. through their subdirectories? In other words, why does my home site access it as /wp-content/ and my “cvx” site access it as /cvx/wp-content/, when it’s the same data?
It’s virtual. there should be no physical directory anywhere.
IF you do have duplicates on your cdn, that’s an issue with whatever you used to do that. (I do not use one)
Thanks for the reply. And yes, I see that. But I don’t think that really addresses the question.
Why are they specified differently at all? What’s the logic there? Why couldn’t WP_CONTENT_URI be set to the same value, say “/wp-content”, regardless of which multisite subdirectory is being accessed? If WordPress anticipated that I would want my sites to access different WordPress installs, I could see it. But nothing I see in the code or documentation anticipates that. For instance, the default rewrite rules provided for Apache and NGINX explicitly strip off the subdirectory whenever a /wp- directory is requested.
As for the duplicates in my CDN, sure, I can fix that. One easy way to do that would be for me to explicitly force WP_CONTENT_URI, WP_INCLUDES_URI, etc. to be the same across all of my sites—strip out the subdirectories. And so I’m asking: is there a reason I’m missing why I shouldn’t do that?
I could also hack W3TC to map /wp-content, /cvx/wp-content, and /tfocs/wp-content to the same directory on my CDN. But that’s more cumbersome than overriding WP_CONTENT_URI so WordPress requests /wp-content in all three cases.
I certainly hope I do not sound ungrateful; I concede these may seem like the rantings of an obsessive-compulsive type 😛 WordPress is working brilliantly for me right now.
Why are they specified differently at all? What’s the logic there?
Badly coded themes and plugins, that ASSUME you’re always gonna have wp-content there. It’s a relative location, and the assumption most people make is that it’s there. So … CYA 🙂
Why are they specified differently at all? What’s the logic there?
Because users get hella confused. 😛
Look at wordpress.com – now go to any blog on their system and look at the source.
Can you imagine if half those references were all to the one address?
I’m just guessing here – this decision was made a looong time before I got here. I suspect its “because that’s the way it is”.
“because that’s the way it is”
Honestly, I can accept that answer 😛
So I went to a blog on WordPress.com, and looked at the source. I’m seeing clear evidence of both the customization of both the content/plugin/include locations, AND the use of a CDN for static content. Of course, these are either subdomain blogs or custom domains altogether, but still: it gives me confidence I’m not going to completely bork things if I tidy up a bit.
Thanks for all the help!
Yeah, there wp-config directives to change the entire wp-content location.