Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress on a Sub Directory Installed WP 2.9.1

  • Avatar of geoffm33
    geoffm33
    Participant

    @geoffm33

    I installed wordpress in a /wordpress sub-directory way back when. My .htaccess file is in the web root:

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    and it points to index.php in the same web root. Inside that index.php is:

    /** Loads the WordPress Environment and Template */

    require(‘./wordpress/wp-blog-header.php’);

    So it has always worked up until I installed BP 1.2-rc.

    BP works ok but the links at the top pointed to http://domain.com/wordpress/activity instead of http://domain.com/activity, etc.

    I hard coded those to work but all the social links (permalinks, profiles, groups, etc) all use the wordpress slug.

    Is there a way to rewrite site_url() to remove the wordpress slug or some other way?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • What are these set to in your wp-config.php?

    $base = ‘/’;

    define(‘DOMAIN_CURRENT_SITE’, ‘example.com’ );

    define(‘PATH_CURRENT_SITE’, ‘/’ );

    Avatar of geoffm33
    geoffm33
    Participant

    @geoffm33

    @djpaul I apologize I never included my WP version, I am on WP 2.9.1 and trying to run bp 1.2-rc. Those settings above are WPMU specific right?

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    You can just switch out <?php echo site_url() ?> in you header.php and register.php theme files with you blog url.

    ~ of course it’ll break running the same default bp theme under multiple ‘sites’ (subdomains/directories). This may be a good enhancement ticket so that ~ if ( bp_core_is_multisite() ); $current_site or site_url can run under the blog url and not the site_url

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    uhuhm… actually there are a lot of other places that site_url() is used, so that fix won’t work entirely.

    Avatar of geoffm33
    geoffm33
    Participant

    @geoffm33

    Thanks! Yeah I had fixed the links in header.php but they are indeed used throughout the site (profiles, groups, forums, etc).

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    OK ~ i was able to get the bp 1.2 default running perfectly using a subdirectory install with the current wp trunk I am using multi-site ~ with only one modification -

    Make sure your rewrite base for .htaccess is correct in your root and these are also correct.

    $base = '/~david/your_root/';

    define('DOMAIN_CURRENT_SITE', '127.0.0.1' );

    define('PATH_CURRENT_SITE', '/~david/your_root/' );

    ..and then add this to you wp-config pointing to your subdirectory wp-content

    define( 'WP_CONTENT_URL', 'http://127.0.0.1/~david/test/whatever_your_subdirectory_is/wp-content');

    Avatar of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    i’ll test non-multisite in a sec, but i believe it worked smoothly because

    bp_core_get_site_path is dependent on ‘if ( bp_core_is_multisite() ) $site_path = $current_site->path;’ in bp-core.php #1514

    don’t get me wrong, someone may come along with an easier solution for u to use.

    Avatar of geoffm33
    geoffm33
    Participant

    @geoffm33

    This is current WP trunk specific?

    I may just try to reload wordpress in the document root.

    Avatar of geoffm33
    geoffm33
    Participant

    @geoffm33

    OK, I was able to reload WordPress into the doc root to avoid my issue. The particular topic I suppose is resolved but this seems like it is still an issue for WP admins that installed into a subdir of their domain.

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

You must be logged in to reply to this topic.