magento2.x系统加速

admin6年前IT技术1402

1:在根目录运行以下命令,全站生成静态
bin/magento setup:static-content:deploy
2:编译整个网站,让网站加速50%  注意事项:要把PHP脚本内存限制设置到1000MB以上,否则会导致编译失败;
bin/magento setup:di:compile
3.让整个网站composer重新指向,让网站加速加速10%
composer dump-autoload -o --apcu
4:设置网站为生产模式,让网站加速30%
This can be done in your .htaccess or nginx.conf file:SetEnv MAGE_MODE production
或者bin/magento deploy:mode:set production

5:合并js
Stores > Configuration > Advanced > Developer > JavaScript Settings
设置 Merge JavaScript Files 为Yes
设置 Enable JavaScript Bundling 为Yes





 

 

 

相关文章

解决Centos7系统更新时报错:Could not resolve host: mirrorlist.centos.org; 未知的错误

1、背景        centos7系统在执行:sudo yum update,发生错误;1.1、错误描述       ...

ResetMasterPassword,MobaXterm忘记密码,MobaXterm密码清除工具

ResetMasterPassword,MobaXterm忘记密码,MobaXterm密码清除工具 下载...

服务器2012打开远程端口,Windows Server 2012远程默认端口3389的修改

服务器2012打开远程端口,Windows Server 2012远程默认端口3389的修改

Window Server2012 修改远程桌面端口号Win + R 输入 regedit 打开注册表编辑器1、修改注册表项1HKEY_LOCAL_MACHINE/System/CurrentCont...

汇成学校建站CMS系统V3.0

汇成学校建站CMS系统V3.0 ˂a target="_blank" href="download/hcschoolv3.0.rar"˃官方下载后台地址:您的地址/admin/login.a...

win10 连接L2TP win7 连接L2TP遇到的问题

win10 连接L2TP win7 连接L2TP遇到的问题

PSK共享密钥文件位置/etc/ipsec.secretswin10无法链接的问题解决方案HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Se...

15天掌握php

˂a href="download/php/第一课--15天掌握php.zip" target="_blank"˃第一课...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。