If you are not able to login to your PrestaShop back office panel and you are unable to retrieve your password via email, than this tutorial is for you. We will show you how to change PrestaShop password in few steps. This operation will require access via ftp and database. This tutorial is based on PrestaShop 1.6
First step is to login by ftp client. After you will have access to files on your server, find catalog where your PrestaShop is installed. Search for a file located in config/settings.inc.php
Open settings.inc.php file by any text editor like notepad or any code editor. Find '_COOKIE_KEY_' value and copy content after the coma. I.e. From this line of code: define('_COOKIE_KEY_', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');, copy x letters. We will also need values of _DB_USER_ and _DB_PASSWD_ which will be used to login to database. You can copy this values or just leave the document opened for later.
Next step is to get database application url. We will use phpmyadmin, which is often localized in url: www.your_domain.com/phpmyadmin. If you are unable to see phpmyadmin login page, try to find it in hosting panel or in server documentation.
When you have correct phpmyadmin url, copy/paste login data that we have wrote about earlier in this tutorial (_DB_USER_ i _DB_PASSWD_)
When you've successfully logged in, click plus or database name that your PrestaShop uses (_DB_NAME_ in settings.inc.php file) and find ps_employee table. Ps_ is a prefix that can be different for your PrestaShop. ps_employee table is usually on the second page in the left column list.
Click on table mentioned earlier. In the right window you should be able to see detailed table information. Now, in “browser” mode (tab), click “edit” next to a user row which you want to edit (edit link may vary on phpmayadmin version). Obviously you want to edit user with en email that you wanted to log in to PrestaShop.
In edit mode, in password row (passwd) choose md5 from functions column. Just like in image below:
In input field next to it, copy and paste value from _COOKIE_KEY_ (settings.inc.php) with a new password (without any spaces). In example, when we choose password like PASSWORD (obviously just for demonstration usage), the whole string to insert will be: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPASSWORD
Save the form by clicking „Go” button in the bottom of a screen. Field in table will change to a coded value.
Go back to PrestaShop login panel, and re type email and a new password (in our case PASSWORD). You should be able to pass validation.