magento2迁移

当文件与数据库都迁到新服务器上之后

运行以下命令

    sudo php bin/magento maintenance:enable
    sudo php bin/magento cache:clean
    sudo php bin/magento setup:upgrade
    sudo php bin/magento setup:di:compile
    sudo php bin/magento bms_advancedstock:flush_stock_index 
    sudo php bin/magento indexer:reindex
    php bin/magento setup:static-content:deploy  部署magento的静态内容
    sudo php bin/magento cache:clean
    sudo php bin/magento deploy:mode:set production
    sudo php bin/magento maintenance:disable

如果改变了域名

执行如下 MySQL:

update core_config_data set value='http://domain.com/' where path like '%secure/base_url';

你可能感兴趣的:(magento2)