0

I am using Magento 2 and my admin panel is loading very slowly, even after switching the store to production mode.

Here is what I have already done:

Set mode to production

php bin/magento deploy:mode:set production

Cleared cache

php bin/magento cache:flush php bin/magento cache:clean

Recompiled code

php bin/magento setup:di:compile

Deployed static content

php bin/magento setup:static-content:deploy -f

Checked server resources (CPU and RAM look normal)

Disabled unused modules

Cleared browser cache

Even after doing all of this, the Magento admin dashboard takes 10–15 seconds to load, and almost every page inside the admin is slow.

Environment details

Magento version: (add your version, e.g., 2.4.6-p3)

PHP version: (e.g., PHP 8.1)

Server: (e.g., Apache/Nginx)

Hosting type: (shared/VPS/dedicated)

Redis: Enabled/Disabled

Elasticsearch/OpenSearch version: (if used)

My questions

What are the common reasons for slow admin performance in production mode?

Is there a way to pinpoint which part of the admin is causing the delay?

Are there specific server-side or Magento-side settings that improve admin speed?

Additional notes

Frontend speed is normal. Only the admin panel is slow.

No recent custom modules were installed.

No large logs or error messages found.

New contributor
Shine Dezign Infonet is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

0

Here are my answers to your questions:

  1. What are the common reasons for slow admin performance in production mode?

The number one reason from my experience is a poorly coded 3rd-party extension.

  1. Is there a way to pinpoint which part of the admin is causing the delay?

Yes:

  • Enable the Magento 2 built-in profiler by running the follow CLI:

    php bin/magento dev:profiler:enable

    Go to any slow admin page and you will see an output on the frontend like this one: enter image description here

    Look at the Time column and inspect entries with biggest times.

    To turn the profiler off run:

    php bin/magento dev:profiler:enable

  • You can also use one of the PHP profilers. I have to admit it's easier to use and it gives better results. Just google for online PHP profilers. It will show you a diagram like this one: enter image description here

    Here it points you to a specific function that takes too much time.

  • Try turning off 3rd-party modules one by one and see if it makes any difference.

  1. Are there specific server-side or Magento-side settings that improve admin speed?

You can try:

  • Adding more RAM and CPU cores

  • Allocating more RAM to DB:

    innodb_buffer_pool_size = 15G

    innodb_log_file_size = 2G

  • If you use MariaDB try these specific settings:

    optimizer_switch=rowid_filter=off

    optimizer_use_condition_selectivity=1

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.