WordPress.org

Ready to get started?Download WordPress

Forums

Seperate Directory (11 posts)

  1. elvenjess
    Member
    Posted 10 years ago #

    I would like to have the wordpress files reside in a seperate directory from my root directory. How would I go about doing this?

  2. southerngal
    Member
    Posted 10 years ago #

    This isn't really a hack, more like a just regular question.
    I would just make a new directory under your root and put all the files there. :)

  3. elvenjess
    Member
    Posted 10 years ago #

    Ahh yes, but then I need to use includes to get it into my news page and that always give me a blank page instead of working.

  4. southerngal
    Member
    Posted 10 years ago #

    I have used it before in a separate directory and didn't need includes. You can put WP in many directories, have many blogs, just change the table names.

  5. gfmorris
    Member
    Posted 10 years ago #

    The problem comes, southerngal, if you want to have WP in a directory structure outside of your root [say, /wordpress/] but have the main page of your site [/index.php] be modified by WP.
    There are other threads complaining about this issue. :)

  6. elvenjess
    Member
    Posted 10 years ago #

    That is exactly what I want to do, gfmorris. :-)
    Sooo...
    Anybody got ideas/hacks? ;-)

  7. Anonymous
    Unregistered
    Posted 10 years ago #

    bigmoose: i have mine set, i have the index page outside, i have just changed these lines
    [/index.php]
    <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1;
    require_once('b2/blog.header.php');
    require($abspath.'wp-links/links.php');
    ?>
    <?php include('b2/b2comments.php'); ?>
    and all other includes with the /b2 dir
    --
    [/b2]
    and i also have the same index.php file inside the /b2 dir but with these settings
    <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1;
    require_once('blog.header.php');
    require($abspath.'wp-links/links.php');
    ?>
    <?php include('b2comments.php'); ?>
    --
    it seems to work fine so far, although i kinda now have 2 index pages, but the /b2/index.php only displays when i want to check archives/calendar/comments
    hope this helps!
    http://www.thekiwi.com if u want to see how it works

  8. bigmoose
    Member
    Posted 10 years ago #

    lol, i seem to be hyaving problems with this now since upgrading to .72! will fix her later

  9. elvenjess
    Member
    Posted 10 years ago #

    Well, please post it here if you get it going! :-D

  10. JoshuaClinard
    Member
    Posted 10 years ago #

    I've had this working with both b2 and wordpress. With wordpress, there are no file changes to make. All you have to do is modify the paths. WordPress is located in /news/, which is a directory inside the root, and index.php is located in root. The files below are the places I have changed the paths, both located in the index file. The first line also appears in archives.php. No other changes are needed.
    <?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ("news/blog.header.php"); ?>
    <?php include ("news/b2comments.php"); ?>

  11. elvenjess
    Member
    Posted 10 years ago #

    Been away for a while, has anyone come up with anything?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.