只需按照正常的路径上的PrestaShop安装模块:
- 下载一键升级,从的Prestashop扩展中心模块:http://addons.prestashop.com/en/administration-tools-prestashop-modules/5496-1-click-upgrade-autoupgrade.html 将压缩文件保存到桌面上。
- 在您的Prestashop管理面板,进入“模块”菜单中的“模块”页面。
点击“添加模块”按钮,位于可用模块列表右上角。
Tip 如果你是从版本 1.4 开始升级的话,单击顶部左侧的 "Add a module from my computer" 连接。
在打开的窗体,点击“浏览...”按钮,然后找到并选择您刚刚下载的模块的Zip文件。
点击“上传此模块”按钮。的Prestashop将把模块的服务器上,将它解压缩,并放置在文件 /模块的 文件夹。
该模块是现在在你的模块列表中可用,但你还是要安装它:
1.在“模块”选项卡,找到一键式升级模块:键入“1键升级”或模块搜索框(而不是在顶部的全局搜索)“自动升级”。直接链接到模块为您键入应该会出现。点击它。
2.PrestaShop然后显示主模块清单中模块。
3.点击模块的“安装”按钮。
配置屏幕
模块配置的界面是可以通过单击模块的配置链接在模块(Modules)列表中找到的。
Tip |
---|
模块配置界面从下面的版本开始可用:
|
在配置屏幕界面中有一系列的配置内容,提供了有关的信息,工具和设置。
欢迎界面
在这里我们想提醒您,没有任何升级是 100% 安全的,所以你需要在升级之前确定你已经备份好了所有的文件和数据。
这样的话,当升级出现失败或者意外的时候,你就可以将你的系统恢复到最初的版本。尽管这个需要一些额外的工作,但是却能保证你能够升级安全。
有关备份和恢复的操作,请参考页面: 创建和恢复你自己的备份 中的内容。
请注意:一键升级模块在对系统升级的时候也会自动进行备份。但是,尽管是这样,我们还是希望你能够创建自己的备份。
预升级检查列表
预升级检查列表(The pre-Upgrade checklist)选项将会给你提供一些有关当前安装 PrestaShop 的有用信息,同时也会说明这些内容将会如何影响自动安装的进程。
你必须确定所有的检查列表在你进行升级之前都满足要求。
- 一键升级模块使用的版本是否是最新的(你当前的版本为 x.x)。这个用于确定一键升级模块自己的版本是不是最新的版本。如果你才安装这个模块,这里有可能会要求你对这个模块进行升级。
如果你使用的一键升级模块不是最新的版本,请单击为我的计算机安装最新的版本。单击这个链接后,你的界面将会被导航到模块页面中。从这个页面中单击从我的计算机中添加一个模块(Add a module from my computer)来获得预先填写的表单。单击下载这个模块(Download this module)按钮来对模块进行更新。最后,返回到一键升级模块页面中来对安装的模块进行版本检查。 - 你存储的 root 目录具有写入的权限(CHMOD 权限)。确定你的文件系统的写入和读取权限是正确的。如果你没有设置正确的权限,你可以使用 FTP 工具进行修改,例如 FileZilla,或者你也可以直接 SSH 到服务器上对文静权限进行修改。
请查看 配置系统属性Configuring System Properties 页面中的内容来了解如何使用 CHMOD 命令。 - 请确定 PHP 的安全模式(Safe mode)必须是关闭的。
- 请确定 PHP 的 "allow_url_fopen" 选项是打开的或者 CURL 必须被安装。
- 你必须将你的安装实例设置为正在维护(under maintenance)状态。这个用于确定你的购物车实例是处于激活或者正在维护模式的。在升级的过程中,你必须将你的购物车安装实例设置为正在维护模式(文件备份,数据库备份,自动升级,校验),这样可以避免你的用户在你的升级的过程中产生订单失败或者丢失数据。有模块可以提供给你让你将购物车设置为正在维护阶段:简单的单击单击这里将你的购物车设置为正在维护模式(Click here to put your shop under maintenance)按钮。你也可以选择禁用整个购物车,这个按钮位于购物车的属性页面下面:
- PrestaShop 1.4:禁用和启用购物车在主页下面的属性(Preferences)标签页中。
- PrestaShop 1.5 及其后续版本:禁用和启用购物车属性(Preferences)菜单下的维护(Maintenance)页面中。
- 你必须禁用 PrestaShop 的换成特性。希望确定你购物车的缓存是被启用的还是禁用的。在安装的过程中,你需要确保你的缓存是禁用的,程序的安装模块不会替你完成这个操作。
- PrestaShop 1.4:启用和禁用缓存是在 属性(Preferences)标签页中设置的。
- PrestaShop 1.5 及其后续版本:禁用和启用缓存是在高级参数(Advanced parameters)下的属性(Performance)页面。
所有上面的检查项必须完全显示为绿色后才可以进行升级,否则的话升级按钮将不会在界面中显示出来。
Note |
---|
当你的 PrestaShop 安装实例是在你本地的服务器上的时候( 所以在这个情况下,尽管你的 PrestaShop 购物车系统没有在维护模式下,但是升级的过程还是允许你进行的。 换句话说就是当你的 PrestaShop 安装实例使用的 URL 是 localhost 或者 127.0.0.1 的时候,PrestaShop 购物车的运行模式不影响升级的过程。 |
开始你的升级
这个部分将会对你的 PrestaShop 版本和最新的稳定版本进行比较。你可以从这个页面中快速确定你是否需要对 PrestaShop 进行升级或者不需要进行进行升级。如果你希望当有新版可用的时候你能够获得相关的通知,你可以单击检查如果新版本可用(Check if new version available)按钮。
在默认的情况下,升级工具将不会将你的购物车自动升级到下一个主要的版本。这个意思是如果你现在运行的是 1.4.x 版本的话,购物车升级工具将不会主动将你的版本升级到 1.6.x。如果你希望将你的购物车从 1.4.x 升级到 1.6.x,你必须通过单击专家模式(Expert mode)按钮。这时候将会弹出一个窗口显示专家模式(Expert mode),在这里你可以选择如何对你的购物车进行升级。
这个升级工具不仅仅在升级的时候非常有用,当你想对购物车的版本进行检查的时候也非常有用,你可以对比现在官方程序的更新情况。
在对程序进行升级之前,你需要确定你已经完全理解了所有的设置选项。备份选项(Backup options)和升级选项(Upgrade options)部分位于页面的底部(有关这些选项的内容,我们将在其他后续章节中描述),请确定你完全理解所有有关选项的内容。
专家模式
这部分将会确定将你当前的 PrestaShop 安装升级到特定的版本。
可以有的选项有:
- 通道(Channel) 选择你希望使用的发布通道。我们推荐你使用 Minor releases(次要发布),这个发布的版本表示的是当前主版本的稳定发布版本。其他的选择项目有:
- 主要发布(Major releases) The next stable releases from the latest branch: since the current branch is 最后分支的下一个稳定版本:当前的分支版本为 1.6.x, the update tool would use the latest x,升级工具将会使用最新的 1.6 version (as of this writing, 版本(同时也可能表示为 v1.6.0).0)。
- 次要发布(Minor releases) This is the default setting. Uses only the next stable release within the current branch: if you have 这个是默认的设置。 在当前的稳定版本中选择下一个稳定的分支:比如你现在使用的是 PrestaShop 1.4.2 , it will update your shop to 版本,那么尽管 v1.4.9, even if 6.2已经可用了,这个升级也只会升级到 v1.6.2 is available.4.9 版本。
- 发布候选(Release candidates) RC versions are deemed stable enough to be tested by the majority, but not stable enough to be the real release. Use at your own risks.版本表示的是这个版本已经足够稳定了,能够进行一些主要的测试,但是还没有稳定到可用作为发行版本来使用。如果你使用这个版本的话,所有的使用风险将会由你自己来承担。
- Beta 发布(Beta releases),Alpha 发布(alpha releases) These are development versions. Use at your own risks.
- 私有发布(Private release) Sometimes, the PrestaShop developers upload a private test version. If you have the right URL and hash key, you can update to this version easily using this channel. If you check the "Allow major upgrade" box, you indicate that are only interested in major releases.
- 本地归档(Local archive) To be used if you have downloaded the version you want to upgrade to in the correct local folder, 这些版本仅仅是开发测试版本。所有的使用风险将会由你自己来承担。
- 私有发布(Private release) 有时候 PrestaShop 的开发者将会上传一些私有的测试版本。如果你有这些版本正确的 URL 和 Hash key,你可以使用这个通道来很容易的更新为私有发布版本。如果你选择了 Allow major upgrade (允许主要更新)对话框的话,你将会确保你只使用主要更新发布。
- 本地归档(Local archive) 如果你已经下载了更新软件到你的本地服务器上,你希望使用这些归档文件进行更新的话。归档文件将会保存在:
/admin/autoupgrade/download
. Once you have selected archive in the drop-down selector, indicate the version number in the text field (be very exact!).本地目录(Local directory) To be used if you have downloaded and uncompressed the version you want to upgrade to in the 文件夹中。 如果你选择这些更新的话,将会在解压后读取这些归档包的软件版本。 - 本地目录(Local directory) 如果你已经下载了软件更新包,并且解压到
/admin/autoupgrade/latest/prestashop
folder. That 文件夹中。/prestashop
folder must come directly from the archive that you downloaded.
- 分支(branch) Indicates if anything is available in the chosen channel.
- 名字(name)The name of the latest version in the chosen channel.
- url The URL to the latest version in the chosen channel.
- md5 The hash check for the latest version in the chosen channel.
- 文件夹必须从你的下载的归档文件中直接解压。
- 分支(branch) 在你选择的升级通道中任何可用的版本。
- 名字(name)在升级通道中最新版本的名字。
- url 在升级通道中最新版本的 URL。
- md5 在升级通道中最新版本的的 MD5 验证码。
版本比较
如果你很好奇你当前版本和最新版本之间有多少不同的文件,你可以使用版本比较的功能。
如果你对购物车的核心文件进行了修改,更新的话可能会导致程序对你修改的文件进行覆盖,你可以使用查看列表的方式来确定这次升级对你的程序是否安全。
然而,你可以将你修改的文件设置为不可被覆盖的方式来提高你自定义代码的生命周期。请查看开发文档来获得更多的信息。
回滚
本部分仅仅会在最后升级完成后后才会显示。
请查看下面的内容来获得更多的信息。
备份选项
这些选项将会让你在备份的时候具有一些可以进行的操作:
- 备份我的文件和数据库(Backup my files and database) 你必须将你的所有文件进行备份,这个模块将会帮你完成这个操作。你应该永远不要禁用这个设置,除非你知道你将要做什么。
- 备份我的图片(Backup my images) 如果你希望通过上传你的文件来进行一个全新安装的话,你应该需要让模块来帮你做这个工作。
升级选项
这些选项能够让你对升级的过程有所控制:
- 服务器性能(Server performance) 一些共享的主机的服务器性能会比较差,这样可能不会很好的处理服务器的升级过程,甚至会导致升级过程的失败。低(Low)是这个选项的默认选项,如果你的服务器是独立服务器或者有比较高的服务器性能,你可以选择中(Medium)或者高(High)。
- 禁用非原生模块(Disable non-native modules)这里推荐你选择是(Yes),一些非原生的模块可能在你升级的是造成兼容性问题导致升级失败。
- 升级默认主题(Upgrade the "default" theme)升级程序将会用最新的默认主题来覆盖掉现在使用的默认主题。如果你是在默认主题中直接进行修改的,你可以选择否(NO)来不对默认主题进行升级。一般来说,我们不建议对默认主题进行直接修改,你需要将默认主题拷贝成为一个其他的主题后进行修改。如果你对你使用的默认主题进行了修改,启用这个选项将会对你的修改进行覆盖,你的修改将会被丢失(在 1.4 中使用文件夹名字为 prestashop,在 1.5 中使用的名字 default,在 1.6 中使用的名字为 bootstrap-default),如果你使用的是你自己的主题,启用这个选项将会将你的购物车切换到默认主题,并且升级,你的修改是安全的,并不会被升级程序所覆盖。
- 升级默认电子邮件(Upgrade the default e-mails)一个新的升级可能会将电子邮件的模板一同进行升级。在默认的情况下,升级程序将会用最新的电子邮件模板替换掉已有的电子邮件模板,同时也有可能安装新的电子邮件模板。如果你使用了自定义的电子邮件模板,我们建议你保留你的自定义电子邮件模板。你有可能需要对新的电子邮件模板进行自定义,这样才能够让你的电子邮件模板适应新的购物车。
- 一步一步模式(Step-by-step mode)仅在开发模式下有效。如果启用,模块将会按照一步一步的方式进行安装,你需要在每一步中进行确定。
- Display PHP errors. Dev mode only. If enabled, the module will displays PHP errors, which could help you discover server issues that would otherwise stay hidden from view.
升级过程
Once all the indicators in the "pre-Upgrade checklist" section are green, the update button appears in the "Start your Upgrade" section, along with the URL from which the new version will be downloaded.
Clicking the "Upgrade PrestaShop now !" button triggers the whole process.
Once the upgrade process is launched, the whole configuration page is replaced by two sections: "Activity Log" and "Rollback".
The activity log gives you a detailed journal of what the updater is doing, in a screen you can scroll through:
- Removed files: only the sample files are removed, such as empty override classes and controllers.
- Name of the backup archive: the name follows the
auto-backupfiles_V1.6.0.2_20140127-120310-798d3a69.zip
form. - Files added to the backup archive: all the remaining files of your current installation are put into the Zip archive.
- Database tables added to the backup archive: your files are important, but your whole catalog is stored in your database, and is therefore saved in the same archive.
- Removed files: mostly modules, controllers, classes, CSS and JavaScript files. Now that all the files have been saved in the backup archive, they can be safely removed.
- Files copied from the new archive: all the existing files are replaced by their new version.
- Merged translation files.
- Created, deleted, altered and updated database tables.
- Emptied temporary folders: if possible, the upgrader will try and delete the content of the cache folders.
A lot of files are mentioned during the whole process. You do not need to read all the notifications, it's only there for you to peruse in case of error.
You'll know the upgrade is over when the following message "upgrade complete. Please check your front-office theme is functional (try to make an order, check theme)" appears in green, along with the following final log entry: "End of process".
The upgrader also indicates that you should re-enable your shop, but before you do that, you should first check that everything is working in your back-office: no errors, all products and categories are in place with their images and attached files, etc. Until you have checked that everything is okay in your shop, it is better to keep it from the public eye.
Tip |
---|
On first load, pages might look wonky: because your web browser caches files, it is probably using the old CSS files instead of the new ones. Do not hesitate to reload the page several times, or even empty your browser's cache, in order to get the correct interface. |
Info |
---|
When you upgrade from version 1.4 to version 1.6, your menus will not be arranged the way they would be if you made a fresh installation of version 1.6. That is because PrestaShop 1.4 tabs got reorganized into 1.6 menus, and a lot of pages were moved around in order to create consistent menus. Additionally, the upgrader assumes that your 1.4 tabs may have been customized or moved around, either by a module or by your own action. Therefore, rather than breaking the existing settings, the upgrader takes the tabs as-is, and does not re-arrange them into the default 1.6 menu order. If you want to change the position of pages within a menu once you have updated to version 1.6, go the to "Menus" page under the "Administration" menu, and start fiddling with positions. |
Once you have made sure your PrestaShop installation is up and running, you can re-enable your shop using the option in the "Maintenance" page of the "Preferences" menu, then make tests on your front-office: browse products, sort them, try to order one, etc. In short, go through the entire buying process in order to make sure that you won't miss a sale.
Is everything working fine? Congratulations, you know have successfully upgraded your PrestaShop installation!
Warning | ||||
---|---|---|---|---|
| ||||
In some server configurations, an error message might be displayed, saying "Javascript error (parseJSON) detected for action "upgradeNow". Starting restoration...". Follow these steps to solve the error, :
After you have done all this, start the autoupgrade process again. |
Going back to the previous version: rollbacks
Sadly, not all upgrades are successful – which is the very reason why you should always back-up all your files and data, and why PrestaShop performs an additional backup of said files and data by itself, which you should not always count on. Make your own backup first. See the "Making and restoring your own backup" chapter of this guide for more information.
PrestaShop's own backup files are saved on your server, and if it turns out your update has gone badly, you can find them in the "Rollback" section of the configuration page for the 1-Click Upgrade module.
Backup files are created as soon as the upgrade process is started, and are available immediately in the "Choose your backup" drop-down list.
Choose the most recent one. The date and hour of the creation of the backup file are right within the name:Vversion-date-hour-random
, for instance "V1.4.9.0_20120907-114024-f85f41a" for a backup of a previous PrestaShop 1.4.9 installation, made September 7th 2012, at 11:40:24 AM.
The "Rollback" button triggers two actions:
- Takes the files from the latest backup, and re-installs them in place of those from the current installed version.
- Takes the data from the latest backup, and re-installs it in place of that from the current database.
Select the backup archive to which you want to roll back to, and click the "Rollback" button. As with the upgrade process, the whole interface disappears to only leave the "Activity Log" section and the "Rollback" section. You can follow the rollback process in the scrolling journal, and once it is finished, reload the page in order to check that everything is indeed back in place.
Going back to the previous version: restoring your own backup
This is explained in details in the "Making and restoring your own backup" of this guide:http://doc.prestashop.com/display/PS16/Making+and+restoring+your+own+backup.