Cannot log into the PrestaShop back office: what is going on and how to get back in

Cannot log into the PrestaShop back office

Being locked out of your own shop’s back office is one of the silliest and most expensive scares there is: the shop keeps selling, but you cannot see orders, change a price or reply to a customer. The good news is that it is almost never serious. The bad news is that “I cannot log in” is really five different problems, and what fixes one makes another worse. Changing the password by hand when the fault is the cookie achieves nothing. And going into the database when the problem is that you do not remember the admin URL is asking for trouble for no reason.

Below you have how to tell which of the five is yours and what to do in each case.

What is happening to you: the five cases

What you see What it usually is Where it gets fixed
You do not remember the admin URL, or the usual one returns a 404 The admin folder has its own name and you do not have it written down On the hosting, looking at the shop’s folders
“The employee does not exist, or the password provided is incorrect” Wrong password or email, or the employee is disabled With “Forgot your password?” or from the database
You click “Forgot your password?” and nothing arrives The shop is not sending email, or the employee’s email address no longer exists In the email settings or in the database
You enter the right details and end up back on the same login screen The cookie is not being saved: domain, HTTPS or IP In the shop or browser settings
“Invalid token” You opened an admin link from outside, without the session Nothing is broken. You click a button
Blank screen or 500 error when logging in A PHP error, almost always a module In the server logs
Five reasons why you cannot log into the PrestaShop back office
Not being able to log in is five different problems, and each one is fixed in a different place.

If you also see something odd, such as an employee you do not recognise, a password someone changed without telling you or reset emails you did not request, stop here and go to what to do if your PrestaShop has been hacked. There, the order matters.

Is this happening to you right now?

Leave us the URL and what you are seeing. A technician will look at it today and tell you what it is before touching anything.

We reply within 24 working hours.

You do not know the admin URL

When PrestaShop is installed, the admin folder is not called admin: it gets its own name, with letters and numbers, so it is not easy to guess. If nobody wrote it down, or a previous agency changed it, there is no way to work it out from the shop.

You find it in your hosting’s file manager, or over FTP: in the shop’s root folder, it is the only folder with a name you do not recognise next to app, classes, config, img, modules, themes and the rest. The admin URL is your domain followed by that folder’s name.

Save it in a password manager. And do not rename it to admin to remember it more easily: it is the first address bots try.

The password does not work

First, the normal route: on the login screen, “Forgot your password?”, and enter the employee’s email. An email arrives with a link to create a new password (recover your admin password, PrestaShop).

Two things make it look like it is not working when it is:

  1. PrestaShop limits how often you can request a new password. If you already asked for one recently, it will tell you to wait. It is a protection, not a fault.
  2. The email lands in spam, or never arrives because the shop is not sending email. If your customers are not getting order emails either, that is the problem, and we explain it in PrestaShop not sending order emails.

The password reset email never arrives

This is where people go into the database and change the password by hand. It can be done, but there is a catch: depending on the PrestaShop version, the password is stored encrypted in one way or another, and if it is written with the wrong method, it does not work or stops working after an upgrade.

There are two safer routes:

  1. The one PrestaShop suggests. In the database, in the employee table (ps_employee, with your shop’s prefix), find an administrator, profile 1, and duplicate that row with an email address you do have access to, instead of changing the original. Then, on the login screen, request “Forgot your password?” with that email (recover your admin password, PrestaShop). That way no password is touched by hand. For it to work, the shop has to be sending email.
  2. In PrestaShop 9, from the server console. There is a command to change an employee’s password without going through email or the database (change an employee’s password, PrestaShop 9). It needs terminal access to the server, which many shared hosting plans do not have.

Once you are back in, in Advanced Parameters > Team, delete the duplicate employee if you created one, check that every employee there belongs to someone, and change the administrator’s email to one you will not lose.

Getting back into the PrestaShop back office when the email does not arrive
Duplicate an administrator with your own email and request a new password, without typing it by hand.

You log in and end up back on the login screen

You enter the email and password correctly, the page reloads and you are out again. It is not the password: it is that the session cookie is not being saved, and without the cookie, PrestaShop does not know you have just logged in.

The usual causes:

  • You are logging in from a different address from the shop’s. With or without www, or with http instead of https. The cookie belongs to one domain, and if the admin panel redirects to the other, it is lost. Log in using exactly the address the shop is configured with.
  • The shop has HTTPS half switched on, or the certificate has expired. The browser will not save a secure cookie on a connection that is not secure.
  • Your IP changes while you browse. In Advanced Parameters > Administration there is an option that checks the cookie comes from the same IP it was created with (administration, PrestaShop 8). With some mobile connections, VPNs or company networks, the IP changes and you get thrown out. If it always happens on the same network, this is it.
  • The browser is blocking cookies, because of an extension or the settings. Try a private window with no extensions or another browser. If you can log in there, the problem is your browser, not the shop.

“Invalid token”

This message is alarming and means nothing bad. PrestaShop adds a security key to every admin link. If you open an admin link from an email, an old bookmark or someone else’s message, the key does not match your session and PrestaShop warns you: it says that accessing that link directly may be a risk and asks whether you want to display the page.

If you opened the link yourself and know where it came from, click that you understand the risks and carry on. If it came from someone you do not know, get out of there: that is exactly what the warning is for.

Blank screen or 500 error when logging in

If the admin panel does not load, or returns a 500 error right after entering the password, it is not an access problem: it is a PHP error, almost always from a module that hooks into the admin panel or from a recent change on the server. We explain it step by step in how to find the cause of a PrestaShop 500 error.

In what order to check a PrestaShop back office access problem
From the quickest to the one that needs someone technical.

What changes when it is done properly

Getting access back properly leaves three things sorted that were not before: the admin URL saved somewhere safe, an administrator email that will not get lost, and the certainty that the shop only has employees you know. It is the difference between getting back in and being able to relax.

What gets sorted out when you get PrestaShop access back properly
Admin URL saved, an administrator email that will not get lost and employees reviewed.

What breaks if you get it wrong

  • Changing the password in the database with an encryption method that is not your version’s. You cannot log in, and if you can, it may stop working after an upgrade.
  • Renaming the admin folder to admin to remember it. You make the bots’ job easier.
  • Switching off the token or IP security check for good because it annoys you. They are protections for the admin panel.
  • Creating a new employee in the database by hand, writing the row from scratch. It lacks permissions and data, and causes strange errors later.
  • Requesting a new password ten times in a row. Each time you restart the wait.

When you cannot do this yourself

Finding the folder, requesting a new password, trying another browser or clicking the token button you can do yourself. Duplicating an employee in the database, going in through the server console, fixing HTTPS or finding the module that brings the panel down, not unless you know what you are doing. That is part of our PrestaShop maintenance service (in Spanish): the shop’s logins stored and reviewed, emails working and a same-day response when someone gets locked out.

Is this happening to you right now?

Leave us the URL and what you are seeing. A technician will look at it today and tell you what it is before touching anything.

We reply within 24 working hours.

Frequently asked questions

How do I find the PrestaShop back office URL?

PrestaShop renames the admin folder when it is installed, for security. You find it by looking at the shop’s folders on the server: it is the one with a name like admin followed by letters and numbers.

What do I do if the password reset email does not arrive?

Check the spam folder and the shop’s email settings. If the shop is not sending email, the password can be changed directly in the database, carefully and with a backup first, or you can ask someone technical to do it.

Why does PrestaShop send me back to the login screen after logging in?

It is usually a problem with the session cookies: the configured domain does not match the one you are using, the shop mixes http and https, or the server time is wrong. A server cache on the admin folder can also play a part.

What does “invalid token” mean in PrestaShop?

It is a back office protection against tampered links. It usually appears when opening a saved link or when the session has expired. Logging in again from the panel is normally enough; if it happens every time, the cookies and session settings need checking.