Change WordPress Author Slug Without a Plugin

Every WordPress author archive lives at a URL like /author/username/. That final segment is the author slug, and by default it copies the login username exactly. This guide shows you how to change WordPress author slug without plugin support, with three methods that range from a sitewide base change to a careful per author update.
The change serves two goals at once. It stops advertising login usernames to anyone who views an author page, and it lets writer URLs look professional. Work through the methods in order, pick the one that matches your goal, and finish with the redirect and testing steps so nothing breaks.
What Is the Author Slug and Where Does It Come From?
WordPress stores the author slug in the user_nicename column of the wp_users database table. When you create a user, WordPress fills that column from the username, cleaned into a URL friendly form. The profile screen shows display name and nickname fields, but it offers no field for the nicename itself.
That missing field explains why the slug feels stuck. Changing the display name updates bylines across your posts, yet the URL keeps the original username. The slug also appears in author links inside post meta, author boxes, and sitemaps. Understanding the storage location matters because two of the methods below work at different layers: one changes the URL base for everyone, and one edits the stored slug for a single author.
Why Should You Change the Default Author Slug?
The security reason comes first. Brute force attacks need two pieces of information: a valid username and a password guess. A default author URL hands attackers the first piece for free. Once the username is known, automated tools can focus entirely on password guessing against your login form.
- Login exposure: /author/admin/ confirms the username admin exists.
- Enumeration: author IDs and slugs help attackers map your user list.
- Professional URLs: /writer/sarah-khan/ reads better than a raw username.
- Team branding: a team or writers base suits multi author publications.
A changed slug is one layer, not a complete defense. Pair it with login attempt limiting, which our guide to limit login attempts in WordPress covers in detail. If the username itself is weak or widely known, also read how to change a WordPress username. Slug changes hide the username from URLs, while username changes replace the credential itself.
How Do You Change the Author Base for Every Author?
Method 1 changes the word author in every author URL to a word you choose, such as writer or team. The result looks like /writer/sarah-khan/ across the whole site. Add the snippet to a child theme functions file or a custom plugin, and hook it to init so WordPress applies it before rewrite rules build.
add_action('init', 'vutg_change_author_base');
function vutg_change_author_base() {
global $wp_rewrite;
$wp_rewrite->author_base = 'writer';
}
After saving, flush permalinks by opening Settings, then Permalinks, and clicking Save Changes. WordPress rebuilds its rewrite rules, and author links across the site adopt the new base. Skip the flush and the new URLs return 404 errors, which is the most common reason this method appears to fail. Our WordPress permalink structure guide explains why flushing matters after any rewrite change.
Choose the base word with care. Writer suits blogs and magazines. Team suits agencies and company sites. Keep it singular, lowercase, and free of spaces. Remember that this method changes only the base. Each author slug still matches the username, so combine it with Method 2 when hiding usernames is the goal.
How Do You Change One Author Slug Safely?
Method 2 edits the stored user_nicename for a single author, so /author/jsmith1985/ becomes /author/john-smith/. Because this touches the database, a full backup is not optional. Back up the database first, confirm the backup file exists, and only then proceed. If anything looks wrong afterward, the backup restores the original state in minutes.
Option A: Update user_nicename With phpMyAdmin
- Open phpMyAdmin from your hosting control panel and select your WordPress database.
- Open the wp_users table and find the row for the author you want to update.
- Edit the user_nicename value to the new slug in lowercase with hyphens between words.
- Save the row, then flush permalinks in WordPress settings.
- Open the new author URL and confirm the archive loads with the correct posts.
Touch only the user_nicename column. The user_login column holds the actual login username, and editing it here can lock the user out or break related data. The nicename must stay unique across all users, because WordPress uses it to resolve author URLs. A duplicate value makes one of the archives unreachable.
Option B: Update the Slug With WP-CLI
When WP-CLI is available, one command updates the slug without opening phpMyAdmin. Connect by SSH, move to the WordPress root folder, and run the user update command with the nicename field. Replace the example values with your real user ID and chosen slug.
wp user update 3 --user_nicename=john-smith
wp rewrite flush
The second command flushes rewrite rules from the terminal, matching the settings screen step. List users first with a quick user list command when you are unsure of the ID, so you never edit the wrong account. WP-CLI validates input and reports errors clearly, which makes it the safer of the two options for most administrators.
How Does the Masking Method Work for Advanced Cases?
Method 3 leaves the stored slug untouched and masks it at the routing layer. The author_link filter rewrites generated author URLs to show a custom slug, while a rewrite rule maps that custom slug back to the real author query. Visitors see the polished URL, and WordPress still resolves the correct archive.
add_filter('author_link', 'vutg_mask_author_link', 10, 3);
function vutg_mask_author_link($link, $author_id, $author_nicename) {
if ('jsmith1985' === $author_nicename) {
return home_url('/author/john-smith/');
}
return $link;
}
add_action('init', 'vutg_mask_author_rule');
function vutg_mask_author_rule() {
add_rewrite_rule('^author/john-smith/?$', 'index.php?author_name=jsmith1985', 'top');
}
The add_rewrite_rule function registers the mapping, and a permalink flush activates it. This approach helps when the stored nicename must stay fixed for integration reasons, or when you want a display slug that differs from every stored value. The maintenance cost is real: each masked author needs a filter condition and a rule, and removing the code breaks the pretty URLs. Prefer Method 2 unless you have a specific reason to mask.
What Aftercare Keeps the Change Clean?
- Redirect the old author URL to the new one with a 301 status.
- Update internal links that point to the old slug, including team pages.
- Check author boxes and post bylines for links using the old URL.
- Flush permalinks after every rewrite related change.
- Test the new archive signed out and confirm it lists the right posts.
The redirect protects backlinks and bookmarks that reference the old slug. A small template_redirect snippet handles one author cleanly, and the same pattern extends to several authors with an array of old and new pairs. Confirm the redirect lands in one hop, then click through a few posts to verify byline links resolve to the new archive.
add_action('template_redirect', 'vutg_redirect_old_author_slug');
function vutg_redirect_old_author_slug() {
if (is_author('jsmith1985')) {
wp_safe_redirect(home_url('/author/john-smith/'), 301);
exit;
}
}
Note the interaction with Method 2: after you change the stored nicename, the old slug no longer resolves as an author, so match the old path directly instead when needed. Test whichever variant you deploy in a private window. Also confirm your sitemap lists the new author URL, since sitemaps read the stored nicename and refresh on their own schedule.
Should You Use a Plugin Instead of Code?
Honesty helps here. The free Edit Author Slug plugin adds a nicename field to the profile screen and handles base changes with a settings page. If database edits feel risky, that plugin is a reasonable choice, and using it beats making an anxious manual edit.
This guide stays plugin free because the task is small and permanent. A one time slug change does not need a plugin running on every request forever. The code methods also keep working if you later remove other plugins. Choose the route you can execute calmly and verify fully.
Finally, know the difference between changing a slug and removing archives. Changing the slug keeps author pages public under a better URL. If your site has one author and author pages add no value, removing them entirely may suit you better. Our guide to disable WordPress author archives covers that route. Whichever path you choose, solid hosting keeps the site responsive while you test, and our web hosting guide compares WordPress friendly options.
Keep a short record of every slug change you make, including the old value, the new value, and the date. That note saves confusion months later when an old report or a cached link references a URL nobody remembers creating. Store the record with your other site maintenance notes so any future administrator can trace the change quickly.
Frequently Asked Questions
Does changing the author slug change the login username?
No. The slug lives in user_nicename, while the login username lives in user_login. Changing the slug updates URLs only. The user keeps signing in with the original username and password.
Why does the new author URL show a 404 error?
Rewrite rules are almost always the cause. Open Settings, then Permalinks, and click Save Changes to flush the rules. Also confirm the slug uses lowercase letters and hyphens, with no spaces or special characters.
Can two authors share the same slug?
No. WordPress resolves author URLs by nicename, so each value must be unique. Give every author a distinct slug, such as a full name or a name with a role word, and verify each archive loads separately.
Will old author links from other sites break?
They break only without a redirect. Add a 301 redirect from the old author URL to the new one, and external links, bookmarks, and search results will land on the correct archive while search engines update their records.
Last updated: December 2026.



