How to Change the WordPress Author or User Page Link Address

WordPress author or user pages are a great way to showcase an individual’s profile and content on your website. By default, WordPress creates URLs for these pages using the username, like https://yourwebsite.com/author/username/. While functional, the default structure might not align with your branding or privacy needs.

In this guide, we’ll explore how to change WordPress author or user page link addresses to make them more professional, personalized, or secure.


Why Change the Author or User Page Link Address?

  1. Branding Consistency
    • A custom URL structure can match your site’s style and enhance the professional appearance of your author pages.
  2. SEO Benefits
    • Tailored URLs can include relevant keywords, making them more search-engine friendly.
  3. User Privacy
    • Default URLs often expose usernames, which could pose a security risk. Custom URLs prevent revealing sensitive information.
  4. Improved User Experience
    • Clean and intuitive URLs are easier to remember and share.

Methods to Change WordPress Author or User Page Link Addresses

There are several ways to modify author URLs in WordPress. These methods range from using plugins to coding solutions, depending on your comfort level with WordPress.


1. Using a Plugin to Change Author URLs

Plugins are the easiest and safest way to customize WordPress without delving into code.

Recommended Plugin: Edit Author Slug

The Edit Author Slug plugin is a popular and user-friendly option for modifying author URLs.

Steps to Use Edit Author Slug:

  1. Install and Activate the Plugin:
    • Navigate to your WordPress dashboard.
    • Go to Plugins > Add New and search for “Edit Author Slug.”
    • Install and activate the plugin.
  2. Configure Plugin Settings:
    • Go to Users > All Users in the WordPress dashboard.
    • Select the user whose URL you want to change.
    • Scroll down to the Edit Author Slug section in their profile.
    • Enter a new slug (e.g., “john-doe” instead of “username”).
  3. Customize Global Author Base:
    • Navigate to Settings > Edit Author Slug to change the global base URL for all author pages.
    • For example, replace /author/ with /profile/ or /team/.
  4. Save Changes:
    • Save the settings, and the new author URLs will take effect immediately.

2. Using Permalink Settings

WordPress has a built-in permalink structure tool, but it does not allow direct customization of author URLs. However, you can change the default structure with a bit of coding.


3. Changing Author URLs via .htaccess (Manual Method)

For advanced users comfortable with editing files, you can redirect or rewrite author URLs using the .htaccess file.

Steps to Rewrite Author URLs with .htaccess:

  1. Backup Your Website:
    • Before editing core files, create a backup to avoid data loss.
  2. Access the .htaccess File:
    • Use an FTP client or hosting file manager to locate the .htaccess file in your site’s root directory.
  3. Add Rewrite Rules:
    Insert the following code into the .htaccess file:
    RewriteRule ^profile/(.*)$ /author/$1 [L,R=301]
    • Replace /profile/ with your desired URL structure.
  4. Save Changes:
    • Save the file and test the new author URLs.

This method is ideal for simple URL redirection but requires precise implementation to avoid breaking your site.


4. Customizing Author URLs with Functions.php

If you’re comfortable working with code, you can modify the URL structure directly via the functions.php file in your theme.

Steps to Change Author URLs via functions.php:

  1. Backup Your Website:
    • Always back up your site before making changes to code.
  2. Edit the functions.php File:
    • Go to Appearance > Theme Editor in your WordPress dashboard.
    • Open the functions.php file of your active theme.
  3. Add Custom Code:
    Insert the following code snippet to change the author base:
    function custom_author_base() {
    global $wp_rewrite;
    $wp_rewrite->author_base = 'profile'; // Replace 'profile' with your desired base
    $wp_rewrite->flush_rules();
    }
    add_action('init', 'custom_author_base');
  4. Save Changes:
    • Save the file and test your new author URLs.

5. Redirecting Old Author URLs

After changing author URLs, ensure that old links still work by setting up redirects. This step is crucial to maintain SEO value and prevent broken links.

Using a Plugin:

  • Install and activate the Redirection plugin.
  • Navigate to Tools > Redirection and add a redirect rule:
    • Source URL: /author/username/
    • Target URL: /profile/username/
  • Save the rule to ensure seamless redirection.

Using .htaccess:

Alternatively, you can add redirection rules to the .htaccess file:

Redirect 301 /author/username/ /profile/username/

6. Bulk Customization of Author URLs

If you have a large site with multiple authors, changing URLs manually can be time-consuming. In this case, consider using a bulk editing tool or custom script.

Example Custom Script:

You can write a script to loop through all users and update their slugs programmatically.

function update_all_author_slugs() {
$users = get_users();
foreach ($users as $user) {
wp_update_user([
'ID' => $user->ID,
'user_nicename' => sanitize_title($user->display_name)
]);
}
}
add_action('init', 'update_all_author_slugs');
  • This script updates all author slugs to use their display names in a sanitized format.

Troubleshooting Common Issues

  1. URLs Not Changing After Updates:
    • Ensure you flush the rewrite rules by visiting Settings > Permalinks and clicking “Save Changes.”
  2. Broken Links or 404 Errors:
    • Double-check redirects and test the new URLs for accuracy.
  3. Plugin Conflicts:
    • Disable other plugins that might override or interfere with permalink settings.
  4. Slow Page Loading:
    • If using redirects, ensure they are efficient and avoid multiple chains.

Customizing the author or user page URLs in WordPress is a valuable way to enhance branding, improve SEO, and protect user privacy. Whether you choose a plugin for ease or manual coding for flexibility, the process is straightforward with the right approach.

By following this guide, you can create cleaner, more personalized URLs that align with your website’s goals and aesthetics. Always remember to test your changes and set up redirects to ensure a seamless user experience.