We’re very excited to announce our first “feature as a plugin” hosted on the official WordPress.org Plugin directory is now available for download. Today marks another important date into our project’s history: BuddyPress is progressively moving towards using the WordPress Rewrite API to create, manage, parse and customize every URL generated by the plugin.

The challenge

We are fully aware doing this move is a HUGE change. We’ve been thinking about it since April 25, 2013. For 9 years, we’ve been postponing the issue for many good reasons. The most important one is: many plugin authors are building features on top of the BuddyPress plugin & they got used to our Legacy URL parser: changing habits can be challenging.

That’s why we chose the “feature as a plugin” way to progress and achieve this important move for end users & us all. The BP Rewrites project started on August 13, 2021. It used to be only available on our GitHub place as a start and we quickly understood, due to the lack of contributions, we needed to make it easier for everyone interested in BuddyPress to get involved. It’s now directly available from the Plugins/Add new menu of your WordPress dashboard.

There are around 1,000 BuddyPress plugins hosted on the official WordPress.org Plugin directory and we really need your contribution (yes even you who’s reading these lines) to help us make sure most of them will enjoy this great change.

We believe the BuddyPress community (the BuddyPress team, the BuddyPress contributors, the BuddyPress end users, the BuddyPress plugin & theme developers) can meet this challenge if we all collaborate together:

  • End users can download, test and warn plugin & theme developers if they find the corresponding plugin or theme is not behaving the same with & without BP Rewrites.
  • Plugin & Theme developers can adapt their piece of art, thanks to the end users warnings. They can also suggest contributors to improve the existing backward compatibility already in place and of course contribute themselves to the BP Rewrites plugin.
  • Contributors can advise Plugin & Theme developers about how to adapt or code the needed BP Rewrites adjustments if necessary. They can also start documenting how to write BuddyPress plugins and themes to fully enjoy BP Rewrites.
  • The team, thanks to all above contributions, will be able to take the right decisions.

Our end goal is to merge this feature into BuddyPress core. It will require us energy and time so that it finally happens the best for everyone.

The benefits

Thanks to the BP Rewrites “feature as a plugin” you can already enjoy them 🙌.

  1. From a end user’s point of view: BuddyPress can run with or without pretty URL and if they chose pretty URL, they can customize every URL generated by BuddyPress to make them even more meaningful for their community site members (eg: use words of their native language).
  2. From a developer’s point of view: the BuddyPress way of creating, managing & parsing URL should be faster, more reliable, extensible, testable and fully compliant with WordPress best practices.

The risks

First, BP Rewrites is the way we chose to mitigate the risk of doing the BP Legacy URL Parser to the WP Rewrite API switch. The more we will be to test it, the more we’ll be able to eventually identify issues, fix them and improve the feature and the more reliable BuddyPress will be when the feature will be merged into its core.

But end users may also wonder if it’s risky to test BP Rewrites for their community site. There’s always a risk when we choose to activate a plugin on a WordPress site. It’s always important to take a few seconds to prevent data alteration by first backing up your site’s database & the /wp-content directory of your site. If things go wrong, you can simply use this backup to restore the previous state of your site. This precaution is not specific to the BP Rewrites plugin, you should always do so.

This being said, the BuddyPress team thinks the BP Rewrites is safe to test with BuddyPress 10.0 (or up). It’s easy to find back your community site the way it was by simply deactivating the plugin. The most serious damage that could happen is that you could lose the ability to edit the WordPress pages you defined as BuddyPress directory roots. In this case, you simply need to perform the page mapping once again from the “Pages” tab of the BuddyPress settings administration screen.

He who is not courageous enough to take risks will accomplish nothing in life.

Muhammad Ali

What BP Rewrites changes?

FYI, once activated, The BP Rewrites plugin is editing the post type of the existing BuddyPress pages in favor of the buddypress post type. That’s why you don’t see the BuddyPress pages anymore (as long as the BP Rewrites plugin is active) into the corresponding WordPress Administration edit screen. The BuddyPress Pages settings screen is replaced by a BuddyPress URLs settings screen.

The BuddyPress URLs settings screen

This last screen is where you define custom slugs for the URL generated by BuddyPress. These slugs are saved as a post meta of the corresponding BuddyPress post type/page item. Then the BP Rewrites plugin is taking benefit from the BuddyPress hooks/APIs to change BP Core’s behavior.

When you deactivate the plugin, buddypress post type’s items are switched back to regular pages and you get them back into the corresponding WordPress Administration edit screen. Post metas are still there in case you want to activate BP Rewrites back (this can happen when you’re testing another BuddyPress plugin). If you absolutely want to get rid of these post metas, you can delete the BuddyPress pages, create new ones and redo the page mapping from the BuddyPress Pages settings screen.

Many thanks to BP Rewrites first contributors

Adil Öztaşer (oztaser), Boone B Gorges (boonebgorges), Eric (eha1), Mathieu Viet (imath), r-a-y, shanebp.

Get BP Rewrites