The MU forums have moved to WordPress.org

Creating blog when folder already exists (18 posts)

  1. cy_borg5
    Member
    Posted 14 years ago #

    I've asked a similar question to this one before so I'm pretty sure the answer to this one is "no" but I'll try this variant again in desperate hopes there is a workaround.

    I've got an existing site with multiple single user WordPress blogs and I'm trying to convert them all to a MU installation. I've got wpmu successfully installed in the root of http://mydomain.com/ and I converted an old WordPress single-user blog into that root blog on MU. I've created several other blogs such as http://mydomain.com/music/ or http://mydomain.com/tv/ which are brand-new blogs. However I had an existing single-user WP blog at http://mydomain.com/movies/ but I can not create any wpmu blog on the "movies" folder because that folder exists. I have to have that folder exist even though there is no index.php and no index.htm nor index.html in it. The reason I need that folder is I have static content in http://mydomain.com/movies/scifi/ and http://mydomain.com/movies/comedy/ and http://mydomain.com/movies/drama/ all of those subfolders of "movies" are not blogs but there are pages that I need to keep as regular static HTML pages.

    So it seems that if I want to have a blog on /movies/ then I'm going to have to move all of those other subfolders of movies to something like /othermovies/ and then physically delete the /movies/ which is going to be a pain because it's going to break all sorts of links throughout the site.

    I tried putting a index.php in the /movies/ folder and editing the "require" statement in that file to read...
    require('http://mydomain.org/wp-blog-header.php');
    to no avail...

    Is there something that I can put in http://mydomain.com/movies/index.php that will allow me to have a movies blog?

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Can't you roll in the static content in http://mydomain.com/movies/scifi/ and http://mydomain.com/movies/comedy/ and http://mydomain.com/movies/drama/ inot Pages on the WPMU movies blog?

    Tha;ts the only way I can see how.

  3. almostdaniel
    Member
    Posted 14 years ago #

    The reason we need this feature is that a "new blog" in a subfolder means we get a new left-hand navigation. Using the example above, it's possible that /movies/comedy needs to be its own blog because it has a complex or deep page structure that would get lost or become cumbersome if it was 1-2 levels into the /movies blog.

    Another reason is if you need to explicitly separate who can be an editor of /movies and /movies/comedy. For example, we group our degree sites by degree type (e.g., "/ba, /bs, /phd"). That way we can have /ba/engl, and /phd/engl as two separate sites managed by two different groups of people and with two different navigation lists. Because the person that runs the PhD site is likely different than the person that runs the BA site.

    But I can see how this would get to be complex. Because wpmu would have to manage more redirects. E.g., it would have to know that it should send all requests for /movies/* to the /movies blog EXCEPT for those that start with /movies/comedy, and so on.

    I'm currently trying to think of a way to put a blog-within-a-blog by marking a certain page as a new "blog parent" so that when my theme displays pages underneath that, it "resets" the left-hand nav. More of a layout-solution than a technical solution. That still doesn't fix the second issue of different editor sets, though.

  4. andrea_r
    Moderator
    Posted 14 years ago #

    All I can think of is multiple sites. Tricky setup, but possibly do-able.

    http://wpmututorials.com/how-to/blog-categories/

  5. cy_borg5
    Member
    Posted 14 years ago #

    Eventually many of those static pages can indeed be turned into WordPress pages but some of them are applications such as themselves. Although I use folder names such as /movies,/TV,/comedy etc. in my example. Those aren't the folder names I'm really using. This is actually a church website http://www.stgabrielindy.org/school/ where the school folder is our parish school. I have a calendar application installed in /school/calendar/ that is going to be difficult to move. There's also a photo gallery in /pool/gallery/ that I can eventually turn into a photo gallery blog but for now it's got several years of photos in a little JavaScript application I created to produce slideshows of images online. Moving all of that stuff is going to be very time-consuming.

    While it would be nice to be able to put a WordPress blog anywhere as the second reply suggested i.e. /mainblog/subblog/ I already knew that wasn't possible under the current system. In fact I had to deal with that because there was a main school blog and then I tried to create a blog for each classroom such as /school/grade1/, /school/grade2/ etc. but I decided that I can live with having a classroom blogs be connected to be church website as a whole rather than the school folder.

    Under single user WordPress if you don't do pretty permalinks then basically everything is in a real-life folder with no redirection. But for some reason WordPress MU is designed in such a way that basically the entire system is just one huge 404 page system. If the goal of the MU design people is to do as much as they can to minimize the differences between a single user and multiuser systems then they need to get to a system where at least the root of every blog has some sort of index.php.

  6. andrea_r
    Moderator
    Posted 14 years ago #

    But each blog is virtual - there are no folders. They all share exactly the same files.

  7. cy_borg5
    Member
    Posted 14 years ago #

    I understand that but they're still ought to be a way to place a blog at any URL that you want any number of folders nested deep and to be able to place one in a non-virtual folder if necessary.

  8. almostdaniel
    Member
    Posted 14 years ago #

    agreed, cy. This would take wpmu to the next level for people using it to be able to manage a web space instead of only hosting blogs for folks. Which I understand is not wpmu's or wordpress's primary focus. But perhaps as a plugin ...

  9. almostdaniel
    Member
    Posted 14 years ago #

    Hopefully bumping this. Has anything (plugin or core) been done related to having a complex URL for a single sub-blog?

    What all this discussion boils down to is being able to install a blog at domain.com/any/url/path/blogname instead of only domain.com/blogname.

    Anyone know of a plugin that helps manage this? I haven't looked through the release notes on core yet, mainly because it didn't seem that the core devs were interested.

  10. andrea_r
    Moderator
    Posted 14 years ago #

    It's definitely an edge case. Haven;t seen a plugin at all to do this.

  11. almostdaniel
    Member
    Posted 14 years ago #

    I wish I could communicate how I don't think this is an edge case, but a way to augment WPMU into something closer to a "site-wide" content management system for a single enterprise, instead of only a stellar multi-blog platform. We want to make WordPress the backbone of our university content management strategy. And we have, so far, with over 300 individual WordPress installs. It's a sitewide admin's nightmare, so WPMU was our shining hope.

    I agree that if the vision is only ever going to be blog hosting (flat namespace) and not a more traditional "site" hosting tool (deep namespace), then I suppose it is an edge case. But being able to create a deep namespace seems like a core piece of functionality, to me.

    This simple change could explode WPMU into something so much more, similar in coolness as what the introduction of WPMU did to regular WordPress in the first place. ;-)

    In a hypothetical, if you were going to try and manage a deep namespace for sites, where would you start?

    As always, thank you.

  12. DeannaS
    Member
    Posted 14 years ago #

    So, basically, what you're saying is that you don't really care where the main MU install is, but that you want to be able to control where it LOOKS like blog URLS are?

    So, main install is at:
    blogs.domain.com

    WPMU thinks a blog is at:
    blogs.domain.com/mysubblog

    You want visitors to think blog is at:
    http://www.domain.com/department/blog

    Is that accurate?

    I wonder if it could be done with some nifty apache rewrite stuff (outside of WPMU entirely...)

  13. almostdaniel
    Member
    Posted 14 years ago #

    That's one way to attack it, DeannaS. To make sure I understand what you're saying, I could install my wpmu on a "private" subdomain (your blogs.domain.com) that I wouldn't publish anywhere publicly. Then, I'd manage access to my flat namespace outside of WPMU with apache rewrite on a "public" subdomain, which would represent the deep namespace.

    That would definitely work. Only hiccup I can see is I would need to build the "deep" namespace into the WPMU blog names. For example:

    private: blogs.domain.com/department1blog
    public: http://www.domain.com/department1/blog

    private: blogs.domain.com/department2blog
    public: http://www.domain.com/department2/blog

    For that matter, I could just use an id number for the private URL:

    private: blogs.domain.com/000000
    public: http://www.domain.com/department1

    private: blogs.domain.com/000001
    public: http://www.domain.com/department1/blog/

    I think your idea has promise, DeannaS. Doesn't this sound like something that WPMU could be coded to do internally? It's really just a matter of managing the mapping/rewrite. The only complexity I see is when you have two URLs that share the same root (www.domain.com/department1/single-page-in-this-blog and http://www.domain.com/department1/subblog). You don't want WPMU trying to find a page named "subblog" inside the department1 blog. So you'd have to make sure a URL doesn't match any one of your blog-mappings before you checked to see if it matched a page/post underneath an individual blog.

  14. almostdaniel
    Member
    Posted 14 years ago #

    And an unfortunate side-effect of this kind of feature would mean that if I had two blogs that shared the same root-mapping, one for the root, and one for a sub-blog, I couldn't ever access a page in the root blog that had the same stub as the name of the sub-blog. For example:

    private: blogs.domain.com/000000
    public: http://www.domain.com/department1

    private: blogs.domain.com/000001
    public: http://www.domain.com/department1/subblog

    If on blog 000000 I created a page called "subblog", it would never be accessible because I would always map to blog 000001. So WPMU would have to throw an error when a page creation would cause this situation and warn people that the stub "subblog" was "in-use". Or it could do it's normal way of handling that and add a "2" to the end of the stub. :-)

  15. wpmuguru
    Member
    Posted 14 years ago #

    When you create the page on the main blog, the subblog home url is no longer accessible.

    MU checks to see if the request is for a page on the main blog before looking up subblogs.

  16. almostdaniel
    Member
    Posted 14 years ago #

    Interesting. I never noticed that because I don't use a main blog for actual content on my site yet. We'd need the exact opposite behavior for a "deep" namespace architecture.

  17. reallyordinary
    Member
    Posted 14 years ago #

    Just found this thread - I'd also love to see this functionality.

    I have a client running a MU site that wants all secondary sites on it to have a subfolder in the URL. So their main site is at mainsite.com and then all other sites would be in mainsite.com/other/othersite1, mainsite.com/other/othersite2, etc.

    Trying to find a way to hack it together.

    Although actually, come to think of it... in their case it would probably make more sense to just do another MU installation in that actual physical subfolder.

  18. andrea_r
    Moderator
    Posted 14 years ago #

    In their case, yes it would make sense to do that.

About this Topic

  • Started 14 years ago by cy_borg5
  • Latest reply from andrea_r