Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subfolder now Root .com Folder


  • Tmort
    Participant

    @tmort

    I’m using wordpress single user, buddypress 1.2.1.

    I built my entire buddypress site in a subfolder of my site (OfficialManCard.com/omc). I then took it live by leaving the files in place, and using WordPress’ files vs website location function in Settings-Gen. More info on that:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Now, unfortunately, when I do anything BP related my sub directory still appears: http://officialmancard.com/omc/members/tmort

    I need to get rid of the sub directory omc. Its the beginning of our BP side and I can still go to the database and make major changes without breaking anything. Is there a “bp site URL” table or something that I am missing?

Viewing 7 replies - 1 through 7 (of 7 total)

  • Tmort
    Participant

    @tmort

    Can anyone help with this?


    Brajesh Singh
    Participant

    @sbrajesh

    Perhaps this is because you are leaving the sources in the sub directory.

    An easy solution will be

    1. export the database using PhpMyadmin

    2.Do a search fro “OfficialManCard.com/omc” and replace it with “OfficialManCard.com”

    3. Move the whole sub directory to root of site.

    4. Drop the tables from the database

    5.Import the modified database tables to the database

    6. Login to wordpress and re save your permalink.

    and Hopefully everything should work.

    I will advise to do a test on local server/system before doing this sort of thing on server.


    Tmort
    Participant

    @tmort

    Well I just tested that out, and it didn’t work. Its like theres a database entry exclusive to buddypress that says “You live at domain.com/folder”. I’m not sure where or why.

    I’d like to ask the community: Does buddypress interact well with wordpress’ feature where the core files live in a folder of your domain? Maybe that is my issue?

    Thanks for the help!


    Gianfranco
    Participant

    @gian-ava

    Tmort, you need to put this in your” functions.php” file (in the theme or child theme directory) or in “bp-custom.php” (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');

    Let me know if that did the trick.

    Credits for the code goes to r-a-y, who wrote it for me.


    Tmort
    Participant

    @tmort

    I just tried that, and it doesn’t seem to be working. All BP-related links (the navigation bar, after I login it takes me to the broken page, etc) are still pointing to my domain.com/folder. It feels like this should have worked.

    Is there something I’m possibly doing wrong? I’ve posted my functions.php here: http://pastebin.com/DLGqg7PW

    Its in my child theme, and just for good measure I’ve placed it at the top so nothing is conflicting with it. Gian-ava and R-a-y, thanks so much for your help with this. Its a gigantic issue on my site and I need to fix it.


    Tmort
    Participant

    @tmort

    Hate to be a nag, but my users are screaming for blood. Anyone know why the script gian-ava gave me didn’t work? I don’t know if bribery works (or is allowed) but I owe whomever can help their Man Card (see my site to understand).

    Thanks for any and all help!


    r-a-y
    Keymaster

    @r-a-y

    Try putting the code in wp-content/plugins/bp-custom.php.

    I should add that this code is kind of a hack until BP adds some functionality to detect WP setups in subdirectories.

    Also just wanted to add that this issue could already be fixed in BP 1.3 trunk due to the way BP now uses actual wordpress pages instead of a catch URI check.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Subfolder now Root .com Folder’ is closed to new replies.
Skip to toolbar