Good evening, my site is https://www.emporiobit.com.br it is not yet in production.
I use magento 2.2.5 with varnish and redis
I configured 4G for Varnish and 4G for php memory_limit, my VPS has 12gb ram
When I open the site there is a slow but when the site is open it loads everything at once, I believe because of the cache
The ping from Brazil where my public is located until the server is around 220~290ms, using cloudflare is around 130~140ms
I took a test at www.webpagetest.org and the TTFB scored 2,502s, I think it's a bit high
Could you help me sort out how slow to open?
3 Answers
You can follow some steps below :
- Merge Css
- Merge javascript
- Put store to production mode
- Enable all cache
Then check speed of your store
Good luck !
All related items are OK except for PHP-FPM that I do not have installed. With this php-fpm is there performance gain?
-
yes and no, you need to test it, probably you have some issues with php code in your templates– MagenXCommented Sep 1, 2018 at 8:32
Use the latest Magento 2.2* supports php 7.1 or not. Please below link Refere and check PHP 7.1 Support or not.
==> http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-ubuntu.html
==> After It it is supported then you install this PHP plugin.
sudo apt-get install php7.1 php7.1-xml php7.1-dom php7.1-intl php7.1-imap
==> If you running multiple PHP versions set 7.1 to the as default Using this command.
==> sudo update-alternatives --set php /usr/bin/php7.1
Set to Developer Mode php -f bin/magento deploy:mode:show
php -f bin/magento deploy:mode:set developer
==> Check Magento cache is enabled Or not It's FPC Not Enabled please enabled FPC cache. Then check cache status.
php -f bin/magento cache:status
If it is not enabled (cache status of 1's)
php -f bin/magento cache:enable
then you will Enable JS/CSS bundling
Stores -> Configuration -> Advanced -> Developer
==> Template Configuration
Minify HTML ==> set to Yes Javascript Settings
Merge JS files ==> set to Yes
Enable JS Bundling ==> set to Yes
Minify JS files ==> set to Yes
CSS Configuration
Merge CSS = set to Yes Minify CSS = set to Yes
you will Do the cache flush after every step flush the cache.
php -f bin/magento cache:flush
==>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 made cd utils/ sudo ./install_server.sh
Edit var/www/html/MagentoFoldername/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 this file /etc/php/7.1/apache2/php.ini find opcache.enable
opcache.enable=1
-
1
bin/magento cache:enable