Skip to:
Content
Pages
Categories
Search
Top
Bottom

change root directory

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am in the process of doing something similar – I am copying all my files to the root, then plan on changing the setting in the General–>Settings area to reference the root location.


    Gianfranco
    Participant

    @gian-ava

    You don’t need to put everything to the root, if you wish to have teh installation in a subfolder.

    What you need is this code in “bp-custom.php”, which goes in the plugins directory:

    // Getting rid of the subfolder in URLs/permalinks
    function my_bp_override_core_domain() {
    $domain = get_bloginfo('url');
    return $domain;
    }
    add_filter('bp_core_get_root_domain','my_bp_override_core_domain');

    Credits for this go to r-a-y, who sort it out for me.

    With this, your permalinks structure should be without the subfolder.

    Still, I think I’m going to write something about this whole topic.


    5991475
    Inactive

    I know that’s possible with the normal version of wordpress, but this is WordPress MU (2.9.2) and I can’t find any reference to the root location in the General–>Settings area…


    5991475
    Inactive

    oh, thanks! I’ll try that


    5991475
    Inactive

    gian-ava: can’t find a file called bp-custom.php anywhere… am i supposed to create one and put in the plugins/buddypress/ ?


    Gianfranco
    Participant

    @gian-ava

    Actully, I didn’t pay attention on the fact that you are on WPMU, for which I got no experience so far.

    Anyway, if I am not wrong, you can put the code in “functions.php” in your theme or child theme, or have a file (create one) called “bp-custom.php” and put that in the plugins directory, not “buddypress” directory, just in the “plugins” directory.

    That will act like a plugin.

    Try and let me know.


    5991475
    Inactive

    sorry, it didn’t work.. i put the code in the functions.php-file. got errors like “Call to undefined function add_filter()”

    Did you enclose it into php tags?

    <?php …?>

    @kallemagnusson, I originally had the same issue as you. I always install WP in a sub folder and BP does not seem to cope too well with it. The fix that @gian-ava and @r-a-y recommended worked only on some of the links. Since I am very new to BuddyPress and this is a brand new site, I ended up moving the lot up one level so WP is now in the root folder. This will do for a start (path of least resistance) :)

    Did you find a better solution?


    3sixty
    Participant

    @3sixty

    r-a-y’s redirection trick doesn’t work for me in WPMU. Manually changing the location is going to look something like this:

    HOW TO MOVE WPMU/BP TO A NEW LOCATION

    1. change url in blog “edit” admin menu

    2. rename bp folder (or move files to root)

    3. edit wp-config … fix 2 instances

    4. open phpmyadmin … search and replace to fix many instances, particularly in the activity stream. Because you have to do this one row at a time (no MySQL global search and replace), it will take quite a while

    5. edit .htaccess RewriteBase

    AKA a lot of work.

    There must be an .htaccess trick for this??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘change root directory’ is closed to new replies.
Skip to toolbar