Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Puchar WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Jak zresetować hasło administratora WordPress na Localhost

Uwaga redakcyjna: Otrzymujemy prowizję z linków partnerskich na WPBeginner. Prowizje nie mają wpływu na opinie i oceny naszych redaktorów. Dowiedz się więcej o Proces redakcyjny.

Niedawno jeden z naszych użytkowników zapytał nas, jak zresetować hasło administratora WordPress na localhost? Jeśli korzystasz z WordPressa na localhost i zapomniałeś swojego hasła, to nie możesz zresetować go przez e-mail. W tym artykule pokażemy, jak zresetować hasło administratora WordPress na localhost.

How to reset WordPress admin password on localhost

Dlaczego resetowanie hasła nie działa na localhost?

Taksonomia localhost jest używana do opisania lokalnego serwera, który nie jest dostępny dla ogółu społeczeństwa. Na przykład: twój komputer osobisty.

Wielu użytkowników WordPressa instaluje go na localhost (w swoim komputerze), aby testować zmiany, projektować witryny internetowe, wypróbowywać nowe wtyczki, a nawet uczyć się WordPressa.

Jeśli jeszcze tego nie próbowałeś, to zobacz nasz poradnik jak zainstalować WordPressa na twoim komputerze z systemem Windows za pomocą WAMP.

Użytkownicy komputerów Mac mogą postępować zgodnie z instrukcjami zawartymi w naszym poradniku, jak zainstalować WordPressa lokalnie na komputerze Mac przy użyciu MAMP.

Teraz pojawia się problem, na który mogą natknąć się niektórzy początkujący.

Jeśli zapomnisz swojego hasła administratora WordPress podczas pracy na lokalnym hoście, NIE będziesz w stanie go zresetować za pomocą zwykłej opcji resetowania hasła w WordPress.

Opcja resetowania hasła wysyła e-mail z odnośnikiem do zresetowania twojego hasła WordPress. Aby wysyłać wiadomości e-mail, twój serwer musi włączać funkcję poczty.

Funkcja ta jest domyślnie wyłączona na serwerach regionalnych, co oznacza, że WordPress nie będzie w stanie wysłać e-maila z resetem hasła.

Ale nie martw się, istnieje sposób na zresetowanie twojego hasła WordPress na serwerze lokalnym.

Gotowy? Zaczynajmy.

Film instruktażowy

Subscribe to WPBeginner

Jeśli nie podoba Ci się film lub potrzebujesz więcej instrukcji, czytaj dalej.

Resetowanie hasła administratora WordPress na hoście lokalnym

Będziemy używać phpMyAdmin do resetowania hasła na localhost. Wystarczy przejść na panel sterowania phpMyAdmin, wpisując ten adres URL w pasku adresu twojej przeglądarki:

http://localhost/phpmyadmin/

Zostaniesz poproszony o podanie twojej nazwy użytkownika i hasła MySQL. Zazwyczaj nazwa użytkownika to root bez hasła.

Po zalogowaniu się, należy wybrać twoją bazę danych WordPress.

Select database

Po wybraniu twojej bazy danych zobaczysz listę tabel w twojej bazie danych WordPress. Kliknij odnośnik przeglądania obok tabeli użytkowników WordPress.

Users table in WordPress database

Zobaczysz teraz listę wpisów w twojej tabeli użytkowników. Liczba wierszy zależy od tego, ilu użytkowników jest zarejestrowanych na twojej witrynie WordPress.

Następnie należy kliknąć odnośnik Edytuj obok nazwy użytkownika administratora.

Browsing users table in WordPress DB

Spowoduje to otwarcie formularza, w którym można edytować informacje przechowywane w bazie danych WordPress dla tego użytkownika.

Changing user password

Przewiń w dół do pola user_pass i wpisz nowe hasło w kolumnie „value”. Następnie należy wybrać MD5 w kolumnie „function”.

Nie zapomnij kliknąć przycisku Go na dole, aby zapisać twoje zmiany.

To wszystko, możesz teraz zalogować się do twojej witryny WordPress na localhost przy użyciu nowego hasła.

Jeśli z jakiegoś powodu masz trudności z zastosowaniem metody phpMyAdmin, zapoznaj się z naszym przewodnikiem na temat tworzenia użytkownika administratora WordPress za pomocą twojego pliku functions.php. Po prostu otwórz plik functions.php twojego motywu i wklej kod z powyższego artykułu, a będziesz gotowy do pracy.

Mamy nadzieję, że ten artykuł pomógł ci dowiedzieć się, jak zresetować hasło administratora WordPress na localhost. Możesz również zapoznać się z naszym przewodnikiem na temat przenoszenia WordPressa z serwera lokalnego na witrynę live.

Jeśli podobał Ci się ten artykuł, zasubskrybuj nasz kanał YouTube, aby zobaczyć poradniki dotyczące filmów WordPress. Możesz nas również znaleźć na Twitterze i Facebooku.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

64 komentarzeZostaw odpowiedź

  1. 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!

    • 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.

      Administrator

  2. 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!

  3. 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.

  4. 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

      Administrator

  5. 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.

  6. 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!!

  7. 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.

  8. 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.

  9. 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

  10. 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.

  11. Christian Gochez says

    when I click on the Go button this error appears:

    #1881 – Operation not allowed when innodb_forced_recovery > 0

  12. 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!!

  13. 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

  14. 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.

  15. 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

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.