Say you have an author page on your WordPress blog; but what happens when you find that your author archive URL looks like this?

http://example.com/author/Joe%20Smith/

Of course, you’d probably want to change your name to a more “URL-friendly” format like this:

http://example.com/author/joe-smith/

How do you do it?

Well, WordPress itself doesn’t let you (probably because the URL is intended to be a permalink), but it can still be accomplished through a simple database modification.

Here’s how. This is assuming your hosting account is setup with phpMyAdmin. (If you don’t have database editing experience, you might want to make a database backup just in case.)

  1. Go to your hosting account’s cPanel and click on the “phpMyAdmin” icon. If you don’t see it, look for a “MySQL Databases” icon, click it, scroll down to the bottom of the page, and then click the phpMyAdmin link.
  2. Select your WordPress database from the menu on the left.
  3. Select the wp_users table, and then click the “Browse” tab.
  4. Locate the row that has your username in the user_login column. Click the Edit button (the pencil icon) on that row.
  5. Enter the desired URL version of your name into the user_nicename field.
  6. Click “Go” to save your changes.

And that’s it! Your author archive will now show up at your new URL.

John Lamansky is a web developer who has been working with WordPress since 2005. He has created many WordPress themes and plugins and blogs at JohnLamansky.com.

  1. Thanks for this tip, but here’s a related question: Any idea how to make the author permalink use a different word other than “author”? E.g.:

    http://example.com/member/joe-smith/

    Standard WP permalinks Options allow a change for the category archives from “category” to a word of choice, but apparently no other types of archives. Thoughts?

    • Darko says:

      Just for those who stumble here searching for a way to change author permalink base from something like:

      /author/joe-smith

      to

      /member/joe-smith

      you can easily achive it without messing up with rewrite.php file (which you’d probably have to edit every time there’s a WP update).

      So: in your theme’s functions.php file place this:

      global $wp_rewrite;
      $wp_rewrite->author_base = “member”; // or whatever
      $wp_rewrite->flush_rules();

      Off you go!

  2. Tim says:

    @Mark S. Merritt – if you open /wp-includes/rewrite.php and edit $author_base (line 183 in v. 2.6) to be whatever you want. The only thing to remember is that you will have to do this again if you upgrade this file down the road.

  3. Great post that gets exactly to the issues and fixes it (if you initially identified the correct problem). You got yourself a suscriber off of this post.

  4. dardna says:

    Yet related to Mark S. Meritt’s question, i’ve release a little plugin that could do exactly what you want, check it out here: Custom Author Permalink. Any thoughts on it are very welcome..

  5. Hedley says:

    OK, I tried editing the database and removing the space between the first and last names. Worked perfectly. Thanks for posting this.

    But here’s my struggle: I’m supporting a client who uses WordPress to post articles from many writers. I could go into the database and adjust the ‘user_nicename’ for each of the ones who have the “Display Name Publicly As” field populated with two names separated by a space (ie: “Joe Smith”), though there are up to 100 of them. Manageable. The problem is, I don’t want to have to edit the database every time a new user is added.

    Though I like to avoid editing core files, in this case I would rather have to edit one core file when I upgrade WordPress than be editing the database for each new user. Is there a core file I can change so that the author.php uses “user_login” to retrieve info, but still displays “user_nicename”?

    Thanks!

  6. John says:

    Does anyone know how to get rid of /author/ all together?

    I’d like it to appear as http://example.com/john-doe/

  7. abhi says:

    @john

    dont include author in custom structure .. use sth like /%postname%/ or sth

    http://techtadka.net/tutorials/web-tutorials/202-how-to-change-wordpress-post-url-permalinks.html

  8. Debs Jenkins says:

    Hi Hedly
    I’m having the same problem and don;t want to edit the dbase – did you ever get a fix?
    Debs

  9. Jin-oh Choi says:

    This was the solution, that I was looking for to solve the “error 404″ I was getting.

    Thanks again.

  10. Emily says:

    Kyle, thank you very much for the info! This is exactly what I needed to do. Perhaps future versions of WordPress will allow editing of the author permalink… seems simple enough to add it to the user profile page.

  11. Emily says:

    Just figured it out… it’s easy to add it to the user profile screen. Follow the directions here, but substitute user_nicename for twitter in the code.

    http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

    Hope this helps!

    Emily

  12. Burhan Ahmed says:

    thanks for the tip u saved a lot of mess

  13. Stan Mouser says:

    Thanks, Kyle!

    Even two years later, your solution worked like a charm! I’m on bluehost, and the instructions were both clear and relevant.

    Stan

  14. Tony says:

    Thank you, it worked a charm. Really need it cos mine caused a broken link which need to be fixed. good explaination.

  15. mark ways says:

    Hi Kyle, I didn’t know I had this problem at all until I checked google’s webmaster tool. Fortunately, I found your guide to solve it very fast and easily. Thanks for your help, I appreciate that. Mark

  16. Chris Anger says:

    Great tip as always. never actually was aware of the problem. just fixed this at some of my blogs. Thanks for the hint.

  17. Kid says:

    Or you can install this plugin, much easier and works on any hosting environment :)

    http://www.microkid.net/wordpress/author-slug/

  18. yasin says:

    thanks, worked perfectly for me

  19. Connie Myres says:

    Thanks you! You’re article helped me fix the problem.

  20. Excellent.. super quick fix.. thanks Kyle!

  21. Nikhil Arora says:

    Hi Friend,

    Thanks for this nice trick.
    But i have a question.
    I want to change my author page url to:

    author/name/

    instead of

    author/name

    Actually i am getting an issue of redirect.

    Thanks.

  22. christiann says:

    This was really helpful because I’m using email addresses as usernames on my site, so I didn’t want the author URLs to expose email addresses. So I ran this query on my whole wp_users table:

    UPDATE wp_users SET user_nicename = ID

    So now my URLs look like this: example.com/author/32

    Not as SEO friendly, but much better than unintentionally giving away my users’ email addresses. Thanks!

  23. Hi Kyle,

    I had the exact problem you stated, my author archive went to

    /author/Jordan%20Godbey

    and my nicename in the database was “Jordan Godbey”

    So I went into phpMySql and changed it to “Jordan-Godbey”

    Now the link just returns me to the homepage everytime I click the author link of a page written by me… Any ideas? it’s showing the new “correct” link of zoomspring.com/author/Jordan-Godbey but nothing happens when you click the link.

    Thanks for any help,
    Jordan

  24. kentzo says:

    I am encoutering this problem.

    When I display the arhive for author with spaces in between their name,

    The link displayed is eg. /author/John Smith . And when you click it, the url will be then translated to /author/John%20Smith

    And I suppose this will work as %20 is safe url encoding. However i still get page 404 error.

    Of course when I use the method suggested by Kyle, meaning replace the user_nicename in database from John Smith to John-Smith, things will work.

    But why does the %20 will not work in this case. It seems to me this problem should be fixed by later wordpress http://core.trac.wordpress.org/ticket/2467

    • I realized that for me it was a stupid mistake on my end.. I am use the WordPress SEO plugin by Yoast and there is a feature you can turn on that disables the author archives for single author sites. It will automatically forward you to the homepage instead if you try to go to /author/author-name

      I unchecked that radio button and the author profile worked fine after I changed the nicename from Jordan Godbey to Jordan-Godbey

  25. 1step2k says:

    Hello Kyle,

    Great post…Was looking for this and it provides exactly what I needed in simple steps. Thank you!
    Cheers :)

  26. Eric R. W. says:

    Thanks for the tip, but this really sucks. Is there really not a better way to do this? I will be allowing a bunch of people to sign up and I don’t really want to do this everytime.

    Is there a way to edit the code?

  27. I use godaddys seo service and its telling me “119 pages have no description tags”
    here is example of the many pages
    http://andychandler.com/author/andychandler/
    http://andychandler.com/tag/affordable-business/

    problem is i cannot find the “author” or “tag” pages to add a description tag.
    Any ideas ?

  28. Sk says:

    Thank you! It worked perfectly.

  29. Wes says:

    Worked perfect for me too. Thanks, Kyle!.

  30. Peter says:

    Thank you so much! I was trying to fix this and just got it fixed today. Explained very well. Cheers!

  31. Brad says:

    Thank you for this!

  32. Thank you so much! This tut helped me fix my broken author url structure. No idea how it got messed up, but this guide did the trick!

  33. garynsmith says:

    Can I set this to link back to my Google+ Profile to help with Authorship? Improve ranking, etc? How will making that change affect my blog? or will it affect it in any way?

  34. garynsmith says:

    Can I set this to link back to my Google+ Profile to help with Authorship? Improve ranking, etc? How will making that change affect my blog? or will it affect it in any way?

  35. M Imam says:

    Thanks.. It’s Work

  36. Isabelle says:

    Really, thank you, thank you, thank you very much. I am looking for one week a solution to change my nickname in my author link. I finally found the answer here. Thank you again!

  37. Shannon says:

    Exactly the info I was looking for. Thank you so much!

Trackbacks/Pingbacks »

  1. Author Link Broken with Custom Permalinks - One Theme Support Forums says:
  2. 100+ Awesome Resource list for Wordpress | WebSenseLogic says:
  3. Wordpress: Help! My author page isn’t displaying… | Health and Home Topics says:
  4. Custom author URL for WordPress blog | http://blog.hashbangweb.com says:

Leave a Reply