How to change the author base and author slug in WordPress
WordPress has no setting for the author base. To change /author/ to another word, set $wp_rewrite->author_base in a few lines of code and re-save Settings → Permalinks. The part after it, the author slug, is the user's user_nicename, which you can change with WP-CLI.
Two different things sit in an author URL such as /author/wpadmin84/. The base is author. The slug is wpadmin84, which WordPress creates from the username at registration. People usually want to change one or both: the base to match the site's language, the slug to show a real name and stop revealing a login name.
Step by step
1. Decide whether author archives should exist
On a single-author site the author archive lists the same posts as the blog page. Hydrogen SEO sets author archives to No index by default and can switch them off entirely: under Hydrogen SEO → Titles & Meta → Archives, set Author archives to Disabled and every author URL redirects with a 301 to the homepage. If that is what you want, stop here, because there is no URL left to rename. Multi-author sites that want profile pages in search should continue.
2. Change the base in code
Add this to a small plugin or your child theme's functions.php:
add_action( 'init', function () {
global $wp_rewrite;
$wp_rewrite->author_base = 'writers';
} );
Core builds the author permalink structure from that property, so every author link WordPress prints uses the new word.
3. Flush the rewrite rules
Open Settings → Permalinks and click Save Changes. Loading and saving that screen rebuilds the rewrite rules, which is what makes /writers/head-roaster/ resolve. Without this step the new URLs return 404. Do not call flush_rewrite_rules() on every page load in your code. It is slow and only needed once.
4. Change an author's slug
The profile screen shows the username as read-only and has no slug field. With WP-CLI:
wp user list --fields=ID,user_login,user_nicename
wp user update 7 --user_nicename=head-roaster
Use lowercase letters, digits and hyphens. The slug must be unique among users. The login name itself does not change, so the person signs in exactly as before. Without WP-CLI, the same field is the user_nicename column of the wp_users table, editable in your host's database tool.
5. Redirect the old addresses
Neither change is redirected by WordPress. For the base, one pattern rule covers every author. Apache or LiteSpeed, above # BEGIN WordPress in .htaccess:
RedirectMatch 301 ^/author/(.*)$ /writers/$1
nginx:
rewrite ^/author/(.*)$ /writers/$1 permanent;
For a changed slug, add one redirect per author. In Hydrogen SEO → Redirections, click Add New, enter /writers/wpadmin84/ as From URL with Exact Match, the new address as To URL, and 301 - Permanent Redirect. If you changed base and slug together, point the old address straight at the final one, so nothing passes through two hops.
6. Verify links, sitemap and schema
Click an author name on a post and check the address. Then test an old one:
curl -sI https://example.com/author/wpadmin84/ | grep -iE "^HTTP|^location"
If your author archives are indexable, confirm the new URLs are what your sitemap and any author markup print. Purge the page cache so cached posts stop linking to the old author addresses.
Does hiding the username improve security
Changing the slug stops the author URL from showing the login name, which removes one easy way to collect usernames. It is not protection in itself: usernames can surface in other places, such as the REST API users endpoint on sites that expose it. Strong passwords and two-factor sign-in do the real work. Treat the slug change as tidiness with a small side benefit.
Pitfalls
- A base that matches a page slug. If a page lives at
/writers/, the author rules and the page compete for the path. Pick a word nothing else uses. - Changing the display name and expecting the URL to follow. Display name and slug are separate fields. Only
user_nicenameis in the URL. - Forgetting the feed and paged URLs. The pattern rule above carries
/page/2/and/feed/across. Single exact rules do not.
Common questions
Can I change the author base from the WordPress dashboard?
No. Settings → Permalinks has fields for the category and tag base only. The author base is a property of the rewrite system and needs a short code snippet.
Is the author slug the same as the username?
By default it is derived from the username, but it is stored separately as user_nicename. Changing it does not change how the user logs in.
Should author pages be indexed at all?
On multi-author sites with real profiles, they can be useful. On single-author sites they duplicate the blog index, which is why Hydrogen SEO sets them to No index unless you change it.