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