Récemment, l’une de nos utilisatrices/utilisateurs nous a demandé comment réinitialiser le mot de passe administrateur de WordPress sur un serveur local ? Si vous utilisez WordPress sur un serveur local et que vous avez oublié votre mot de passe, vous ne pouvez pas le réinitialiser par e-mail. Dans cet article, nous allons vous afficher comment réinitialiser le mot de passe administrateur de WordPress sur un serveur local.
Pourquoi la réinitialisation du mot de passe ne fonctionne pas sur l’hôte local ?
Le terme » localhost » est utilisé pour décrire un serveur local qui n’est pas accessible au grand public. Par exemple : votre ordinateur personnel.
De nombreux utilisateurs de WordPress l’installent sur localhost (dans leur ordinateur) pour tester des modifications, concevoir des sites web, essayer de nouvelles extensions et même apprendre WordPress.
Si vous n’avez pas encore essayé, consultez notre tutoriel sur l’installation de WordPress sur votre ordinateur Windows à l’aide de WAMP.
Les utilisateurs/utilisatrices de Mac peuvent suivre les instructions de notre tutoriel sur l’installation locale de WordPress sur Mac à l’aide de MAMP.
Voici maintenant le problème que certains débutants peuvent rencontrer.
Si vous oubliez votre mot de passe d’administrateur WordPress alors que vous travaillez sur un serveur local, vous ne pourrez PAS le réinitialiser en utilisant l’option normale de réinitialisation du mot de passe de WordPress.
L’option de réinitialisation du mot de passe vous envoie par e-mail un lien pour réinitialiser votre mot de passe WordPress. Afin de commander des e-mails, votre serveur doit activer la fonction e-mail.
Cette fonction est inactive par défaut sur les serveurs locaux, ce qui signifie que WordPress ne pourra pas envoyer l’e-mail de réinitialisation du mot de passe.
Mais ne vous inquiétez pas, il existe un moyen de réinitialiser votre mot de passe WordPress sur un serveur local.
Vous êtes prêt ? Premiers pas.
Tutoriel vidéo
Si vous n’aimez pas la vidéo ou si vous avez besoin de plus d’instructions, alors continuez à lire.
Réinitialiser le mot de passe de l’administrateur de WordPress sur l’hôte local
Nous allons utiliser phpMyAdmin pour réinitialiser le mot de passe sur l’hôte local. Visitez simplement le panneau de contrôle phpMyAdmin en tapant cette URL dans la barre d’adresse de votre navigateur :
http://localhost/phpmyadmin/
Il vous sera demandé de fournir votre identifiant et votre mot de passe MySQL. Généralement, l’identifiant est root, sans mot de passe.
Une fois que vous êtes connecté, vous devez sélectionner votre base de données WordPress.
Une fois que vous avez sélectionné votre base de données, vous verrez une liste de tables dans votre base de données WordPress. Allez-y et cliquez sur le lien Parcourir à côté de la table des utilisateurs/utilisatrices de WordPress.
Vous verrez maintenant la liste des entrées dans votre table utilisateurs/utilisatrices. Le nombre de lignes dépend du nombre d’utilisateurs/utilisatrices inscrits sur votre site WordPress.
Ensuite, vous devez cliquer sur le lien Modifier à côté de l’identifiant de l’utilisateur/utilisatrices.
Cela ouvrira un formulaire dans lequel vous pourrez modifier les informations stockées dans la base de données de WordPress pour cet utilisateur.
Défilez vers le bas jusqu’au champ user_pass et saisissez un nouveau mot de passe dans la colonne ‘value’. Ensuite, vous devez sélectionner MD5 dans la colonne « function ».
N’oubliez pas de cliquer sur le bouton » Go » en bas de page pour enregistrer vos modifications.
C’est tout, vous pouvez maintenant vous connecter à votre site WordPress sur localhost en utilisant le nouveau mot de passe.
Si, pour une raison quelconque, vous avez du mal à suivre la méthode phpMyAdmin, veuillez consulter notre guide sur la création d’un compte administrateur WordPress à l’aide de votre fichier functions.php. Ouvrez simplement le fichier functions.php de votre thème et collez le code de l’article ci-dessus, et vous serez prêt à partir.
Nous espérons que cet article, vous a aidé à apprendre comment réinitialiser le mot de passe administrateur WordPress sur localhost. Vous pouvez également consulter notre guide sur la façon de déplacer WordPress d’un serveur local vers un site direct.
Si vous avez aimé cet article, Veuillez vous abonner à notre chaîne YouTube pour des tutoriels vidéo sur WordPress. Vous pouvez également nous trouver sur Twitter et Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Hafiz Muhammad Ansar says
Very nice blog for WordPress help. I recommend for beginners to use this platform. Thankful!
WPBeginner Support says
Glad you found our article helpful!
Administrateur
Abdullah says
Amazing, it worked
WPBeginner Support says
Glad our guide was helpful!
Administrateur
Nidhi Gupta says
it’s really helpful, thankyou so much
WPBeginner Support says
Glad our guide was helpful!
Administrateur
Habu says
Omg you save my life !!! THANK YOU VERY MUCHH !!!
Jahir says
I can not log in now same process…any updates?
WPBeginner Support says
The most common issue would be if you did not set the function to MD5 or click go to apply the changes, you would want to ensure you have done that correctly.
Administrateur
Kamondo says
Wonderful! problem solved. Very Simple steps but powerful.
WPBeginner Support says
Glad our guide was helpful
Administrateur
Joe says
I’m encoutering this problem now after installing the 2nd WordPress on MAMP. This article is very to the point and I’ll try it tomorrow!
WPBeginner Support says
We hope the guide helps
Administrateur
Gerron says
Solid solid info right here, thanks a lot, really helped, so simple
WPBeginner Support says
Glad our guide was helpful
Administrateur
Odineks says
Thank you so much. I always find solutions to every of my WP problems here.
I kept having problems with the login page on the frontend not recognizing my new password, I didn’t realize there is a function to pass that message to myPHPadmin.
WPBeginner Support says
Glad our guide was helpful
Administrateur
naved ahmed says
Thanks a lot. Finally problem solved within a minute.
WPBeginner Support says
Glad our guide was helpful
Administrateur
Mohsin says
I just love this
Love the way you write every thing
WPBeginner Support says
Thank you, glad you like our content
Administrateur
Jen says
I tried this and while I was in there also attempted to change my username, which I realize was probably my mistake… but now I can’t log in at all. Is there a way to undo what I’ve done?
WPBeginner Support says
You would need to follow the steps in the article and that would bring you back to where you could edit, you should also be able to use your email as an alternative
Administrateur
Justina says
Your Blog is always so full of rich articles. Thanks so much. was stuck for a while because I skip the MD5 option. You are a lifesaver.
WPBeginner Support says
Glad our guide could be helpful
Administrateur
Sarah says
Thank you SO MUCH for this! You saved me so many more hours of tinkering with trying to figure out how to log in!!
WPBeginner Support says
Glad we were able to help
Administrateur
David says
Thank you ever so much! Normally, I keep this stuff handy; but in this case, I did could not find where I wrote the information down.
You saved a total re-work of a site I was planning.
WPBeginner Support says
Glad our guide could be helpful
Administrateur
adeel kamran says
You saved me, I had a lot of work there.
WPBeginner Support says
Glad our guide could help
Administrateur
lokesh n says
thank you it’s really working thank you
WPBeginner Support says
You’re welcome glad our article was helpful
Administrateur
Vivek says
Hi,
When I reset My password through link then what fileds affected in Database and in which table.
Kindly share this information i am waiting for your response.
WPBeginner Support says
For understanding the database you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/
Administrateur
Adnan Khan says
After half an hour of search i just found my help from this site, which solves my problem in no time,
thanks a lot
keep it up guys
WPBeginner Support says
You’re welcome, glad our guides can be helpful
Administrateur
Tenasu Mensah says
thanks a lot, kudos to you guys keep the good work doing,you guys are doing great job
WPBeginner Support says
Glad our guide could help
Administrateur
Anuj says
It work fine, Thanku so much,
Pádraig says
Really simple and great explanation.
Many thanks for sharing.
Saranya says
Works Good! Thanks a lot.
Patr says
Hello,
I type a new password , click continue and it does not keep the password, it shows a long string of numbers and letters. If I use this , still cannot log in. It looks simple on the video but does not work for me. Thank you.
I looked everywhere on the internet, no solution worling.
Jason says
Same problem here. Did you find a solution? Is there any chance of being hacked?
Christian Gochez says
when I click on the Go button this error appears:
#1881 – Operation not allowed when innodb_forced_recovery > 0
Edward says
Simple and neat! worked thanks
Handel says
I started to just reinstall wordpress, but then decided to do a google search, and there was GOOD OLD RELIABLE WpBeginner.com
Thanks a million!!
Sheriff says
very effective… kudos
Icholia says
Hello
THANKS, Wow there is no other place that you can get well explained information like this , i have been suffering but now i just followed your tutorial and it is a game changer i love you guys and i will always learn from you guys once again thanks
CJ says
Thank you! For those who can’t make it work, remember to use the « MD5 » function when changing the password. I almost skipped that part and was stuck for a few minutes.
mohamad hossein says
so use full thank you so much
Janet says
I got completely lost on the video so I tried plugging in the URL. Doesn’t work. Still lost.
Ma says
Thanks so much, you saved me from what could have been a very embarrassing situation!
James says
I change the password, username, userlogin and nickname not I cant login. Any advice?
suganya says
i can’t able to login .because it’s shows me like email is not registered .so what can i do???
Jac says
Thanks so much for providing this info – I was really stuck!
Gerhard SCHNEIBEL says
Thanks a lot for your help. I am very happy with « wpbeginners ».
Renu says
it worked.. thanks a ton..
Anthony says
Hi…
I am so thankful for such great information you provide. I have bookmarked your site a while back.
I have been working on a site in wordpress using xampp on the Apache local server. Just recently, I am not able to login on the admin page. I have managed to create a user name and password that works on about 95% of all sites requiring me to register. I also created a file that lists all my login info for everywhere I need to login, including the WP admin login page, IF I ever forget that info.
I have read this page (https://www.wpbeginner.com/wp-tutorials/how-to-reset-wordpress-admin-password-on-localhost/) and watched the video, also. The only problem is that when I click on the wp_users in phpMyadmin, I get this error- ‘#1932 – Table ‘bitnami_wordpress.wp_users’ doesn’t exist in engine.’
Am I reduced to re-installing WordPress, or is there another way around it?
I have tried restoring my computer (using system restore) to various past restore points, but with no luck. Can you help me with this?
I would be so thankful!!! I have put months of work into designing a site to launch, and I HAVE exported everything to a file quite a few times using WordPress import plugin (something like that).
Could you provide a solution?
Thank you so much…
Anthony
WPBeginner Support says
Hi Anthony,
you can also add an admin user by adding code to your current WordPress theme’s admin file.
Administrateur
Kakaire Charles says
Extremely wonderful. Thank you for sharing.
Gaurav says
i tried this but not working
shaikh muneer says
super way to reset admin password thank you for share this