WordPress’s default author archive URL format is https://imzl.com/author/%authorname% or https://imzl.com/?author=%user_id%, which is perfectly fine for a typical WordPress blog. However, for Web 2.0 sites built on WordPress, this URL structure can be problematic — it just looks awkward. I encountered this issue while revamping a design tutorial website I operate. The site has user registration enabled, allowing registered users to publish their own articles. As the user base grew, the author archive page URL format needed a makeover — the default WordPress format just wouldn’t cut it.
Since WordPress doesn’t provide a built-in setting to modify the author archive URL, we can achieve our goal by editing the theme’s functions.php file. With just a few simple lines of code, you can fully customize the WordPress author archive page URL.
add_action('init', 'set_new_author_base');
function set_new_author_base(){
global $wp_rewrite;
$wp_rewrite->author_base = 'aipsme';
}
Add this code to your theme’s functions.php file, then visit the Permalinks settings page in the admin panel and save (no changes needed). You’ll then be able to access the author archive page via https://imzl.com/aipsme/%authorname%. If “aipsme” doesn’t suit your needs, simply change it in the code to whatever you prefer. For example, change it to “u” and your URL becomes https://imzl.com/u/%authorname%.
Of course, after making the change, don’t forget to set up a 301 redirect for the old URL pattern via .htaccess.