If you’re like me and you tried the “lost password” link on prestashop’s backend and never received the email, you might try this solution if you have access to the database.  Look in config/settings.inc.php for the _COOKIE_KEY_ as you’ll need that. Run the following SQL and replace the <> variables with your information.

UPDATE employee SET passwd = md5(”<_COOKIE_KEY_><yourNewPassword>”) WHERE email = “youremailaddress”;

hope that helps

credit: nickbartlett.com

Related Posts

18 Comments to “Reset admin password in prestashop”

  1. szworker | July 31st, 2009 at 11:14 pm

    thank you very much. ขอบคุณมากๆครับ
    I have problem when I upload prestashop from localhost to web hosting. Thank for solving my problem

  2. drub | August 15th, 2009 at 6:52 am

    Thank you, Nick. Simple solution.

    One note, there is no space between and . Be sure to enter it *precisely* as Nick’s instructions specify.

    Don’t ask me how I know this! ;-)
    Worked great. 8-)

  3. drub | August 15th, 2009 at 7:27 am

    Well, in my previous post, the site thought I was entering HTML in this comment field. This time I won’t use angle brackets.

    I was talking about the _COOKIE_KEY_ value and the yourNewPassword value. Don’t add a space between the two.

  4. Chakkit | August 15th, 2009 at 7:30 pm


    Yes, there is no space between _COOKIE_KEY_ and yourNewPassword. For example,

    UPDATE employee SET passwd = md5(”VRKEZbXzP7Uo5nV1CJTPnwJjvIX7knoRD1b884IB11pMnHobfuNShnMWMyNewPassword”) WHERE email = “myemail@example.com”;

    Note: VRKEZbXzP7Uo5nV1CJTPnwJjvIX7knoRD1b884IB11pMnHobfuNShnMW is the value of _COOKIE_KEY_

  5. teosanchez | October 9th, 2009 at 5:38 pm


    I want to install a prestahop site from my local computer to de host and i have the same problem.

    I have tried regenerate the password like you explain
    but with this technique i can’t log with te admin user.

    Please help

    Thank in advance

  6. Chakkit | October 9th, 2009 at 7:51 pm


    Firstly, checking employee table in your database, see whether the email is the same as your command.

    If email is matched, passwd column should be changed as per your command.

  7. Adarro | November 17th, 2009 at 5:45 am

    @teosanchez Not sure if you ever got this to work or not, it had originally failed for me too. I’m can’t remember what the limitations for the password are in Prestashop, but I had a ’special character’ in mine and the script didn’t work. Once I removed it (kept to [a-z0-9] and re-ran the example from the post, it worked fine.

  8. firman | December 4th, 2009 at 9:58 am

    i am using prestasop which uses mysql 5; I do things like

    UPDATE employee SET passwd = md5(’5FoJoH7nzcojFLibXgCEubxWcwANa3CEAVecYImy3nFC0NOU5QMG3pvn’) WHERE email = ‘youremail@hotmale.com’;

    it depends on your mysql server, please read your mysql server manual

  9. miff | December 16th, 2009 at 12:43 am

    many thanks, you saved my live THANKS

  10. johny | June 7th, 2010 at 6:47 pm

    i have installed prestashop.

    i import database from other website.

    the admin login is not working.
    i change the password using the mentiond command but still not working.

    UPDATE ps_employee SET passwd = md5(”VRKEZbXzP7Uo5nV1CJTPnwJjvIX7knoRD1b884IB11pMnHobfuNShnMWMy123456”) WHERE email = “waqar.pk2108@gmail.com”;

    i set the password 123456 but not working.

    tell me the problem

  11. john | June 30th, 2010 at 4:55 pm

    This is a response to johny’s post
    You should try to set the password length to 8 characteres or longer because prestashop has a restriction on this.

  12. Goksel | August 26th, 2010 at 3:21 am

    Maybe you can try it to window echo or print forexample print $pwd;

  13. Jewelry Cufflinks | September 8th, 2010 at 10:19 am

    Your way to help me solve the problem, thank you

  14. Josuito | November 10th, 2010 at 11:48 am

    Thanks man, you save me a lot of time…

  15. Nigel Minchin | December 9th, 2010 at 6:08 pm


    I used

    UPDATE employee SET passwd = md5(’FPYLIg5KJ1b94m2dayvVcubWZbVe5OEq4nwnJI2xj8g3nAW1GC1y5KTwMyPassword’) WHERE email = ‘nigel@example.co.uk’;

    and it worked fine. Need single quotes and ps_employee for the table.

    thanks for the ifo!!


  16. Phil Coombs | December 31st, 2010 at 3:14 am

    Hi all, played around for ages the other night and for me this worked.

    UPDATE `YourMySqlDatabaseName`.`ps_employee` SET `passwd` = MD5(’HereYourCookieKeyAndPasswordWithNoSpaces’) WHERE `ps_employee`.`id_employee` = 1;

  17. Sale Generators | March 10th, 2011 at 11:31 am

    Simple way.

    1. Create a new customer
    2. Copy the customer password to your admin password field
    3. Done

  18. menesbatto | September 27th, 2011 at 1:25 am

    UPDATE theproxymaker.ps_employee SET `passwd` = MD5(”rRcaSOfYPiFd1i3OwZRyPExZucGpoDBYQjWsNzHVOqKP0tvqWBRo7BHVsuppaman123″) WHERE `ps_employee`.`id_employee` = 1;
    in this my it works

Leave a Comment

You must be logged in to post a comment.

Copyright © 2008 iBiz Network Co., Ltd. Powered by wordpress, Theme by ericulous