Changing directory and/or URL structure

@kureikain’s answer looks great, and it probably works really well in a wide variety of circumstances.

But for author URLs specifically, there’s a simpler way. Change the author_base, like so:

global $wp_rewrite;
$wp_rewrite->author_base = "people";
$wp_rewrite->flush_rules();

You should only need to run this once, perhaps on a plugin activation. Updating WordPress should not affect this solution.

EDIT
As @Jan pointed out in the comments, you need to run this on every init. But you only have to flush the rules once.

Leave a Comment