gpt4 book ai didi

php - 如何将 magento 备份到另一个安装

转载 作者:可可西里 更新时间:2023-11-01 00:27:45 24 4
gpt4 key购买 nike

我如何获取所有信息、产品图片、设置等...从一个 magento 安装到另一个?

它的备份功能似乎没有那么好。

最佳答案

使用 SSH,您可以执行以下步骤来备份 Magento 并将其移动到新站点。

运行以下命令时,请确保您位于 magento 的根目录下

  1. 备份 MySQL 数据库

    mysqldump -h DBHOST -u DBUSER -pDBPASS DBNAME > data.sql

    DBHOST - Database host name, usually just localhost
    DBUSER - Database user with access rights to the database
    DBPASS - The password for the database user
    DBNAME - The name of the database that Magento is using
  2. 用所有产品图片备份媒体目录

    tar -cvf media.tar media/*

  3. 备份默认界面的app目录

    cd app/design/frontend/default/

    tar -cvf app.tar mytheme/

    用你的主题名称更改 mytheme

  4. 备份默认界面的皮肤目录

    cd skin/frontend/default/

    tar -cvf skin.tar mytheme/

    用你的主题名称更改 mytheme

  5. 备份本地的配置文件:

    app/etc/local.xml

  6. 提取并覆盖上面保存的所有文件到您的新位置

    要导入数据库,请使用 phpmyadmin 或使用此命令行:

    mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql

关于php - 如何将 magento 备份到另一个安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2256429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com