Är du frustrerad över att du ej kan ändra ditt användarnamn i WordPress? We hear you.
På WPBeginner har vi hjälpt otaliga användare att navigera i WordPress, och vi vet att det här kan vara en riktig huvudvärk. Den goda nyheten är att även om det inte är så enkelt som du kanske förväntar dig, finns det definitivt sätt att ändra ditt användarnamn för login.
I den här guiden går vi igenom 3 beprövade metoder för att ändra ditt användarnamn i WordPress, så att du äntligen kan bli av med det gamla användarnamnet och börja om på nytt.
Är det möjligt att ändra ditt användarnamn i WordPress?
Även om det är enkelt att ändra ditt fullständiga namn från din användarprofil i WordPress, kommer du att se ett message om att användarnamn inte kan ändras.
Detta kan vara frustrerande och förvirrande för Beginner WordPress användare. Den goda nyheten är att det finns flera lösningar för att ändra ditt WordPress-adminanvändarnamn och andra användarnamn.
Den här artikeln visar dig tre sätt att ändra ditt användarnamn på din WordPress website. Du kan använda länkarna under för att hoppa till den metod du vill använda:
Metod 1: Skapa en ny användare och ta bort den gamla (inget plugin)
Det enklaste sättet att ändra användarnamnet för WordPress är att skapa en new användare med ditt önskade användarnamn och med rollen administratör.
Den enda haken är att du måste använda en annan email address än den som används av ditt nuvarande account.
Note : Om du använder Gmail kan du insert ett plustecken (+) med ytterligare bokstäver efter användarnamnet.
Om din email address till exempel är myname@gmail.com, kan du använda email address myname+wordpress@gmail.com. Den kommer fortfarande att gå till samma email inbox, men WordPress kommer att betrakta den som en separat email address.
När du har skapat det nya kontot måste du logga ut från ditt WordPress-konto och sedan logga in med det nya användarkontot som du just har skapat.
Därefter headar du över till Users ” All Users page i WordPress admin area och klickar sedan på länken ”Delete” under ditt gamla användarnamn för att ta bort det.
När du tar bort det gamla användarnamnet kommer WordPress att fråga vad du vill göra med allt content som skapats av den användaren.
Se till att du klickar på alternativet ”Attribute all content to” och sedan väljer den nya användaren som du just har skapat.
Efter det ska du klicka på knappen ”Confirm Deletion” för att ta bort det gamla användarkontot.
Grattis, du har nu utan problem ändrat ditt användarnamn i WordPress. Om du vill använda samma email address som tidigare, kan du nu ändra email addressen för den nya användaren.
Metod 2: Ändra användarnamn med hjälp av ett tillägg
Ett annat enkelt sätt att ändra ditt användarnamn i WordPress är att använda ett plugin. Om du är orolig för att använda för många tillägg, låt oss försäkra dig om att du säkert kan ta bort pluginet när du har ändrat ditt användarnamn för WordPress.
Det första du behöver göra är att installera och aktivera pluginet Easy Username Updater. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett WordPress plugin.
Efter aktivering går du bara till Users ” Username Updater page och klickar sedan på länken ’update’ bredvid användarnamnet du vill ändra.
Nu enter du helt enkelt det nya användarnamnet och klickar sedan på knappen ”Update Username”.
Om du gillar att meddela användaren om ändringen, se till att du kontrollerar boxen ”Send User Notification” först.
That’s all! Nu kan du remove the användarnamn changer plugin från din site.
Metod 3: Ändra ditt användarnamn för WordPress med phpMyAdmin (Avancerat)
Denna metod är lite mer komplicerad eftersom den är obligatorisk för att du ska kunna göra direkta ändringar i din WordPress database.
Vi rekommenderar att användare undviker att göra detta om möjligt eftersom det är lätt att göra ett misstag och orsaka error på din WordPress site.
Men i vissa fall kanske du inte har något alternativ, till exempel när du glömmer ditt användarnamn och din email address för WordPress och blir utelåst från ditt admin-konto.
Först måste du logga in på din dashboard på webbhotellet för att hitta phpMyAdmin-menyn.
Vi använder Bluehost i det här exemplet. Din dashboard kan se annorlunda ut om du använder en annan server som inte använder cPanel, men phpMyAdmin-alternativet bör fortfarande vara tillgängligt.
När du väl är inne i Bluehost-instrumentpanelen går du vidare och navigerar till tabben ”Websites”. Välj sedan en webbplats och klicka på knappen ”Settings”.
Nu rullar du ner till sektionen Quick Links.
Därefter klickar du helt enkelt på ”phpMyAdmin”.
Detta kommer att starta phpMyAdmin i en new tab i webbläsaren.
You will need to select your WordPress database if it is not already chosen.
You will now see your WordPress database tables. Som standard använder WordPress Database Tables wp_
som prefix före varje tabells namn. Det är möjligt att du har ändrat prefixet för databasen till något annat.
Du måste clicka på wp_users-tabellen
på vänster sida. Sedan ska du klicka på ”Edit” bredvid användarnamnet som du vill ändra.
Nu kan du skriva in det nya användarnamnet du vill använda i fältet user_login
.
När du är klar måste du klicka på knappen ”Go” längst ner på vyn för att spara det nya användarnamnet.
That’s all! Nu bör du kunna logga in på din dashboard med ditt new användarnamn.
Learn More sätt att hantera användare av WordPress
Vill du ha fler tips och tricks för att hantera dina WordPress användares accounts? Här är andra artiklar som du kan läsa för att komma igång:
- Så här ändrar du ditt password i WordPress (Beginner’s Guide)
- Så här tvingar du fram starka password för användare i WordPress
- Hur man automatiskt loggar ut inaktiva användare i WordPress
- Så här lägger du till eller tar bort capabilities till roller för användare i WordPress
- Hur man blockerar en användare av WordPress utan att ta bort deras account
- Så här hälsar du varje användare med ett customize välkomstmeddelande i WordPress
- Så här addar du till ytterligare fält i profilen för användare i WordPress-registrering
Vi hoppas att denna tutorial hjälpte dig att lära dig hur du korrekt ändrar ditt användarnamn i WordPress. Du kanske också vill se vår tutorial om hur man omedelbart växlar mellan WordPress användarkonton och våra expertval av de bästa tilläggen för att hantera en WordPress blogg med flera författare.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Val
I used the first method and I am unable to delete the other user. Has anyone run into this issue? Now that I have another user with the username I actually want I am concerned that I can’t move on to method 2 or 3 because the username is already in use.
Sarah Sullivan
Hi, My site is still under construction, when I was setting it up I followed the steps I had printed out instead of listening to the audio too. I only realised afterwards that I shouldn’t have used my real email address as the username as this will be visible once I start posting. Which method above would you recommend I follow to make the necessary change as I haven’t yet got any content to worry about losing?
The other thing I keep getting really confused about is when I am asked for my email address do they mean my real one or the one that is part of website that I would like to handle?
Thanks
Sarah
WPBeginner Support
Sarah you can add as many users account to your WordPress site as you want. Simply go to the Users page in admin area and then click on add new. You can add users with different roles like administrator (site owner), editor, author, etc. If you are the only one using your site, then a user with administrator role is all you need. After you have created a user name that you like, feel free to delete the old one that you do not wish to use anymore.
The email address they ask will be used to send you notification emails. It has to be any existing email address that you already use.
WordPress itself is not an email client and it will not create an email address as part of your website. If you want to have a branded email address with your own domain name like sarah@example.com, then see our guide on how to setup a professional email address with Google Apps and Gmail
Administratör
iulian
Great tip. Thank you!
Niaz Khan
Thank you, admin, after reading your blog I have successfully changed the usernames of my blog bestcmsplugins.com ,
You are doing a great job by helping others
Kellie Grace
This was so quick and simple! Thank you so much!
Julio Falconi
I did it and when i went on my new account it doesn’t show users tab or any other tabs
Angel A.
Thank you so much! The first method worked flawlessly.
Alan Cox
At last someone who really makes it easy. Well done and thank you.
Danstan
Thanks
ERic
Thank you. The Plugin worked perfectly
Vijay
Thank you so much for this article. I took the phpMyAdmin route and it worked… But, before it started working it did this weird thing where if I entered the url of the user’s profile it took me to the home page.
But then in the end it worked. Probably because I saved the profile from wp-admin after having changed the user_login and the user_nicename values from phpMyAdmin?
Daniel Taylor
That’s for the great advice. The plugin was the most easiest way.
madivad
Too many places to reply so I’ll create a new comment.
I’m one of those people that don’t like to just add another plugin (even if I can remove it afterwards) and so even after reading about the create new user/delete user/migrate posts method, I liked the phpmyadmin method.
But it does cripple multisite installs and you really should update the main post about that.
For anyone who does do it the database way, you have to go into your sitemeta table and update the superadmin user with the new username and character count in the S:flag.
Otherwise, the create/delete/migrate method might actually be a better option
Cassy
Here is the way I did it – very quick and easy, took me less than 5 minutes to do:
1. Go to users
2. Click on the user name you want to change
3. Above the “Update Profile” button, there will be text that reads “Were you looking for your API Key and other Personal Settings”. The ‘API Key and other Personal Settings’ text will be highlighted (as it is a link).
4. Click on this highlighted text.
5. Scrolls down the page to the heading “Account Details”
6. Just under “Account Details” will be ‘User Name’
7. You will see next to your user name there will be the word ‘Change’ in brackets, also in highlighted text (indicating it is a link).
8. Click on this text to change your user name.
9. Don’t forget to save
10. You can change all other linked settings from here, such as BLOG NAME, PRIMARY BLOG, etc,
Traci
Hello,
Thanks for the article! Out of curiosity, would a change of my WP login username prompt a DISCONNECT to wordpress.com jetpack stats and tools?
I’m asking b/c today, I changed it (due to tireless notifications of site lockout attempts from….who knows?), and now my jetpack stats are all screwy and wordpress.com no longer recognizes my website. I’m getting this error message:
unknown_token: It looks like your Jetpack connection is broken. Try disconnecting from WordPress.com then reconnecting.
But no further instructions on what to do. Love to know your thoughts.
Thanks! LOVE your all of your content!
Chris
A word to the wise, from someone who wasn’t. Using that plugin can be fatal to a multisite setup. Multisite does not allow the user name of the superadmin to be changed. And there is no warning about this on the plugin site. But because the plugin just twiddles with the name fields of the database it gaily ignores this. So if you use it, be prepared to lose all access to the network. This might not happen if the name you change it to happens to have the same number of characters as the name you are changing from. I am not about to prove this point though, once bitten and all that. The remedy is then only direct editing of the database to restore precisely, and I do mean precisely including cap and lower case usage, what was there before.
Miha
Hi,
i successfully changed username on the multisite installation.
I have changed username directly in sql database.
First of all backup your db.
You have to change username in tables:
_users in fields: user_login and user_nicename
_usermetadata field nickname and
_sitemeta field site_admins
in the field site_admins be careful to change the name admin and number of letters before admin in variable s:5
admin username has 5 letters, change it to number of letter in your new name
Delete cookies in browser, login again to your WP admin and you have network access with your new username
Frank
Does it make sense to change the user ID as well?
Bob The Builder
Here is something odd that I’ve noticed today.
I did not like it that my (admin) username was visible in the author URL. So I decided to create a new user with author role and since I’ve made this new user the author URLs are the same as the screennames.
So now I can use my admin account again since the screenname is visible in the URLs and not my actual username.
Any explanation for this?
WPBeginner Support
WordPress uses the username in the Author URLs. If the admin user still has posts then their author URL will still appear on those posts. You can assign those posts to new author account you created and set a redirect for the admin url.
Administratör
Paul Okeke
Everything about WPbeginner.com is awesome. This article and all I have come across from the same source worked for me. Just want to say a big thanks to wpbeginner.com editorial saff. Cheers!
Adriana
Would the process ”Create a New User and Delete The Old One” work properly from network admin area on a multisite installation?
Muhammad
It worked! Many thanks!
MattFromGA
This change may or may not be a big problem for a given wordpress site based on the plugins and theme it is using. What if there is a plugin that uses an external system that associates data with username? The simple change outlined here would fail to update that username in the external system and the association between the user and that external data would be broken with this change. What about forum posts in bbpress where a user mentions another user by username?
I guess a basic wordpress blog install wouldn’t have too many problems with this, but beyond that you better have awareness of the other plugins and theme dependencies on username. If none, this simple change could be fine.
Rose
Yes And we’ve seen this week where this all can lead to. Patching up plugins, fixing holes, hoping the theme has no holes, then after seeing the notorious scammers all have the name, changing username etc. But luckily we can change the name. There’s no other option when all is leaked out. Yes security. Having a good security plugin. Securi I found too difficult to understand. Anyway, there are certainly more problems to fix soon.. boy oh boy.
Braham Dutt Sharma
Hi, I want change my existing blog authority in another login id example: i make 5 blog with my own id and now i want change 1 blog login and password with another email is , can this possible , if possible please help.
Tyler
There is nowhere else it needs to change. Everything is attributed to the ID of the user, not the username. It’s just a text field like email, first_name etc.
MattFromGA
So you have a certainty that ever plugin and theme written for wordpress follows that guidance? What about plugins that share username with external systems which make data associates with that?
Morphine Child
Wow, did phpmyadmin solution… literally 3 seconds of work…
Big thank you!
adeem jan
Yet another informative tutorial from you
Let me tell you honestly, I am totally the non-techie so I had NO idea about how to change the admin username till some time back – nor do I visit the C-Panel – I fear those places…lol…
My friend takes care of the tech aspects, though I’ve learnt it all now and thanks to you all of you tech bloggers sharing your posts here, I keep learning each day!
Yes, for security reasons, you need to change the usernames, more so with the number of cases of hackers all over the web. Better to be safe than sorry later.
Thanks for sharing.…. keep up the good work…
Jatin Chhabra
Well the 1st ine didn’t work but the 2nd one did…
Aaron Dear
Stijn’s way is my favorite way. Haha
Nasir Uddin
Thanks. I knew it before. Another process is given by Stijn Vogels. I do that sometimes. But phpmyadmin process is much easier if you have cpanel details.
Mihaela
Worked for me. Thank you.
vaibhav singh
Hey,
Thanks for taking time to write this. I was thinking it is impossible to change….Thanks a lot
hoa sen vang
That’s good idea, thanks i think found the right way to change user name any more, which make me crazy time.
getnet asfaw
how can i change user name from the hosted website if i can’t access the database of all the users?
Milan
Thanks
BTW
why not choose desired name that appear for that username
Vince Comfort
You make work easier for hackers. Because when hackers want to access your site, they start with the desired, sitename and initials.
Jitendra Vaswani
Thnxxx for this amazing article. I was eager to change my username. finally i got solution.
Kamal G
Very Very Useful Thanks a lot for sharing,it saved lot of time…
Dave OSullivan
Thanks, worked a treat. Instead of ’Usernames cannot be changed’ why doesn’t it say ’Usernames can only be changed in your hosting cPanel’ Thanks fir the tutorial
Michael Bryant
Awesome tutorial, thanks for the info. Worked just like the steps you outlined. Thanks.
John G.
That really helped out, thanks for posting it. Really was one, two, and done.
Richard
I have installed probably three wp site recently and my email address is being put in as user id. When I try to change by creating a new admin and delete the old, the system will not complete the action. So now I have two admins in each install.
Phillip Taare
thanks very cool, I used better Wp security plugin but I did like your article. Cheers
William Patton
wow… how many people don’t update their username on creation? lol
And changing the record in the database without following the chain of records that the original input created is just… wrong. I wouldn’t be giving anyone this advice without a disclaimer. At least it says the easiest way (it should be the recommended way) is to create a new user and attribute all posts to it then make sure that the old user ID isn’t being called from anywhere, if it is update it.
Tyler
What is this ”chain of records” you speak about? Every post is attributed to the ID of the user, so changing the username is perfectly safe. It’s nothing more than a field like email, first_name, etc. If you don’t know anything about how Wordpress or databases work, it’s probably best not to give advice on it.
Justin
This was extremely helpful. Thanks for making things easy.
Jim White
Worked for me. Thank you.
Chris
Worked for me thanks!
Adnan Gujjar
thanks for this nice trick, i have changed my username
Lilou
I’m French and not English very well. But I wanted to thank you for your help, because I was looking how to change the ID of my Wordpress site.
Thank you again.
I put your site in my favorites.
See you soon.
Naveen
thanks a lot
it worked well for me….
wisekal
@Stijn Vogels Changing the username in this manner can also cause other problems. As you mentioned, a person can create a new account, give it admin rights and proceed by deleting the old admin. However, there are in many instances where the admin ID was used for something. When you create a new admin, you create a new ID. By updating the username via ”phpMyAdmin” you’re avoiding that being changed.
@kovshenin This is 100% correct and goes with what I said above. In my opinion the best approach is that which was recommended above in this article. It keeps a lot of the crucial information you may require rather than loosing it when creating a new admin user.
Additionally to all this, you can also download a plugin or two by Website Defender, one being ”WP Security Scan” and the other ”WP Secure”. These plugins allow for you to seamlessly update your database username and prefix used by your installation without any access required to the databases. Two plugins I strongly recommend for various reasons.
– Bryce Wisekal
kovshenin
@wisekal Hi Bryce! Sorry but you’re wrong, messing with the wp_users table directly is in fact insecure, because of the various actions and filters run during functions like wp_insert_user and wp_update_user including cache revalidation, data sanitization and much more. When updating your table directly you’re short-circuiting all those actions and filters, so plugins, themes and core that rely on them will simply fail. An example of such a plugin is any persistent object caching plugin that uses wp_cache_get.
kovshenin
Stijn’s right, it’s easier and requires no messy phpMyAdmin routines, to just create a new user and then attribute all posts. However, it’s worth noting that usernames are used in the permalink structure for author archives, like your archives are now on /author/wpbeginner/ and if you changed your username, all those previous links will turn into 404 errors.
~ Konstantin
Stijn Vogels
@kovshenin Methinks an archive for /author/kovshenin/ would be more relevant than /author/admin/ which will probably generate a million results… According to Google, about 17,3 million. No argument that your procedure is the most valid, but it should be done from the beginning.
kovshenin
@Stijn Vogels I’m not saying it’s good or bad, wrong or right, worth the trouble or not. I’m just saying what will happen to your previous author archives, so nobody is surprised
Editorial Staff
Not sure if I understand you correctly Konstantin.. But in my experience, the old URLs stay the same. For example if the URL is /author/wpbeginner/ << it will continue to work. For example if I changed the username to newname... the url /author/newname/ won't work. But that has no impact on anything. As a matter of fact some may even say that this is good for security because now the hackers don't know your username.
Administratör
GWW
I believe the URLs use the user_nicename field. By default, this is set to the user_login field after being passed through `sanitize_title` (which replaces accented characters, removes HTML and PHP tags). If you update user_login without changing user_nicename, URLs remain unaffected. If you update both fields, URLs will change; any URL using the old nice name will result in a 404.
whereskarlo
This. What about if you only change the nicename but leave the username intact? I’d rather keep my username and make the urls prettier.
Stijn Vogels
Even easier:
1. Create a new admin profile for yourself, with the name you want.
2. Delete you old admin profile and transfer all posts to the new account.
3. Done.
Mohit Bumb
@Stijn Vogels lol nice
charmain
Nice one!! Thanks a……gazillion! Very helpful!
Nasir Uddin
That takes more time than phpmyadmin process.
Alex Schenker
Yes, but just barely. And I’m guessing the phpmyadmin process doesn’t update the username everywhere it needs to change – which could break something down the road.
Will
This is so cool! Thanks a lot Was wondering how to do this.