Magento调试安装/升级过程

时间:2014-01-04 12:53:36

标签: magento

我正在尝试将Magento从1.3.2.4升级到1.8,但最后浏览器重置了连接,所以我甚至看不出问题的原因是什么。我如何调试安装过程,这样我就可以看到安装/升级了哪些模块,什么版本,现在正在安装什么模块等等。我认为最好的方法是写入的某种安装日志文件。可能有人有一些脚本或者可以建议我可以把日志文件写入点的类/方法吗?

1 个答案:

答案 0 :(得分:0)

根据我的经验和专业知识,您需要分两步升级较低版本。您可以先升级1.3到1.5或1.6然后升级到1.8而不会出现任何问题。无论如何,当您直接将1.3升级到1.8时,您需要使用SSH和一些简单的命令来查看确切的版本升级以及您可以通过SSH看到的任何其他问题。

只需使用SSH运行index.php,即可开始在黑屏前查看问题。

您可以在下面看到用于升级甚至在SSH中查看升级文件的脚本:

STEP 1: Maintenance mode
cd /your_magento_folder
touch maintenance.flag
Time: 1min

STEP 2: Backup your database
mysqldump your_database_name > your_database_name_date.sql
Time: 5min (depends on database size and server resources)

STEP 3: Backup your folders
cp -R /your_magento_folder your_magento_backup_folder
Time: depends on the size of your folder and server resources

STEP 4: Upgrade
cd /your_magento_folder
chmod -R 777 ./*
rm -rf var/cache/* var/session/* var/report/* var/locks/*
chmod 550 ./mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage list-installed

如果最后一个命令没有列出预期的Magento模块,例如:

Installed package for channel 'community' :
Lib_Js_Ext           1.7.0.0 stable
Lib_LinLibertineFont 2.8.14.1 stable
Lib_Js_TinyMCE       3.4.7.0 stable
Lib_Js_Calendar      1.51.1.1 stable
Lib_Phpseclib        1.5.0.0 stable
Lib_ZF               1.11.1.0 stable
Lib_Js_Prototype     1.7.0.0.4 stable
Lib_ZF_Locale        1.11.1.0 stable
Mage_All_Latest      1.7.0.2 stable
Interface_Adminhtml_Default 1.7.0.2 stable
Interface_Frontend_Default 1.7.0.2 stable
Interface_Install_Default 1.7.0.2 stable
Mage_Downloader      1.7.0.2 stable
Mage_Centinel        1.7.0.2 stable
Interface_Frontend_Base_Default 1.7.0.20 stable
Phoenix_Moneybookers 1.3.2 stable
Mage_Compiler        1.7.0.2 stable
Magento_Mobile       1.7.0.2.23.1 stable
Mage_Core_Adminhtml  1.7.0.2 stable
Mage_Core_Modules    1.7.0.2 stable
Lib_Varien           1.7.0.2 stable
Lib_Google_Checkout  1.7.0.2 stable
Lib_Js_Mage          1.7.0.2 stable
Mage_Locale_en_US    1.7.0.2 stable
Lib_Mage             1.7.0.2 stable

然后你必须使用:

进行升级
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force

如果列出了Magento模块,请使用以下命令:

./mage list-upgrades
./mage upgrade-all

一旦你完成了(你应该看到大量的模块列表'已经安装','包升级'等等),你需要确保你的权限恢复正常:

php shell/indexer.php reindexall
chmod -R 644 ./*
find . -type d -exec chmod 755 {} \;
chmod 550 ./mage
Time: 5min

STEP 5: Make it live
cd /your_magento_folder
rm -f maintenance.flag
相关问题