Những lệnh quan trọng:
# Update composer nếu cần
composer update
# Upgrade các module
bin/magento setup:upgrade
# Compile source code
bin/magento setup:di:compile
# Generate static file
bin/magento setup:static-content:deploy -f
Những lệnh bổ sung:
# Xóa cache
bin/magento cache:clean
# Xóa redis cache
redis-cli -n 0 FLUSHDB
redis-cli -n 1 FLUSHDB
Nên tránh dùng redis-cli flushall bởi nó sẽ xóa luôn session (không tốt khi chạy trên live site). Thực tế trên live site tôi thường dùng lệnh này thay vì compile + generate static:
deploy:mode:set production
No comments yet