Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can’t activate BuddyPress

  • @ezbizniz

    Participant

    When I try to network activate the BuddyPress 1.2.5.2 plugin, the plugin page starts to reload for several minutes until I get a blank, white screen. It seems like it times out. To get back to the /wp-admin/ section I have to remove the plugin files from the FTP-server.

    I have about 50,000 blogs and users on my blog network.
    Could that be the cause?
    How can I get around this problem?

Viewing 9 replies - 1 through 9 (of 9 total)
  • @pisanojm

    Participant

    I’m just wondering how long it would take a server to integrate 50,000 blogs with BuddyPress… sometime I would imagine… It will be interesting to find out what your problem is as more people reply to your thread.

    @hnla

    Participant

    50,000 users and blogs, really!? that’s certainly going to put BP through it’s paces. What’s your PHP script memory limit set to out of interest.

    @djpaul

    Keymaster

    BP registers all existing blogs on a multisite install when the plugin’s activated — it’s probably using all the memory.

    @ezbizniz

    Participant

    These are my resource limits in php.ini:
    max_execution_time = 30
    max_input_time = 120
    memory_limit = 256M

    @ezbizniz

    Participant

    Any idea what I should set the memory_limit to?

    @hnla

    Participant

    256 is pretty big, what you set it to depends on what is available, and also bear in mind what the limit is actually put in place for which is to prevent a script crashing your server, if you set the limit to all available memory you would be in trouble if a badly written script looped and started to use up all your system memory. If you can try increasing the memory allocation in chunks testing each time to see if that is the problem and at what point or extra amount everything settles down and works, then add a bit of headroom.

    @hnla

    Participant

    Thinking about it you may want to increase the max_execution_time to perhaps double? never needed to adjust this figure myself but with 50,000 blogs to cycle through that execution time might be too short? In fact I would try adjusting that before the mem limit to see if it helps.

    @ezbizniz

    Participant

    Thanks for your suggestions hnla, I’ll try them.

    @ezbizniz

    Participant

    I disabled the default BP function to add all blogs to BP DB table with `add_site_option(‘bp-blogs-first-install’, 1);`

    Instead I do my own BP blogs installation for each blog during upgrade:

    `function bp_blogs_install_after_multisite_upgrade($blog_id) {
    echo(‘Blog ID ‘ . $blog_id . ‘:
    ‘);
    if(!get_blog_option($blog_id, ‘bp-blog-recorded’)) {
    $users = get_users_of_blog( $blog_id );

    if ( $users ) {
    foreach ( (array)$users as $user ) {
    $role = unserialize( $user->meta_value );

    if ( !isset( $role ) )
    bp_blogs_record_blog( $blog_id, $user->user_id, true );
    }

    add_blog_option($blog_id, ‘bp-blog-recorded’, ‘true’);
    echo(‘Blog ID ‘ . $blog_id . ‘ added to BuddyPress database.
    ‘);
    }
    } else {
    echo(‘Blog ID ‘ . $blog_id . ‘ already in BuddyPress.
    ‘);
    }
    }

    add_site_option(‘bp-blogs-first-install’, 1);
    add_action(‘wpmu_upgrade_site’, ‘bp_blogs_install_after_multisite_upgrade’);
    `

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can’t activate BuddyPress’ is closed to new replies.
Skip to toolbar