1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Change the WordPress Author URL Slug

How to Change the WordPress Author URL Slug

Introduction

WordPress uses the /author/ base in author archive URLs by default. While there is no built-in setting to modify this behavior, you can change the author URL slug by adding a small custom function to your active theme. This guide explains how to change the WordPress author URL slug safely using custom code.

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Go to Appearance > Theme Editor in your WordPress dashboard.
  2. Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, open Theme Functions (functions.php).
  4. Add the following code just before the closing PHP tag (?>):
function custom_author_base() {
    global $wp_rewrite;
    $wp_rewrite->author_base = 'members';
}
add_action( 'init', 'custom_author_base' );

Note: You may replace members with any slug you prefer.

  1. Click Update File to save the changes.

After adding this code, refresh your Permalinks by going to Settings > Permalinks and clicking Save Changes (no need to modify anything).

Example

Before adding the code:

https://example.dev/author/johndoe

After adding the code:

https://example.dev/members/johndoe

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: Do I need to refresh permalinks after adding the code?
A: Yes. Saving permalinks ensures the new author base is properly registered.

Q: Will this affect existing links?
A: Yes. Any old /author/ URLs will change. You may want to add redirects if the site is already live.

Q: Can I use any custom slug?
A: Yes, as long as the slug does not conflict with an existing page or custom post type.

Q: Does this work with BuddyBoss profiles?
A: This change applies to WordPress author archives only. BuddyBoss profile URLs are handled separately by the platform.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.