4

Searching for a how-to on changing author slug, I found two methods:

  1. Change the user_nicename field in the MySQL database of your WordPress site to whatever you want the slug to be.

  2. Changing the Author Slug from Username to Nickname

The (2) is out of question because I want the slug to be something custom, but not the nickname/nicename.

As for (1) I wanted to know if this is okay -- to change the value of user_nicename field in the database for the user?

3
  • I upvoted @Joshua but as confirmation I have done this on sites that I manage and have not had any issues. Mind the caveat's in Joshua's answer though.
    – s_ha_dum
    Commented Jan 10, 2013 at 18:04
  • @s_ha_dum Good; that's what I was hoping for. Provide an answer if you have a better solution, or simply upvote the existing one so that I can reward the bounty to it.
    – its_me
    Commented Jan 10, 2013 at 18:10
  • 2
    I did upvote the existing answer. If your theme and plugins are written well you shouldn't have much trouble... that is a big "if" with some themes and plugins.
    – s_ha_dum
    Commented Jan 10, 2013 at 18:12

1 Answer 1

8
+50

Providing you know what you're doing that shouldn't be a problem. You will however have to check that any author/user pages you may have are linked by id rather than name in the code:

$data = get_userdata( $userid );

As opposed to

$data = get_userdata('Admin');

Because the ID will never change (unless you delete the row and re-insert) but if you change Admin to Supreme Overlord, Master of this Domain the second reference will not work but the first will.

NOTE, this will not break the usage of current_user_can($capability) but will break user_can('Admin',$capability) but I don't see why you would be using user_can() over current_user_can() anyways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.