




























在站点的生命周期中,新版本的CMS是一个重要事件。并且转换应当是简单的。然而不幸的是,orchard目前并没有一个自动升级的机制。本主题将展示怎样尽量无痛苦的升级到新版本而保证你的数据安全。
不管你采取何种方式升级你的网站,在这过程中你都要重写很多文件, you are going to have to overwrite a lot of files in the process. This should emphasize the requirement to backup first, but it should also call your attention to any modifications you made to common files. For example, if you made any modifications to core modules and/or the framework (something you shouldn't do: custom modules and themes should be used instead), you will loose them, or you will need to re-apply your changes after the upgrade. Any modification you made to web.config or other common files will also need to be re-applied after the process.
If you made modifications to permissions on the files and folders inside your site, they may also get reset in the upgrade and need to be re-applied.
下列的指导意见只适用单独的Orchard web站点,如果你是工作在源代码的orchard,请看相关的部分。
强烈建议在整个升级过程中工作在一个本地站点的备份中进行
If you are upgrading from 1.0, the Recipes feature is disabled at this point, and unfortunately it can't be enabled from the admin UI. Open an Orchard command-line and execute the following command:
feature enable Orchard.Recipes
Alternatively, if you can't run the command-line, you can use the web command-line from the Experimental module. Once the Web Command Line feature has been enabled, the web command-line can be navigated to by going to /Experimental/Commands. A third alternative is to unzip the following archive under a new Upgrade.From.1.0 folder under Modules: Upgrade.From.1.0.zip. Enabling the Upgrade From 1.0 feature will enable the Recipes module. Once this is done and you've verified that Recipes are enabled, you can safely delete the upgrade.from.1.0 folder from Modules. * Go to the Orchard Gallery and get the latest version of all the modules you have on your site.
You can deploy the locally upgraded site to your production server using your preferred deployment solution. That might be Visual Studio Web deployment, WebMatrix, or even FTP. You again have a choice of wiping out the target directory before you deploy. Make your choice depending on your deployment method, how clean you want the resulting directory to be, and on how long it's acceptable to keep the site down.
As you deploy, make sure that the target settings.txt files aren't overwritten, so that the production site continues to point to the production database.
While you deploy, you might want to shut the site down by dropping an appoffline.htm_ file into the root. Remove that file once you're done.
It is possible to upgrade a site in-place, if you can't or don't want to work with a local copy and then publish it. The procedure is less clean but it works.
If you are upgrading from 1.0, the Recipes feature is disabled at this point, and unfortunately it can't be enabled from the admin UI. Open an Orchard command-line and execute the following command:
feature enable Orchard.Recipes
Alternatively, if you can't run the command-line, you can use the web command-line from the Experimental module. Once the Web Command Line feature has been enabled, the web command-line can be navigated to by going to /Experimental/Commands. A third alternative is to unzip the following archive under a new Upgrade.From.1.0 folder under Modules: Upgrade.From.1.0.zip. Enabling the Upgrade From 1.0 feature will enable the Recipes module. Once this is done and you've verified that Recipes are enabled, you can safely delete the upgrade.from.1.0 folder from Modules.
You are done.
You're done.
If you are working with a source code enlistment, the update process is going to be extremely simple because you are already going through it every time you sync your source code directory with the repository. When the time comes to upgrade, just get the latest changes and sync to the latest in the default branch.
The Import/Export module can be used to do clean data migrations from one version to another.
Occasionally, we may release small updates in the form of a patch to one or several dlls. These patch files are regular zip files that contain updated dll files.
To install such a patch, first extract the zip, then make a copy of the version of those files that are already in the bin folder of your site. Then, replace the existing copy with the one from the patch file.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。