magento2站点迁移
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 magento setup:upgrade
php magento setup:static-content:deploy
php magento indexer:reindex
php magento cache:clean
php magento setup:static-content:deploy
php magento indexer:reindex
php magento cache:clean
如果改变了域名
执行如下 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 ./
chmod 777 * -R
建立定时任务,更新索引
crontab 定时任务
magento indexer:reindex
懂的越多,不会的也就越多,知识之路是不断进取的