How to Change WordPress author URL-/slug base

This snippet will allow you to change the default WordPress author URL base from ie: “mysite.com/author/name”, to ie.”mysite.com/profile/name”. In this example We are changing the slug to “profile”, but you can change this to anything that you would like.

Instructions
1. Add this code to your functions.php

2. The permalink settings have to be updated after adding the above snippet to your functions.php. This is simply done by navigating to: settings > permalink and click “Save Changes”.

Related plugins:
https://wordpress.org/plugins/edit-author-slug/

Comments

4 Replies to “How to Change WordPress author URL-/slug base”

  1. Hello, it does change url base but then I get a 404 on trying open a page that previously was myblog.com/author/anyone.
    What else is need, flushing the rewrites? How do you do that?

    1. @ezeocca – you need to flush the permalink settings by re-saving. Thank you for the reminder – I have added the additionel step in the instructions.

  2. I’ve got another question on this, hope someone has the answer:

    Do you need to run this function permanently in your functions.php file? It seems like you can throw out this code, once your URL base has changed, but is it that safe? I have no idea yet where all these changes are made, DB or so?

    Please advise, if you can.
    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *