WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Architecture (11 posts)

  1. Zaaba
    Member
    Posted 10 years ago #

    Are there any plans at the moment for WP to be installed in a seperate folder instead of in the root folder? At the mom my root is quite clogged up :( so it would kinda neater I reckon. e.g. root/wordpress
    Wouldn't this also be better for when (if) WP will start to incorporate the ability to have multiple blogs per WP installation?

  2. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    You can put WordPress in any folder, not just the root one. Our development blog amoung many others is an example.

  3. JoshuaClinard
    Member
    Posted 10 years ago #

    That's good news, becuse b2 required a hack to get ALL the features to work properly, because some of the paths would be incorrect. Were the paths changed? What if the news.php file is in the root, but the wp files are not? Will it still work?

  4. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Well the WP files should be wherever your blog is.

  5. JoshuaClinard
    Member
    Posted 10 years ago #

    So it will still require a hack, to have your index file in your root folder, where it should be in the first place?

  6. valentine
    Member
    Posted 10 years ago #

    that's pretty much what i discovered. it took me a while to get wordpress working properly in a separate folder, but i did it. i'd love to see wordpress designed for installation in a wordpress subfolder in the future, instead of keeping all those files in the root of the blog.

  7. Lisa
    Member
    Posted 10 years ago #

    Yeah, definitely. There's just too many files for those who run our blog in our root and have other folders and files there too.
    How much did you have to edit to get it work, Valentine? Perhaps you could post some instructions if you have the time since I think a lot of people (based on the threads I've seen) are interested in this.

  8. valentine
    Member
    Posted 10 years ago #

    if i had any idea what i actually did to get it working, i would most definitely share. basically i went through a lot of trial and error to see what worked and what didn't, what needed to be changed and what could be left alone. at one point i even messed something up enough that wordpress tried to divide by zero. oops! fixed that one right away.
    halfway through i ended up making my own variable in the config file called "truesite," i think, that had the real url to my blog and left the "siteurl" variable to be the url for wordpress. ie:
    truesite - http://mydomain.com/blog
    siteurl - http://mydomain.com/blog/wordpress
    whether or not this was a smart idea is questionable, but it did work and it did make things easier for me, simply by using the truesite variable where i needed to reference the blog's index.php. just to clarify, this probably was not the greatest idea in the world and i don't really recommend it to anyone else, unless you know what you're doing and think it's actually a good idea. i have very little experience with php other than b2 and now wordpress, so i was just using bits and pieces of what i know of programming to pull this off.
    i ended up changing a few things in a couple files; if i had any idea which ones they were, i would share. (i'm currently at work, taking a quick break.) really, i htink the best route would be for wordpress to be designed for installation in a subfolder from the beginning, instead of requiring hacks to make it work. the only reason i kept working at it and ended up at the solution i did was because i was quite determined to make it work any way i could, no matter how long the answer eluded me.
    my apologies, this is getting long. to get to the point: i don't know how i did it, only that it works. trial and error was my main method. hopefully in the future wordpress will be structured differently to allow for an easy subfolder configuration.

  9. TigerDE2
    Member
    Posted 10 years ago #

    I think if you edit your config file like
    $siteurl = 'http://'.$SERVER_NAME.'/sub/folder'; // Double check this, it's very important.
    $blogfilename = '../../sub/index.php' // or similar, try how many ../ you need, I would need 2
    it works.
    Only one redirect inside /wp-admin/index.php hadn't got the right path variable in front, and of course, you'll have to specify the correct path in your templates, as well... :)

  10. witchy
    Member
    Posted 10 years ago #

    so. after reading this, (and sorry for being so thick headed, but I need to have it spelled out for me) I can't just do a ' php include index ' from one directory to another?

  11. crackhead_jnz
    Member
    Posted 10 years ago #

    Why don't you make an include out of the wp.php file on the main page, and keep wordpress in it's seperate folder?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.