'How to change buddypress default 'members' slug to something else?

Searched a lot about how to change the default buddypress default 'members' slug to something else? So that my URL will look like: example.com/mmm/abcd instead of example.com/members/abcd

So far I found is, putting this line in wp-config.php file.

define( ‘BP_MEMBERS_SLUG’, ‘mmm’ );

I did, but not working. Is there any idea, please?



Solution 1:[1]

When BuddyPress is activated, it creates several pages, ordinary WordPress pages. One of them is Members. You can go to admin area, and edit Members page slug to whatever you need. BuddyPress will honor this slug and use it in members profile URLs.

Solution 2:[2]

Many thanks Slava for the answer. I just want to add that if you want to have a vanity or custom URL for members without the "members" slug, all you need is to add the following in wp-config.php. No need to add codes in the theme files or create custom BP page.

define( 'BP_ENABLE_ROOT_PROFILES', true );

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Slava Abakumov
Solution 2