Support » Requests and Feedback » Directory Structure

  • I was never really familiar with b2, but it seems the root directory is a tad bit messy. Is there any plans to clean this up in future WP releases? Making it more OO? Just curious.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t really think blog-ware is complex enough to require OO-level programming. Remember OO comes with a performance hit which is why you rarely see little projects done in Java or ASP.NET. On the other hand, I don’t really think OO has anything to do with how messy the file structure is and I think some clean-up should be done..namely
    b2[commnents][trackbacks][pingbacks]popup.php <- really need to be a seperate file?
    b2login.php <- can we merge this with b2edit.php?
    b2[rss][rss2][rdf].php <- can this be just b2rss.php using query string to seperate what format of syndication? mod_rewriting things back to clean URLs isn’t that hard to do you know, espcially when you have example.htaccess ready and you can stick the rewrite rules in there so newbies won’t have to deal with regEx.
    b2calendar.php <- why isn’t this in the template file?
    b2mail.php <- rarely publicly accessed, stick it in the include folder maybe?
    blog.header.php + b2config.php <- can probably be merged

    I ranted on this in an install thread because it gave me issues with my install, but I think best practices should dictate that WordPress should not be installed into the root directory. It makes far more sense to me to have it in a subdirectory [/wordpress/ for the uncreative] not only to keep the root directory fairly clean but also because that dir could be obfuscated and protected by robots.txt if need be to increase security a tiny bit.
    This would, of course, require some files to be in a “safe zone” — for one, the syndication files — but I think it’s worthwhile as a long-term goal.
    Or, well, a short-term one. I think it’s just a couple php variables away.

    One of the advantages of having a wp-admin directory is that you can htaccess protect it on a directory level if you so choose.

    Sure. But shouldn’t the whole totality of the WP install be similarly in a directory?

    Having a different location for index.php doesn’t require all that too much coding. But my site has these locations:
    /index.php (my index page)
    /m_blog.php (my archives page)
    /wordpress/ (my wordpress directory)
    So with each release, I have to edit at least these files (if I remember correctly):
    /wordpress/index.php
    /wordpress/wp-comments.php
    /wordpress/wp-includes/template-functions.php
    And then I include the /wordpress/index.php in my (edited) /index.php and /m_blog.php.
    This root directory “feature” that WordPress incorporated from b2 doesn’t make it very flexible.
    It’d be more flexible if WordPress allowed this out-of-the box, but it doesn’t. Yet?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Directory Structure’ is closed to new replies.