Why Magento 2 is extremely slow?Why magento is so slowMagento 2 very slowHow to increase first time loading speed of Magento 2 site?Magento2: Full Page Cache WarmerWhy is Magento 2 local developer mode site with nginx and xdebug enabled is super slow?Magento 2 increase site speedMagento2 - Product import extremely slowWhy my Magento 1.9 admin panel is too slow, Take more than a min after click on any buttonIn developer mode why Magento is slow?Magento 2 - integrating Tawk.to chat issueMagento 2 product listing page extremely slowPerformance problems - hosting company suggested to optimize our MySQL databaseMagento 2 : Development is extremely slow?What are the limitations of Magento 2 CE?Convert from Cloud Enterprise to Enterprise issueMagento 2.3 Extremely Slow - Multiple PHP Processes
What is a "shilicashe?"
Why did Harry Potter get a bedroom?
Received a dinner invitation through my employer's email, is it ok to attend?
What steps should I take to lawfully visit the United States as a tourist immediately after visiting on a B-1 visa?
Using `PlotLegends` with a `ColorFunction`
Terry Pratchett book with a lawyer dragon and sheep
How can I fix the dull colors I am getting in Ubuntu 19.04 Terminal?
Has anyone in space seen or photographed a simple laser pointer from Earth?
For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?
This one's for Matthew:
What happens to unproductive professors?
Misspelling my name on my mathematical publications
Graduate student with abysmal English writing skills, how to help
Why do people keep referring to Leia as Princess Leia, even after the destruction of Alderaan?
Integer Lists of Noah
Employers keep telling me my college isn't good enough - is there any way to fix this?
Single word for "refusing to move to next activity unless present one is completed."
How do you move up one folder in Finder?
What specific instant in time in the MCU has been depicted the most times?
How can I effectively communicate to recruiters that a phone call is not possible?
Print the last, middle and first character of your code
How to deal with moral/legal subjects in writing?
Managing and organizing the massively increased number of classes after switching to SOLID?
Some interesting calculation puzzle that I made
Why Magento 2 is extremely slow?
Why magento is so slowMagento 2 very slowHow to increase first time loading speed of Magento 2 site?Magento2: Full Page Cache WarmerWhy is Magento 2 local developer mode site with nginx and xdebug enabled is super slow?Magento 2 increase site speedMagento2 - Product import extremely slowWhy my Magento 1.9 admin panel is too slow, Take more than a min after click on any buttonIn developer mode why Magento is slow?Magento 2 - integrating Tawk.to chat issueMagento 2 product listing page extremely slowPerformance problems - hosting company suggested to optimize our MySQL databaseMagento 2 : Development is extremely slow?What are the limitations of Magento 2 CE?Convert from Cloud Enterprise to Enterprise issueMagento 2.3 Extremely Slow - Multiple PHP Processes
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I used Magento 1.9 and it was okay.It wasnt as fast as a simple joomla site but i had many customers with no problem.
Now i wanted to upgrade my site to Magento 2,i bought a new host (same as i currently have) and installed Magento 2 without sample data and its a pain to use.Not just the admin,but the empty homepage as well take minutes to load and when i try to create an account i getting error that i "Resource Limit Is Reached"
I tried with Facebook FlashCache,OptimumCache and Cloudflare but nothing has changed even though the creators said Magento 2 is much faster than the first version.
I'd like to understand why they cant fix it after so many years and why so many people using it?
Is there any way fasten it up?
UPDATE:
I used mgt-commerce before and it was incredibly fast,took less than 2s to load but it cost too much: AWS Price + € 199.00
They offered php7 / HHVM , Varnish, Redis , CDN ,NGINX by default i guess thats why it was fast.
I had to buy Amazon WS account i don't know why i guess my site was actually hosted by Amazon.
Im looking for the same speed for a lower price.
A VPS provider example.
I was looking around but found that every hosting provider claims they have Magento hosting.
Siteground,Mochahost,Hostgator,Fastcomet etc.
Maybe there's a hosting provider who would install these caches to beat competitors.
PS: Sorry if my post seems to be silly for programmers i'd choosen economics,commerce and marketing at university unfortunately :(
magento2 slowbackend
|
show 2 more comments
I used Magento 1.9 and it was okay.It wasnt as fast as a simple joomla site but i had many customers with no problem.
Now i wanted to upgrade my site to Magento 2,i bought a new host (same as i currently have) and installed Magento 2 without sample data and its a pain to use.Not just the admin,but the empty homepage as well take minutes to load and when i try to create an account i getting error that i "Resource Limit Is Reached"
I tried with Facebook FlashCache,OptimumCache and Cloudflare but nothing has changed even though the creators said Magento 2 is much faster than the first version.
I'd like to understand why they cant fix it after so many years and why so many people using it?
Is there any way fasten it up?
UPDATE:
I used mgt-commerce before and it was incredibly fast,took less than 2s to load but it cost too much: AWS Price + € 199.00
They offered php7 / HHVM , Varnish, Redis , CDN ,NGINX by default i guess thats why it was fast.
I had to buy Amazon WS account i don't know why i guess my site was actually hosted by Amazon.
Im looking for the same speed for a lower price.
A VPS provider example.
I was looking around but found that every hosting provider claims they have Magento hosting.
Siteground,Mochahost,Hostgator,Fastcomet etc.
Maybe there's a hosting provider who would install these caches to beat competitors.
PS: Sorry if my post seems to be silly for programmers i'd choosen economics,commerce and marketing at university unfortunately :(
magento2 slowbackend
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
1
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
1
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25
|
show 2 more comments
I used Magento 1.9 and it was okay.It wasnt as fast as a simple joomla site but i had many customers with no problem.
Now i wanted to upgrade my site to Magento 2,i bought a new host (same as i currently have) and installed Magento 2 without sample data and its a pain to use.Not just the admin,but the empty homepage as well take minutes to load and when i try to create an account i getting error that i "Resource Limit Is Reached"
I tried with Facebook FlashCache,OptimumCache and Cloudflare but nothing has changed even though the creators said Magento 2 is much faster than the first version.
I'd like to understand why they cant fix it after so many years and why so many people using it?
Is there any way fasten it up?
UPDATE:
I used mgt-commerce before and it was incredibly fast,took less than 2s to load but it cost too much: AWS Price + € 199.00
They offered php7 / HHVM , Varnish, Redis , CDN ,NGINX by default i guess thats why it was fast.
I had to buy Amazon WS account i don't know why i guess my site was actually hosted by Amazon.
Im looking for the same speed for a lower price.
A VPS provider example.
I was looking around but found that every hosting provider claims they have Magento hosting.
Siteground,Mochahost,Hostgator,Fastcomet etc.
Maybe there's a hosting provider who would install these caches to beat competitors.
PS: Sorry if my post seems to be silly for programmers i'd choosen economics,commerce and marketing at university unfortunately :(
magento2 slowbackend
I used Magento 1.9 and it was okay.It wasnt as fast as a simple joomla site but i had many customers with no problem.
Now i wanted to upgrade my site to Magento 2,i bought a new host (same as i currently have) and installed Magento 2 without sample data and its a pain to use.Not just the admin,but the empty homepage as well take minutes to load and when i try to create an account i getting error that i "Resource Limit Is Reached"
I tried with Facebook FlashCache,OptimumCache and Cloudflare but nothing has changed even though the creators said Magento 2 is much faster than the first version.
I'd like to understand why they cant fix it after so many years and why so many people using it?
Is there any way fasten it up?
UPDATE:
I used mgt-commerce before and it was incredibly fast,took less than 2s to load but it cost too much: AWS Price + € 199.00
They offered php7 / HHVM , Varnish, Redis , CDN ,NGINX by default i guess thats why it was fast.
I had to buy Amazon WS account i don't know why i guess my site was actually hosted by Amazon.
Im looking for the same speed for a lower price.
A VPS provider example.
I was looking around but found that every hosting provider claims they have Magento hosting.
Siteground,Mochahost,Hostgator,Fastcomet etc.
Maybe there's a hosting provider who would install these caches to beat competitors.
PS: Sorry if my post seems to be silly for programmers i'd choosen economics,commerce and marketing at university unfortunately :(
magento2 slowbackend
magento2 slowbackend
edited Mar 29 '18 at 6:48
John
6566 silver badges20 bronze badges
6566 silver badges20 bronze badges
asked Dec 28 '16 at 15:02
petetcappetetcap
1331 gold badge2 silver badges7 bronze badges
1331 gold badge2 silver badges7 bronze badges
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
1
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
1
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25
|
show 2 more comments
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
1
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
1
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
1
1
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
1
1
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25
|
show 2 more comments
5 Answers
5
active
oldest
votes
There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.
Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.
Cache: Varnish is supported out of the box, pretty easy to configure and use.
Redis: Redis is an optional backend cache solution to replace Zend_Cache_Backend_File
, which is used in Magento 2 by default. It can be used for session storage and page caching.
Memcache: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In Magento 2 it can be used for sessions.
PHP 7: Magento 2 is compatible with PHP 7 out of the box. There is a lot of research on how PHP 7 affects performance for good.
This is just the start, you should be able to fine tune your webserver and database server but that will heavily depend on your particular use case.
If you don't know how to do that yourself, there are plenty of companies specialized in Magento hosting.
For a pretty solid dev environment my personal recommendation is Paliarush' Vagrant or the VM I got from Magento for the courses. There is an official docker image coming soon.
add a comment |
Magento runs reasonably well even in developer mode. It does need some initial configuration though.
First make sure Magento is set up correctly, assuming your on Ubuntu:
Use the latest build as Magento 2.2+ supports php 7.1
http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
sudo apt-get install php7.1 php7.1-imap php7.1-xml php7.1-dom php7.1-intl
If your running multiple php versions set 7.1 to the default via
sudo update-alternatives --set php /usr/bin/php7.1
Onto Magento
Set to Developer if not already
php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
Check Magento's cache is enabled
php -f bin/magento cache:status
If not enabled (series of 1's)
php -f bin/magento cache:enable
Enable JS/CSS bundling
Stores > Configuration > Advanced > Developer
*Note the above menu item only shows up whilst in developer mode
Template Setttings
- Minify HTML = Yes
Javascript Settings
Merge JS files = Yes
Enable JS Bundling = Yes
Minify JS files = Yes
CSS Settings
- Merge CSS = Yes
- Minify CSS = Yes
Do a cache flush from here on in after every step flush the cache, this is your baseline for trying to improve the loading time.
php -f bin/magento cache:flush
Advanced bundling
This would be a post in itself follow guidelines from magento devdocs on how to enable this, this could further increase the frontend JS loading making it 3x as fast.
Use Redis
sudo apt-get update
sudo apt-get install build-essential tcl8.5
sudo apt-get install make
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd utils/
sudo ./install_server.sh
Edit /www/project/app/etc/env.php
'cache' =>
array (
'frontend' =>
array (
'default' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
),
),
'page_cache' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0',
),
),
),
),
Use PHP-FPM
apt-get install php7.1-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
sudo service php7.1-fpm restart
sudo service apache2 restart
Enable opcache in PHP
Edit /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
I would also recommend using a Cloud DB such as AWS RDS or other it will save you the headaches of configuring mysql.
If you now enable production mode
php -f bin/magento deploy:mode:set production
you should find it's running reasonably well.
Taking it further from here you can add Varnish, Switch to Nginx add a CDN for static files.
add a comment |
Magento 2 is not slow by default. You have to follow these steps to make it fast:
Server and System Requirements
Update Magento Version
Enable Varnish Cache
Configure Memcached
Enable Flat Categories and Products
Optimize Javascript and CSS
Content Delivery Network
Use lightweight theme
Bug-Free Extensions
Images Should be Fully Optimized
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
add a comment |
I had this problem too on a Macbook Pro (late 2016) with MAMP.
What I wanted to do was to create a Magento 2 theme. I had deactivated all caches and it took like 30s to reload a page (frontend and backend).
I activated all caches with the command "php magento cache:enable" and the site loads very fast. I can still work with Grunt and LESS without deactivating any cache type.
add a comment |
How do you figure Magento 2 is slow? My site which uses a very heavy theme scores a solid 93/100 in Page Speed and load times are 2 secs. I'd say get a better host for Magento because your web server plays a big part in the performance of your site. As for "default" mode being the slowest not true at all. I ran my store in default mode until I was ready to switch over to production mode and it scored a 91/100 in default mode and only went to a 93/100 after switching to production mode.
Get a better host and a better web server if you really want to use Magento 2.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152221%2fwhy-magento-2-is-extremely-slow%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.
Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.
Cache: Varnish is supported out of the box, pretty easy to configure and use.
Redis: Redis is an optional backend cache solution to replace Zend_Cache_Backend_File
, which is used in Magento 2 by default. It can be used for session storage and page caching.
Memcache: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In Magento 2 it can be used for sessions.
PHP 7: Magento 2 is compatible with PHP 7 out of the box. There is a lot of research on how PHP 7 affects performance for good.
This is just the start, you should be able to fine tune your webserver and database server but that will heavily depend on your particular use case.
If you don't know how to do that yourself, there are plenty of companies specialized in Magento hosting.
For a pretty solid dev environment my personal recommendation is Paliarush' Vagrant or the VM I got from Magento for the courses. There is an official docker image coming soon.
add a comment |
There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.
Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.
Cache: Varnish is supported out of the box, pretty easy to configure and use.
Redis: Redis is an optional backend cache solution to replace Zend_Cache_Backend_File
, which is used in Magento 2 by default. It can be used for session storage and page caching.
Memcache: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In Magento 2 it can be used for sessions.
PHP 7: Magento 2 is compatible with PHP 7 out of the box. There is a lot of research on how PHP 7 affects performance for good.
This is just the start, you should be able to fine tune your webserver and database server but that will heavily depend on your particular use case.
If you don't know how to do that yourself, there are plenty of companies specialized in Magento hosting.
For a pretty solid dev environment my personal recommendation is Paliarush' Vagrant or the VM I got from Magento for the courses. There is an official docker image coming soon.
add a comment |
There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.
Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.
Cache: Varnish is supported out of the box, pretty easy to configure and use.
Redis: Redis is an optional backend cache solution to replace Zend_Cache_Backend_File
, which is used in Magento 2 by default. It can be used for session storage and page caching.
Memcache: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In Magento 2 it can be used for sessions.
PHP 7: Magento 2 is compatible with PHP 7 out of the box. There is a lot of research on how PHP 7 affects performance for good.
This is just the start, you should be able to fine tune your webserver and database server but that will heavily depend on your particular use case.
If you don't know how to do that yourself, there are plenty of companies specialized in Magento hosting.
For a pretty solid dev environment my personal recommendation is Paliarush' Vagrant or the VM I got from Magento for the courses. There is an official docker image coming soon.
There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.
Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.
Cache: Varnish is supported out of the box, pretty easy to configure and use.
Redis: Redis is an optional backend cache solution to replace Zend_Cache_Backend_File
, which is used in Magento 2 by default. It can be used for session storage and page caching.
Memcache: Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In Magento 2 it can be used for sessions.
PHP 7: Magento 2 is compatible with PHP 7 out of the box. There is a lot of research on how PHP 7 affects performance for good.
This is just the start, you should be able to fine tune your webserver and database server but that will heavily depend on your particular use case.
If you don't know how to do that yourself, there are plenty of companies specialized in Magento hosting.
For a pretty solid dev environment my personal recommendation is Paliarush' Vagrant or the VM I got from Magento for the courses. There is an official docker image coming soon.
edited Dec 28 '16 at 21:13
7ochem
5,9499 gold badges37 silver badges70 bronze badges
5,9499 gold badges37 silver badges70 bronze badges
answered Dec 28 '16 at 15:18
mbalpardambalparda
6,7733 gold badges16 silver badges44 bronze badges
6,7733 gold badges16 silver badges44 bronze badges
add a comment |
add a comment |
Magento runs reasonably well even in developer mode. It does need some initial configuration though.
First make sure Magento is set up correctly, assuming your on Ubuntu:
Use the latest build as Magento 2.2+ supports php 7.1
http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
sudo apt-get install php7.1 php7.1-imap php7.1-xml php7.1-dom php7.1-intl
If your running multiple php versions set 7.1 to the default via
sudo update-alternatives --set php /usr/bin/php7.1
Onto Magento
Set to Developer if not already
php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
Check Magento's cache is enabled
php -f bin/magento cache:status
If not enabled (series of 1's)
php -f bin/magento cache:enable
Enable JS/CSS bundling
Stores > Configuration > Advanced > Developer
*Note the above menu item only shows up whilst in developer mode
Template Setttings
- Minify HTML = Yes
Javascript Settings
Merge JS files = Yes
Enable JS Bundling = Yes
Minify JS files = Yes
CSS Settings
- Merge CSS = Yes
- Minify CSS = Yes
Do a cache flush from here on in after every step flush the cache, this is your baseline for trying to improve the loading time.
php -f bin/magento cache:flush
Advanced bundling
This would be a post in itself follow guidelines from magento devdocs on how to enable this, this could further increase the frontend JS loading making it 3x as fast.
Use Redis
sudo apt-get update
sudo apt-get install build-essential tcl8.5
sudo apt-get install make
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd utils/
sudo ./install_server.sh
Edit /www/project/app/etc/env.php
'cache' =>
array (
'frontend' =>
array (
'default' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
),
),
'page_cache' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0',
),
),
),
),
Use PHP-FPM
apt-get install php7.1-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
sudo service php7.1-fpm restart
sudo service apache2 restart
Enable opcache in PHP
Edit /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
I would also recommend using a Cloud DB such as AWS RDS or other it will save you the headaches of configuring mysql.
If you now enable production mode
php -f bin/magento deploy:mode:set production
you should find it's running reasonably well.
Taking it further from here you can add Varnish, Switch to Nginx add a CDN for static files.
add a comment |
Magento runs reasonably well even in developer mode. It does need some initial configuration though.
First make sure Magento is set up correctly, assuming your on Ubuntu:
Use the latest build as Magento 2.2+ supports php 7.1
http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
sudo apt-get install php7.1 php7.1-imap php7.1-xml php7.1-dom php7.1-intl
If your running multiple php versions set 7.1 to the default via
sudo update-alternatives --set php /usr/bin/php7.1
Onto Magento
Set to Developer if not already
php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
Check Magento's cache is enabled
php -f bin/magento cache:status
If not enabled (series of 1's)
php -f bin/magento cache:enable
Enable JS/CSS bundling
Stores > Configuration > Advanced > Developer
*Note the above menu item only shows up whilst in developer mode
Template Setttings
- Minify HTML = Yes
Javascript Settings
Merge JS files = Yes
Enable JS Bundling = Yes
Minify JS files = Yes
CSS Settings
- Merge CSS = Yes
- Minify CSS = Yes
Do a cache flush from here on in after every step flush the cache, this is your baseline for trying to improve the loading time.
php -f bin/magento cache:flush
Advanced bundling
This would be a post in itself follow guidelines from magento devdocs on how to enable this, this could further increase the frontend JS loading making it 3x as fast.
Use Redis
sudo apt-get update
sudo apt-get install build-essential tcl8.5
sudo apt-get install make
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd utils/
sudo ./install_server.sh
Edit /www/project/app/etc/env.php
'cache' =>
array (
'frontend' =>
array (
'default' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
),
),
'page_cache' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0',
),
),
),
),
Use PHP-FPM
apt-get install php7.1-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
sudo service php7.1-fpm restart
sudo service apache2 restart
Enable opcache in PHP
Edit /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
I would also recommend using a Cloud DB such as AWS RDS or other it will save you the headaches of configuring mysql.
If you now enable production mode
php -f bin/magento deploy:mode:set production
you should find it's running reasonably well.
Taking it further from here you can add Varnish, Switch to Nginx add a CDN for static files.
add a comment |
Magento runs reasonably well even in developer mode. It does need some initial configuration though.
First make sure Magento is set up correctly, assuming your on Ubuntu:
Use the latest build as Magento 2.2+ supports php 7.1
http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
sudo apt-get install php7.1 php7.1-imap php7.1-xml php7.1-dom php7.1-intl
If your running multiple php versions set 7.1 to the default via
sudo update-alternatives --set php /usr/bin/php7.1
Onto Magento
Set to Developer if not already
php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
Check Magento's cache is enabled
php -f bin/magento cache:status
If not enabled (series of 1's)
php -f bin/magento cache:enable
Enable JS/CSS bundling
Stores > Configuration > Advanced > Developer
*Note the above menu item only shows up whilst in developer mode
Template Setttings
- Minify HTML = Yes
Javascript Settings
Merge JS files = Yes
Enable JS Bundling = Yes
Minify JS files = Yes
CSS Settings
- Merge CSS = Yes
- Minify CSS = Yes
Do a cache flush from here on in after every step flush the cache, this is your baseline for trying to improve the loading time.
php -f bin/magento cache:flush
Advanced bundling
This would be a post in itself follow guidelines from magento devdocs on how to enable this, this could further increase the frontend JS loading making it 3x as fast.
Use Redis
sudo apt-get update
sudo apt-get install build-essential tcl8.5
sudo apt-get install make
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd utils/
sudo ./install_server.sh
Edit /www/project/app/etc/env.php
'cache' =>
array (
'frontend' =>
array (
'default' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
),
),
'page_cache' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0',
),
),
),
),
Use PHP-FPM
apt-get install php7.1-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
sudo service php7.1-fpm restart
sudo service apache2 restart
Enable opcache in PHP
Edit /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
I would also recommend using a Cloud DB such as AWS RDS or other it will save you the headaches of configuring mysql.
If you now enable production mode
php -f bin/magento deploy:mode:set production
you should find it's running reasonably well.
Taking it further from here you can add Varnish, Switch to Nginx add a CDN for static files.
Magento runs reasonably well even in developer mode. It does need some initial configuration though.
First make sure Magento is set up correctly, assuming your on Ubuntu:
Use the latest build as Magento 2.2+ supports php 7.1
http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
sudo apt-get install php7.1 php7.1-imap php7.1-xml php7.1-dom php7.1-intl
If your running multiple php versions set 7.1 to the default via
sudo update-alternatives --set php /usr/bin/php7.1
Onto Magento
Set to Developer if not already
php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
Check Magento's cache is enabled
php -f bin/magento cache:status
If not enabled (series of 1's)
php -f bin/magento cache:enable
Enable JS/CSS bundling
Stores > Configuration > Advanced > Developer
*Note the above menu item only shows up whilst in developer mode
Template Setttings
- Minify HTML = Yes
Javascript Settings
Merge JS files = Yes
Enable JS Bundling = Yes
Minify JS files = Yes
CSS Settings
- Merge CSS = Yes
- Minify CSS = Yes
Do a cache flush from here on in after every step flush the cache, this is your baseline for trying to improve the loading time.
php -f bin/magento cache:flush
Advanced bundling
This would be a post in itself follow guidelines from magento devdocs on how to enable this, this could further increase the frontend JS loading making it 3x as fast.
Use Redis
sudo apt-get update
sudo apt-get install build-essential tcl8.5
sudo apt-get install make
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
cd utils/
sudo ./install_server.sh
Edit /www/project/app/etc/env.php
'cache' =>
array (
'frontend' =>
array (
'default' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'database' => '0',
'port' => '6379',
),
),
'page_cache' =>
array (
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array (
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0',
),
),
),
),
Use PHP-FPM
apt-get install php7.1-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.1-fpm
sudo service php7.1-fpm restart
sudo service apache2 restart
Enable opcache in PHP
Edit /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
I would also recommend using a Cloud DB such as AWS RDS or other it will save you the headaches of configuring mysql.
If you now enable production mode
php -f bin/magento deploy:mode:set production
you should find it's running reasonably well.
Taking it further from here you can add Varnish, Switch to Nginx add a CDN for static files.
edited Jul 2 at 11:26
answered Jan 23 '18 at 11:50
Joel DaveyJoel Davey
4002 silver badges8 bronze badges
4002 silver badges8 bronze badges
add a comment |
add a comment |
Magento 2 is not slow by default. You have to follow these steps to make it fast:
Server and System Requirements
Update Magento Version
Enable Varnish Cache
Configure Memcached
Enable Flat Categories and Products
Optimize Javascript and CSS
Content Delivery Network
Use lightweight theme
Bug-Free Extensions
Images Should be Fully Optimized
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
add a comment |
Magento 2 is not slow by default. You have to follow these steps to make it fast:
Server and System Requirements
Update Magento Version
Enable Varnish Cache
Configure Memcached
Enable Flat Categories and Products
Optimize Javascript and CSS
Content Delivery Network
Use lightweight theme
Bug-Free Extensions
Images Should be Fully Optimized
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
add a comment |
Magento 2 is not slow by default. You have to follow these steps to make it fast:
Server and System Requirements
Update Magento Version
Enable Varnish Cache
Configure Memcached
Enable Flat Categories and Products
Optimize Javascript and CSS
Content Delivery Network
Use lightweight theme
Bug-Free Extensions
Images Should be Fully Optimized
Magento 2 is not slow by default. You have to follow these steps to make it fast:
Server and System Requirements
Update Magento Version
Enable Varnish Cache
Configure Memcached
Enable Flat Categories and Products
Optimize Javascript and CSS
Content Delivery Network
Use lightweight theme
Bug-Free Extensions
Images Should be Fully Optimized
edited Jan 11 '18 at 8:48
Marius♦
170k29 gold badges329 silver badges705 bronze badges
170k29 gold badges329 silver badges705 bronze badges
answered Mar 24 '17 at 10:10
Syed Muneeb Ul HasanSyed Muneeb Ul Hasan
6503 silver badges17 bronze badges
6503 silver badges17 bronze badges
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
add a comment |
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
19
19
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
I'm sorry, but if you have to add multiple levels of caching to an application, then it is slow by default.
– Robert Egginton
Apr 6 '17 at 7:53
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Robert: Dude, adding cache to several layers of a multi layered system is the right kind of architecture. We're not talking cache upon cache... -o-
– miracules
Aug 28 '17 at 10:36
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
Using caches during development is not really an optimal solution. Clearing cache every time a change is made feels more like developing in compiled language, not PHP.
– Alan
Dec 21 '17 at 9:45
add a comment |
I had this problem too on a Macbook Pro (late 2016) with MAMP.
What I wanted to do was to create a Magento 2 theme. I had deactivated all caches and it took like 30s to reload a page (frontend and backend).
I activated all caches with the command "php magento cache:enable" and the site loads very fast. I can still work with Grunt and LESS without deactivating any cache type.
add a comment |
I had this problem too on a Macbook Pro (late 2016) with MAMP.
What I wanted to do was to create a Magento 2 theme. I had deactivated all caches and it took like 30s to reload a page (frontend and backend).
I activated all caches with the command "php magento cache:enable" and the site loads very fast. I can still work with Grunt and LESS without deactivating any cache type.
add a comment |
I had this problem too on a Macbook Pro (late 2016) with MAMP.
What I wanted to do was to create a Magento 2 theme. I had deactivated all caches and it took like 30s to reload a page (frontend and backend).
I activated all caches with the command "php magento cache:enable" and the site loads very fast. I can still work with Grunt and LESS without deactivating any cache type.
I had this problem too on a Macbook Pro (late 2016) with MAMP.
What I wanted to do was to create a Magento 2 theme. I had deactivated all caches and it took like 30s to reload a page (frontend and backend).
I activated all caches with the command "php magento cache:enable" and the site loads very fast. I can still work with Grunt and LESS without deactivating any cache type.
answered Feb 21 '18 at 17:00
Klevis MihoKlevis Miho
2761 gold badge8 silver badges20 bronze badges
2761 gold badge8 silver badges20 bronze badges
add a comment |
add a comment |
How do you figure Magento 2 is slow? My site which uses a very heavy theme scores a solid 93/100 in Page Speed and load times are 2 secs. I'd say get a better host for Magento because your web server plays a big part in the performance of your site. As for "default" mode being the slowest not true at all. I ran my store in default mode until I was ready to switch over to production mode and it scored a 91/100 in default mode and only went to a 93/100 after switching to production mode.
Get a better host and a better web server if you really want to use Magento 2.
add a comment |
How do you figure Magento 2 is slow? My site which uses a very heavy theme scores a solid 93/100 in Page Speed and load times are 2 secs. I'd say get a better host for Magento because your web server plays a big part in the performance of your site. As for "default" mode being the slowest not true at all. I ran my store in default mode until I was ready to switch over to production mode and it scored a 91/100 in default mode and only went to a 93/100 after switching to production mode.
Get a better host and a better web server if you really want to use Magento 2.
add a comment |
How do you figure Magento 2 is slow? My site which uses a very heavy theme scores a solid 93/100 in Page Speed and load times are 2 secs. I'd say get a better host for Magento because your web server plays a big part in the performance of your site. As for "default" mode being the slowest not true at all. I ran my store in default mode until I was ready to switch over to production mode and it scored a 91/100 in default mode and only went to a 93/100 after switching to production mode.
Get a better host and a better web server if you really want to use Magento 2.
How do you figure Magento 2 is slow? My site which uses a very heavy theme scores a solid 93/100 in Page Speed and load times are 2 secs. I'd say get a better host for Magento because your web server plays a big part in the performance of your site. As for "default" mode being the slowest not true at all. I ran my store in default mode until I was ready to switch over to production mode and it scored a 91/100 in default mode and only went to a 93/100 after switching to production mode.
Get a better host and a better web server if you really want to use Magento 2.
answered Aug 21 '17 at 21:04
James StubbsJames Stubbs
111 bronze badge
111 bronze badge
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152221%2fwhy-magento-2-is-extremely-slow%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you explain what have you tried with Facebook FlashCache, OptimumCache and Cloudflare please?
– mbalparda
Dec 28 '16 at 15:54
1
Looks like its environment issue. On my vm it's open cms/home page without FPC < 0.1s and with FPC < 0.01s
– KAndy
Dec 28 '16 at 16:09
disable css/js merging stores > configuration > advanced > developer see my comment here magento.stackexchange.com/questions/150073/…
– Konstantin Gerasimov
Dec 28 '16 at 18:18
1
I'm starting with M2 and very frustrated with it's performance as well. If your software requires a thousand caches to run for a single user, there's something wrong. I hope I change my mind soon.
– Ricardo Martins
May 23 '17 at 6:27
@KAndy can you write what vm do you use? If you use vagrant would it be possible to share the provisioning script? I tried several VMs but all of them didn't work. Magento installation is successful but then pages don't load.
– Alan
Jan 19 '18 at 17:25