rm -rf ./var/cache/
rm -rf ./var/generation/
rm -rf ./var/log/
rm -rf ./var/maps/
rm -rf ./var/page_cache/
rm -rf ./var/tmp/
rm -rf ./var/view/
rm -rf ./var/view_preprocessed/
php bin/magento setup:upgrade
php bin/magento indexer:reindex
php bin/magento cache:flush
如果改变了域名
执行如下 mysql:
update core_config_data set value=‘http://domain.com/‘ where path like ‘%secure/base_url‘;
或执行命令
php bin/magento setup:store-config:set --base-url http://domain.com/
注意文件权限,要保证var可写
chown -R http:http ./