How to change routing of users...

Hello,
I have a wordpress multisite install.
I have buddypress installed on the main site as well as woocommerce and oter ressource intensive plugins.
What I would like is to creat a website for suscription//prompotion landing pages when users are typing my domain name.
I am also using beaver builder on all sites which is also ressource intense. Not as much as the other builders but stil 20 % of total P3 plugin scan. which amount for 2,5 seconds in total.
But I do not need beaver builder on the buddypress mainsite.
As well as I do not need other consuming plugins on the landing site, which will include all my selling pages, partnerships, customer garantees, FAQ, maybe suppport, etc....

What is the best and how to achieve it ?

Should I create a subsite for landing site ? Is this case, How can I route users to it when they search for my domain name ?

Best regards,
Hervé

  • Predrag Dubajic

    Hey @Hervé,

    Hope you're doing well today :slight_smile:

    I believe the best way would be to select your landing page/site as a main site and from there redirect to other sub-sites, and don't network activate plugins, rather activate them per sub-site that needs plugin in question.

    You can select main site by adding this in your wp-config.php file:

    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    Just change ID's to the sub-site in question.

    Would this solution work for you?

    Best regards,
    Predrag

  • Hervé

    Hello Pregag,
    I believe this would work just fine. Thanks.
    So buddypress would be on a subsite. I have alreday installed and configured buddypress with a lot of work i do not want to loos on the main site; Is the main site going,to turn into a subsite with this code ?
    Is Buddypress going to work as well being on a subsite ?
    Is there a way not to network activate buddypress ?
    Best regards,
    Hervé

  • Predrag Dubajic

    Hi Hervé,

    BuddyPress can be activated per sub-site as well, if you don't network activate it.

    Is you BP currently network activated or only on main site?

    Also, are you now looking to leave BP on your main site with your landing site, or you are looking to have it on different sub-site?

    You should be able to select different sub-site to run network activated BP by adding this to your wp-config.php and just as previous code change the ID:
    define( 'BP_ROOT_BLOG', 1 );

    Best regards,
    Predrag

  • Hervé

    Hi Predag,
    This Is great.
    Yes i would like to have buddypress on a subsite only. Right now it is network activated. I do not need network activation. What advantages if i want only one community ?
    but how can i only activate on the subsite ? Is buddypress available

    a subsite plugin list ?
    Last code u gave do i need to replace the 1 with id of the site buddypress ?
    Will m'y suscribers still have buddypress site in their site list ?
    Can they ne toutes on their profile once connection ?
    Best regards,
    Hervé

  • Hervé

    Predag,
    can you please state what exact lines I need to add ?
    It is confusing for me right now.
    I have activated only buddypress on the main site which is great.
    I can have buddypress on a subsite, but what is going to happen . will registered users have this subsite in their list of sites ?
    Will they be routed to the buddypress site once login, registration?
    Thanks in advance for your prompt answer.
    Best regards,
    Hervé

  • Predrag Dubajic

    Hi Hervé,

    define( 'BP_ROOT_BLOG', 1 ); should be added along with my previous code, not instead of it, this code will define which sub-site will be the root site for BuddyPress, just as your main site is now.

    To activate BP only on sub-site you will need to network deactivate it first and then go to sub-site in question and activate it there.
    Note that your users will not be transferred to that sub-site, as far as I know.
    But if you are going with the code to select sub-site that will use BP then you should still have all your users as it was before.
    I didn't test this so I would suggest making a full site backup before trying this out, or if you have staging site to test first that would be great.

    will registered users have this subsite in their list of sites ?

    If you are referring to the site list in admin bar, this should list only sites that user is admin on.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.