参考以上两份教程,当文件与数据库都迁到新服务器上之后
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:upgradephp bin/magento indexer:reindexphp 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 ./