In WordPress, author archive pages use the /author/ base in their URLs. While functional, this format is somewhat old-fashioned. Many social networks now use a cleaner style, where profile URLs start with an @ followed by the username.
You can see this on platforms like X and Instagram, where user profiles follow a simple, handle-based format. The @ prefix is now widely recognized as a way to point to user profiles.
If you want your WordPress author URLs to look more consistent with this pattern, you can adopt the same format for them in just a few minutes.
How to Convert Author Permalinks to Social-Style Handles?
What the Snippet Changes
How WordPress structures author URLs in its backend code involves several layers of logic. A detailed breakdown would make this unnecessarily complicated.
Simply put, $wp_rewrite controls the permalink system, and its author_structure property sets the format for author archive URLs.
By default, this is set to:
/author/%author%
The code below simply replaces the /author/ part in that structure with @ symbol to:
/@%author%
As a result, WordPress generate author URLs like:
https://your-site.com/@alice
Code Snippet
You can do this without any extra plugin. All it takes is a short snippet of code.
function pm_change_author_base() {
	global $wp_rewrite;
	$wp_rewrite->author_structure = '/@%author%';
}
add_action('init', 'pm_change_author_base', 10);
Handling Old Author URLs
Changing the author URL structure breaks any existing links that still point to /author/username.
You can handle this by adding a redirect function. It will catch requests to the old URLs and redirect them to the updated format.
function pm_redirect_old_author_urls() {
	global $wp;
	if (is_404() && preg_match('#^author/([^/]+)/?$#', $wp->request, $matches)) {
		$author_slug = $matches[1];
		$new_url = home_url('/@' . $author_slug);
		wp_redirect($new_url, 301);
		exit;
	}
}
add_action('template_redirect', 'pm_redirect_old_author_urls');
Flushing Rewrite Rules and Testing
After pasting the code, open "Settings -> Permalinks" and click "Save Changes". This forces the rewrite rules to update, so your author URLs follow the new structure.
Leave a Reply