From the blog

Why is my PrestaShop back office slow when the shop itself loads fine?

Your shop can be fast while the PrestaShop admin crawls, because visitors usually get cached pages and the back office is built fresh every time. This post covers how to time the slow screens, what each pattern points to, and how to fix it without breaking a live store.

Why is my PrestaShop back office slow when the shop itself loads fine?

The shop and the back office are built in different ways. Your customers usually get pages that were prepared earlier and kept ready in a cache. Every screen in the back office is built from scratch for you, with live database queries, every module that attaches itself to admin pages, and sometimes calls to outside servers. A fast shop with a slow admin usually means one of two things. Either the server is weaker than the cached shop makes it look, or something that only runs in the admin is doing heavy work: dashboard statistics, a module, a request to PrestaShop's own servers, or a product with a large number of combinations.

Why the shop can be quick while the admin crawls

A cache is a stored copy of something that took effort to make. When a visitor opens a category page, PrestaShop, a caching module or the hosting itself can often send a copy it built a few minutes earlier, so very little has to be calculated. A speed test on the home page measures that copy.

The back office gets no such help, because what you see there changes all the time and depends on who is logged in. The order list has to show orders that arrived a minute ago. The dashboard has to add up today's sales. So a fast home page tells you little about how strong your hosting is. The fairer comparison is the part of the shop that also can't be cached: the cart, the checkout and the search results. If those are slow as well, the problem is not only in the admin. Our post on why a PrestaShop store is slow covers that side.

Time five screens before you change anything

Before you clear caches or switch modules off, write down how long a few screens take. Use a phone stopwatch, log in fresh, and open each screen twice, because the first load after login does extra work.

  1. The dashboard, the first screen after login.
  2. The order list.
  3. One ordinary order opened from that list.
  4. Your biggest product, the one with the most sizes, colours or other combinations, opened for editing.
  5. The Modules page.

Then do one search in the shop and add something to the cart, and time those too. Keep the figures, because you will time the same screens again after every change you make.

If you are comfortable with the browser's developer tools, they help as well. In Chrome, press F12, open the Network tab and reload the slow page. The first line is the page itself. If that one line takes most of the time, the server is slow to build it. If the page arrives quickly but the browser keeps loading, look for a line pointing to another website that stays pending for a long time.

When every admin page is slow

If every screen waits about the same few seconds, and the shop's search and cart are slow too, look at the hosting and at settings that affect the whole system. Shared hosting often limits how much processor time one account gets. A cached shop rarely hits those limits. A busy back office can. The same happens when PrestaShop shares an account with other sites, or when the PHP version, memory limit or database settings are left at defaults that suit a small blog.

Two settings in PrestaShop itself are worth a look, under Advanced Parameters, Performance. Debug mode should be off on a live shop, because it makes every page slower and shows error details to anyone. Template compilation should not be set to force compilation, which makes PrestaShop rebuild its templates on every single page. People often switch both on during a fix and then forget them. A page cache in the shop hides the damage, but the admin feels all of it.

If the settings are right and the shop's uncached pages are fine, but every admin page is still slow, suspect a module. Some modules hook into every back office page to load their own scripts, check their licence or show a notice. One heavy module can slow down every screen you open.

When it is mostly the dashboard

If the dashboard is slow and the order list opens quickly, the cause is often statistics, though another dashboard widget or module, an overloaded database or a slow outside request can do the same. The dashboard widgets add up sales, visits, carts and conversion figures, and the statistics modules record every visit in database tables that often never get cleaned out. On an older store these tables can become far bigger than the tables holding your actual orders. For whoever does the work, these are tables such as connections, connections_source, guest and pagenotfound, with your store's table prefix in front.

There are two fixes. You can switch off the dashboard widgets you never look at. Or a developer can empty or trim the old visit records after taking a full database backup. Trimming means you lose old visit statistics. Your orders, customers and products stay as they are. If you read visitor numbers in Google Analytics anyway, we think PrestaShop's own visit tracking is often not worth keeping.

The notification bubbles at the top of the admin, the counters for new orders, customers and messages, also check the database regularly. With a large customer-message history they can feel slow. You can switch them off in the Administration settings under Advanced Parameters.

When one product takes ages to open

A product with a very large number of combinations is heavy to edit. The older product page loads every combination, with its prices, stock and images, all at once, and the browser then has to draw all of it. On some stores the tab freezes for a long time. If only your big products are slow and ordinary ones open quickly, this is the reason. More server power helps a little. Changing how the catalogue is built helps more.

Newer PrestaShop versions have a rebuilt product page that handles combinations differently, which is one more reason to plan the move if you are still on 1.6 or 1.7 (see upgrading PrestaShop 1.6 to 8.x). Fashion stores hit this more than most. Our post on PrestaShop for fashion covers how to set up variants so one product does not carry hundreds of them.

When pages hang waiting for somebody else's server

If the first page after login or the Modules page is slow, and in the Network tab a request to an outside address sits pending until it gives up, the back office is waiting for another server. PrestaShop's admin contacts the official module marketplace for the catalogue, update checks and news, and some paid modules contact their makers to check the licence. If that server is slow, or your hosting blocks outgoing connections, your page waits until the request times out.

Forum answers to this often suggest editing a core PrestaShop file to shorten the wait. We would not do it. The next upgrade overwrites the change, and the real problem is still there. Find which request hangs, then either allow the connection on the server or deal with the module that makes the call.

What the waiting costs you, in your own numbers

A slow admin is easy to put up with because each wait is short. Use your stopwatch figures to see what they add up to. Count how many back office screens you and your staff open on a normal day. Handling one order often means three or four: the list, the order, the customer, maybe the invoice. Multiply that by the extra seconds per screen, then divide by 3,600. The result is hours lost per day. Multiply it by your working days and by what an hour of that person's time costs you.

Then compare that yearly figure with a quote for better hosting or for the developer's hours the fix would take. If you want someone else to find the cause, our post on what a PrestaShop store costs explains where an audit fits.

Fixing it without breaking the shop

Most of these fixes are small, but they touch a live store, so do them in this order.

  1. Make a full backup of the files and the database, and check that it can be restored.
  2. Work on a staging copy (a private copy of the store on the same kind of hosting) for anything beyond the Performance settings.
  3. Change one thing at a time and time the same five screens again after each change.
  4. When testing modules, disable them. Don't uninstall. Uninstalling often deletes the module's settings and its data, such as reviews, loyalty points or shipping rules. Disabling keeps them.
  5. Clean the statistics tables only after the backup, and only if you are willing to lose old visit history.
  6. Write down what you changed, so the next person does not switch debug mode back on.

If the admin got slow gradually, with no new module or upgrade you can point to, that usually points to tables that keep growing and updates that stopped being done. Our post on what happens to a website nobody maintains describes how that builds up. If the admin is slow mainly at certain hours, check what is scheduled to run then. Imports, feed exports and email jobs often run overnight or on a timer. If a job like that is still running when your staff start work, move it to an earlier time or have it split into smaller batches.

Want a website you never have to think about? See the plans.

← All posts