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

Så här återställer du ett WordPress password från phpMyAdmin

Att återställa ditt WordPress-lösenord är vanligtvis en okomplicerad process. Ibland fungerar dock inte standardmetoderna, vilket gör att du blir utelåst från din webbplats.

Några av våra läsare har stött på detta problem och bett oss om råd om hur de bäst kommer åt sina konton. Lyckligtvis kan du alltid använda phpMyAdmin-verktyget i ditt hostingkontos kontrollpanel för att direkt återställa ditt lösenord från WordPress-databasen.

I den här artikeln visar vi dig hur du enkelt återställer ett WordPress-lösenord från phpMyAdmin. Vi förklarar varje steg tydligt, så att även du som inte är bekant med databaser kan följa med på ett säkert sätt.

How to Reset a WordPress Password from phpMyAdmin

Varför återställa ett WordPress password från phpMyAdmin?

WordPress gör det superenkelt att återskapa ett förlorat password.

Du kan helt enkelt gå till vyn för login på din website i WordPress och klicka på länken ”Lost your password?”.

Click on 'Lost Your Password?'

När du klickar på länken kommer du till sidan för återställning av password. När du har enter ditt användarnamn eller din email address kommer WordPress att skicka en länk för återställning av password till den associerade email addressen.

Men om du inte har tillgång till den email addressen, eller om din WordPress site Misslyckas med att skicka ett email, kommer du inte att kunna återställa ditt password.

I en sådan situation måste du återställa ditt WordPress password direkt i databasen. Det enklaste sättet att göra det är att använda phpMyAdmin.

Med det sagt, låt oss se hur du enkelt kan återställa ett WordPress password från phpMyAdmin.

Så här återställer du ett password för WordPress från phpMyAdmin

Subscribe to WPBeginner

Om du inte vill titta på tutorialen på video, kan du fortsätta att läsa textversionen under.

Först måste du logga in på cPanel-instrumentpanelen på ditt WordPress webbhotell konto. Därefter måste du navigera till sektionen Databases där du kan klicka på phpMyAdmin-ikonen.

phpmyadmin panel in Bluehost

Detta startar phpMyAdmin-appen.

Här måste du välja din WordPress database från den vänstra rutan.

Select Your WordPress Database

Du kommer nu att se listan över tabeller i din WordPress database.

You need to look for the wp_users table in this list and click on the ’Browse’ link next to it.

Click the wp_users Browse Link

Note: Tabellnamn i din WordPress-databas kan ha ett annat prefix än det vi visar i vår screenshot. Om du ändrar tabellprefix kan du förbättra säkerheten på din site i WordPress.

You will now see the rows in your WordPress users table. Gå vidare och klicka på knappen edit bredvid användarnamnet vars password du vill ändra.

Click the Edit Button Next to the Username

PhpMyAdmin kommer att visa dig ett formulär med alla fält för information om användaren.

You will need to delete the value in the user_pass field and replace it with your new password. Under function column väljer du MD5 i rullgardinsmenyn och klickar sedan på knappen Go längst ner i formuläret.

Select MD5 and Type Your New Password

Your password kommer att krypteras med hjälp av MD5-hash och sedan lagras i databasen.

Vi gratulerar dig! Du har utan problem ändrat ditt WordPress password med hjälp av phpMyAdmin.

Några av er kanske undrar varför vi valde MD5-hash för att kryptera password. WordPress använde tidigare MD5-hash för att kryptera lösenord, men sedan WordPress 2.5 har det använts starkare krypteringstekniker.

WordPress känner dock fortfarande igen MD5 för att tillhandahålla bakåtkompatibilitet. Så snart du loggar in med en password string som är lagrad som en MD5-hash, kommer WordPress automatiskt att ändra den till att använda de nyare krypteringsalgoritmerna.

Expertguider om lösenord i WordPress

Nu när du vet hur du återställer ett WordPress-lösenord från phpMyAdmin kanske du vill läsa några andra artiklar relaterade till lösenord i WordPress.

Vi hoppas att denna tutorial hjälpte dig att lära dig hur du återställer ett WordPress password från phpMyAdmin. You may also want to see our ultimate step-by-step WordPress security guide to keep your WordPress site safe or our expert pick of must-have plugins.

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

289 kommentarerLämna ett svar

  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!

  2. Jiří Vaněk says

    The method using PHPmyAdmin is great, and I use it when I have access to the database and don’t want to change the current user’s password. Personally, I have a slightly different approach: I first create a hash using an online tool and then change only the hash in the database to mine. The advantage is that after finishing the work, I can revert to the original hash, so I don’t have to change the current user’s password.

  3. Prescott Chartier says

    I’ve tried this several times and each time it still says the password is incorrect, and yes I have the correct database.

    • WPBeginner Support says

      The next thing to check would be that the MD5 action is properly going through in your database or if it gives you an error.

      Administratör

    • Jiří Vaněk says

      Alternatively, there are also online hash generation tools. You enter your password in them and they generate a hash for you. Then just try replacing the original hash with the generated one and use the new password to log in. It should work (I’ve tried it this way).

  4. Moinuddin Waheed says

    Changing password by clicking lost or forget password and then getting an email is an easy step.
    Using phpmyadmin for changing password is a bit developer oriented.
    I have used while developing sites from local host by flywheel but I fear doing for the live server.
    Do we have the same encryption after changing password as it was before or it is simply the hard coded text that we typed in as password?

    • WPBeginner Support says

      If you are using the phpMyAdmin method you would want to put in your password normally and in the function dropdown you would set it to MD5 to have the password be the text you placed in the field.

      Administratör

  5. Branson says

    Hi,

    I have just tried to reset my password with the MD5 method you suggested, but it didn’t work. I tried like 5 times and every time I tried to login into my website it would say incorrect password. What’s wrong?

    Thanks in advance.

    • WPBeginner Support says

      If you have more than one WordPress installation on your hosting provider, ensure you are editing the correct database and ensure you apply the changes in the database for the most common reasons.

      Administratör

  6. Stem says

    Hello,

    I tried to reset my password using this method, but it’s showing this error ”Error: The username user is not registered on this site. If you are unsure of your username, try your email address instead.”

    • WPBeginner Support says

      That would normally mean your username is not on the site, you would want to ensure are logging in with the correct username or email address. The steps in this article should not affect your username or email.

      Administratör

  7. blossominglotus says

    This method is not working for me. I even tried updating the password using raw SQL. It does change the password but I still cannot log in with the new password.

    • WPBeginner Support says

      If this method is not working then we would recommend reaching out to your hosting provider and/or checking that you are editing the correct database on your hosting provider if you have more than one database.

      Administratör

  8. Guillaume Frasca says

    Hi, I followed your advice, but when I click on Go, I have the #1142 error message ”UPDATE command denied to user ’scienceisa431’@’@XX.XX.XX.X’ for table ’mod597_users’
    Is there a way around this?

    • WPBeginner Support says

      Your user may not have proper access on your hosting environment, if you reach out to your hosting provider they should be able to assist!

      Administratör

  9. NS says

    Thanks! The ”MD5” encryption step is what I was missing when I tried to reset. Then I came across your article and tried it and it worked! You just saved me hours and hours of time and a potentially angry client.

    • WPBeginner Support says

      If your changes are not staying, you would likely want to check with your hosting provider to ensure you’re not running into a security tool blocking your change. Another common issue would be if you have a staging site or an old database for a previous site so you would want to ensure you are changing the information for your correct site.

      Administratör

    • WPBeginner Support says

      It would depend on what part didn’t work. The most common reasons would be if you did not save your changes or did not convert to MD5

      Administratör

  10. John says

    Perfect – saved me from a big issue.. thanks! Now, about getting those WP system emails working again…………….!

    • WPBeginner Support says

      You may want to ensure you set the password to MD5 and that you are editing the correct user file if you have multiple WordPress sites or users

      Administratör

  11. Taylor says

    I have followed these steps and the password was generated however, whenever I put in the password it still says it is incorrect.

    Any help you can provide ?

    • WPBeginner Support says

      You would want to double-check that you encrypted the password using MD5 as the most common reason

      Administratör

  12. Hazel Pan says

    Thank you for this noob-friendly guide! I was able to understand how to fix my issue right away. It also helped that I had awesome support from my hosting provider, Namecheap.

  13. Umar Gondal says

    May Allah bless you with eman. This article helped me to reset password of my website. Very informative article

  14. Ajit Kumar says

    The email could not be sent. Possible reason: your host may have disabled the mail() function.

    error shows

    • WPBeginner Support says

      If you have that error on your site, you would want to start by reaching out to your hosting provider.

      Administratör

  15. George says

    Great article, I can see how this ”can” work, but didn’t work for us either!!!!! We have access to the registrar, access to the domain and web hosting, full access to file manager, phpMyAdmin and the Installatron.

    Followed your instructions to the T, didn’t work. We even changed the email in the email field. Its like the script didn’t update.

    • WPBeginner Support says

      If this method didn’t work then you likely need to reach out to your hosting provider and your host should be able to assist in fixing this issue.

      Administratör

  16. Van says

    This didn’t work for me. I’ve tried changing my password via my profile in WP Admin and using this technique; neither worked. WordPress 5 bug?

    • WPBeginner Support says

      You may want to clear your cache on your site and browser and check with your hosting provider that they are not preventing changes to your site’s database.

      Administratör

    • WPBeginner Support says

      If this method does not work, if you reach out to your hosting provider they should be able to help you log back into your site.

      Administratör

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.