Magento – Magento 2.2 runs super slow on frontend and backend using MAMP localhost

magento2

I install Magento 2 on MAMP Localhost on Mac but I don't know why It runs really slow on frontend and backend even I did turn on Varnish cache, minify CSS and JS, turn magento to developing mode and change php memory_limit to 1G. Can you guys please help? Here is my configuration:

Macbook Air 2015:
– CPU: i5 1.6GHz
– Memory: 8GB
– SSD: 128GB

MAMP:
– php: 7.0.22
– MySQL: 5.6.35

Best Answer

The following steps should help your speed up your dev box:

Disable CSS / JS minification or enable production mode

When developer mode is enabled, CSS and JS minifying / combining is processed on the fly. This process uses a lot of CPU usage and makes Magento very slow.

I'd recommend to either enable production mode or disable all CSS and JS related optimizations when using developer mode.

Close Chrome dev tools or enable browser cache

Besides the above, the front-end can take a very long time to load when chrome dev tools is open with cache disabled in the network tab. Closing dev tools or enabling the cache in dev tools will solve that issue.

Enable Magento cache except FPC

Enabling all caches except the FPC generally speeds up Magento 2 a lot, while allowing you to still work with it reasonably well.

Disable xDebug

If PHP xDebug is enabled, you should disable it and only enable it when debugging.

Related Topic