magento2.x系统加速

admin6年前IT技术1911

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





 

 

 

相关文章

magento1.9x系统加速

1.设置magento数据库模型 为单表查询:   在System > Configuration > Catalog > FrontEnd设置 ‘U...

过滤emoji表情的正则表达式

\p{Cs}?imageView2/2/w/300/interlace/1/q/90^[\u4e00-\u9fa5]+$...

mount:is write-protected, mounting read-only解决方案

window10升级之后就遇到mount: **** is write-protected, mounting read-onlymount: cannot mount *** read-only尝试...

Xray VLESS / TLS

Xray VLESS / TLS

 Amazon Linux 2 上顺利运行的 Xray 一键安装脚本,包含:Xray VLESS / TLS(443 或 8443,建议用 8443)systemd 自动启动BBR + 内核...

怎么使用UltraISO制作Win11启动盘?

怎么使用UltraISO制作Win11启动盘?

操作方法:  首先需要下载好windows11 的镜像文件  准备好一个8G以上的U盘,插入电脑,打开ultraiso软件,点击文件,然后打开镜像文件,之后点击启动,点击写入硬盘镜像  之后,会跳转出...

KindEditor得不到textarea值的解决方法

  下面以 KindEditor 4.x 版本为例说明,先贴上正确的代码:         &nb...

发表评论    

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