Reset admin password in prestashop 50

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/ for the _COOKIE_KEY_ value as you’ll need that. Run the following SQL and replace the <> variables with your information.

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

hope that helps

Leave a Comment

Your email address will not be published. Required fields are marked *

50 thoughts on “Reset admin password in prestashop

  • Reply

    sir….your tips didn’t work for me. do you have another tips for me to reset my password for localhost installation….please help me. Thanks

  • Reply

    With a few modifications this worked for me

    UPDATE ps_employee SET passwd = md5(‘Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) WHERE email =’’

    The new password being “admin” which can be seen at the very end of the md5 checksum… Notice that single quotes are used instead of double quotes as in the first example…

    • Reply

      Mysql function error occor. By now change that into some modification.

      Goto Config->setting.clss.php->to copy the cookies define(‘_COOKIE_KEY_’, ‘V4fXRyJTKR5t2HLvIUIjiEQgmHuyA7JRwz1VsYEqVcffkhs77rWgcfPN’);

      Then edit the ps_employee table of passwd in mode of md5

  • Reply

    Thank .. Soooo much for your useful PASSWORD SURVIVAL tip. Great 🙂 and I wana tell Citra Pls.. Don’t copy ..
    md5(’Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) WHERE email =’’
    and change only cookies and email,You must change all symbol ( ‘ ) in SQL statement before execute your SQL code too. It’s should work great…Thank again.

  • Reply

    well i do not understand where to put the sentences you mentioned.

    I allready see a cookiekey in I also seen by DB password.
    Should i put the words at the end?
    please let me know

  • Reply

    it worked for me when i was do that:

    UPDATE ps_employee SET passwd = md5(“Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin”) WHERE email =”my@mail”

    (change of coarse the MD5 and the admin at the end to your settings)

    thanks man! you saved me!

  • Reply

    The other way to change the password that works is:

    1) Register yourself on your store with the password that you want to be the admin password.

    2) Goto PhpMyAdmin >> Customer >> copy the password key from user ID you just registered.

    3) Goto PhpMyAdmin >> Employee >> paste the copied key on the password column of your admin ID.
    Ofcourse these are encrypted so you should not change anything while you copy paste.

    Thats it 🙂

    This trick works on most of the online softwares

    all the best!

  • Reply

    You can try loggind in to the database and look for the table named ex. “ps_employee” without quotes and view it in some interface, in my case I used phpMyAdmin.
    Then, you can see your password encrypted in md5, so using Google for example, if you cannot encode yourself with other methods, you can use an online md5 encoder for example to make your new password “test” usable untill you can log in as administrator and cheange it to the one you wish.
    Using this kind of encoder I made the password “test” to look like this “098f6bcd4621d373cade4e832627b4f6”. You can use this one to login as password untill you change it.
    Good luck!

  • Reply

    I cant make it work!, it doesnt work even bu running

    UPDATE ps_employee SET passwd = md5(Ak7HcvPQd2VLPRrMF2BW8s7AxPe43kOL0f5zY5BDTqb0YquGLxBCcMysadmin’) where email = ‘’

    also tried other passwords by copying password from a customer account, and didnt work. Even I tried with other employee account and i cant login, always get

    Error: employee does not exist, or bad password

    The smtp also seems not to be configured properly, and i cant get in to configure. Any help will be appreciated.


  • Reply

    Sorry, but i didnt mention that now it seems to work, but it redirects to the login page, without any “employee does not exist, or bad password” error. What could that be the problem?

  • Reply
    Char Bennett

    Thank you for the php instructions – but im stuck on part 2. ” Goto PhpMyAdmin >> Employee >> paste the copied key on the password column of your admin ID.”

    I can not figure out where to go for this. If anyone can send me a little more detail I would truly appreciate it!

    • Reply

      can’t find it either. Is everyone here a genius or am I just stupid? Can’t find the files ‘customer’ and ’employee’, and I don’t understand anything of the first explanation of nick. What do you do when you ‘run an sql’? Please give some explanation for dummies, I really need it!!

  • Reply

    please help me! I have prestashop installed locally, lost the admin password, but I really know NOTHING at all about sqls and stuff.

    Is there anyone who can explain step by step:
    1 which files I should open?
    2 where these files are located (my files are on D:/xampp/… and where do I look then?)
    3 which text I need to delete and which text I need to replace it with?


  • Reply

    Hi all,
    I was trying to change the db pass for like 20 mins, when it hit me.
    For those that the SQL produces an error, just retype the double quotes and the query will execute just fine. The problem is that when you copy paste the query from here, directly to phpmyadmin, the double quotes are not recognized by it and it produces an error.