My immunity is strong.

How To Change WordPress Author URL Base and Slug

Learn How to Change WordPress Author URL Base and Slug
Learn How to Change WordPress Author URL Base and Slug

By default WordPress Author URL Slug of a particular user is your-site.com/author/slug/.

Here slug is actually your WordPress login username which posses a security risk and can be used by hackers to brut force your login page.

To avoid this I request you to change your Slug.

Slug is called user_nicename.

Change WordPress Author URL Slug (user_nicename)

  • Go to WordPress Database
  • Select wp_users table
  • Change field user_nicename to balloon (example)

Your new author url slug will become your-site.com/author/balloon/.

This way you will hide your real WordPress login username from the world and hackers.

Change WordPress Author URL Base

To change your-site.com/author/balloon/ to your-site.com/profile/balloon/

Stop the not so good habit of putting custom code snippets in functions.php file.

Follow Good Habit and place the below code in WordPress Blog Specific Plugin.

function change_author_base() {
global $wp_rewrite;
$author_slug = 'profile';
$wp_rewrite->author_base = $author_slug;
}
add_action('init', 'change_author_base');

Here $author_slug can be anything of your choice.

Change WordPress Author URL Base and Slug Using Plugin

You can change WordPress Author URL Base and Slug with the help of Edit Author Slug plugin by Brandon Allen.

What You Can Do with the Edit Author Slug Plugin

  • Change Author Base.
  • Set role based Author Base i.e. your-site.com/administrator/your-slug/
  • Automatically update Author Slug whenever a user updates profile.
  • Set the default Author Slug structure for users.
  • Bulk Update Author Slugs for all users manually.

By changing default WordPress Author Slug to something else you are making your blog/site less prone to hacking and saving you tones of money.