Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having a membership site in wordpress where there are more than 10K users. Now when the user having a single word user_nicename ( http://example.com/author/james ) try to access their respective author page, then it works just perfectly fine. But when a user having user_nicename including a space character in between ( http://example.com/author/james bond ), it gets converted to this url ( http://example.com/author/james%20bond ) and redirects them to a 404 Error Page.

I have gone through some forums and everybody has suggested to modify the db value for this. Since, in my case I am having more than 10K users, its very time consuming to go to the specific table and edit the value for each particular user and moreover, I'll not prefer this solution.

Can anybody suggest me some solution for this issue?

share|improve this question
    
Out of curiosity: how did you even manage to get spaces in your user_nicename values? –  Chip Bennett Nov 15 '12 at 16:49

1 Answer 1

The user_nicename should never have spaces. It is a sanitized version of user_name, that has been sanitized (Aa-Zz,0-9,_,-) to be suitable for use as a slug.

If you have spaces in your user_nicename values, you're going to get 404 errors. To correct, you'll probably need to edit the database directly. Here are instructions, with screenshots, for doing so via PHPMyAdmin.

share|improve this answer
    
I am not sure how the user created their account but there are many cases when their nicenames are appearing with spaces. Is editing the database is the only solution for this? What will be the case when a new user again comes on the site and he encounters the same issue again? –  swtshweta Nov 15 '12 at 17:15
    
Are you sure you're talking about user_nicename, rather than display_name? By default, WordPress sanitizes the nicename. –  Chip Bennett Nov 15 '12 at 17:34
    
yes, I am talking about user_nicename only. For ex. I have the user_nicename as 'Jang Jaehyuk' in the db. I know that wp sanitizes the nicename, but in some cases, its not working. –  swtshweta Nov 16 '12 at 4:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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