Skip to content

Commit 498b3b1

Browse files
authored
Merge pull request plone#1322 from plone/upgrade-guide
Add old upgrade guide, update it and integrate with new chapters
2 parents 776a085 + 4da1f6b commit 498b3b1

26 files changed

+4083
-106
lines changed
71.1 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Upgrade Plone add-on products"
5+
"property=og:description": "Upgrade Plone add-on products"
6+
"property=og:title": "Upgrade Plone add-on products"
7+
"keywords": "Upgrade, Plone, add-on, products"
8+
---
9+
10+
(upgrade-add-on-products-label)=
11+
12+
# Upgrade add-on products
13+
14+
This chapter describes the steps to migrate your third party products.
15+
16+
- Shut down your Plone server instance.
17+
- If you pinned versions of third-party products in your `buildout.cfg` or other configuration files, such as `Products.PloneFormGen = 1.7.17`, update these references to point to the new versions.
18+
19+
```{note}
20+
Without pinning, such as specifying `Products.PloneFormGen` without a version number, your build tool, buildout or make, will pick the newest version of the products by default.
21+
```
22+
23+
- Run your build tool.
24+
Wait until all new software is downloaded and installed.
25+
- Start Plone again.
26+
Your site may look weird, or even be inaccessible, until you perform the next step.
27+
- Navigate to the Add-on screen by adding `/prefs_install_products_form` to your site's URL.
28+
Upgrade products if you can.
29+
Upgradeable products would be those that support both your current and new versions of Plone.
30+
- Perform product-specific upgrade procedures, if any.
31+
You will find these in the documentation of each product.
32+
33+
If `/prefs_install_products_form` is unreachable, and you are using Plone 5.0.x or earlier, you should try doing the add-on upgrades from the Management Interface.
34+
Navigate to the `portal_quickinstaller` in the Management Interface at `/portal_quickinstaller/manage_installProductsForm`, and reinstall or upgrade products that are shown to be outdated.
35+
36+
```{versiondeprecated} 5.1
37+
`portal_quickinstaller` was deprecated in Plone 5.1, and was removed in Plone 6.0.
38+
See [PLIP 1775](https://github.com/plone/Products.CMFPlone/issues/1775) and {ref}`upgrade-5.1-do-not-use-portal_quickinstaller-label` for Plone 5.1 and later.
39+
```
40+
41+
```{warning}
42+
Be careful when updating add-ons through the Management Interface.
43+
It may show outdated themes as well, with a hint to update.
44+
If you do that, the updated theme will activate itself, overriding your current theme.
45+
If this happens, re-enable your theme in the theming panel.
46+
```

docs/backend/upgrading/index.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
---
22
myst:
33
html_meta:
4-
"description": ""
5-
"property=og:description": ""
6-
"property=og:title": ""
7-
"keywords": ""
4+
"description": "Plone Upgrade Guide"
5+
"property=og:description": "Plone Upgrade Guide"
6+
"property=og:title": "Plone Upgrade Guide"
7+
"keywords": "Plone Upgrade Guide"
88
---
99

10-
(backend-upgrading-index-label)=
10+
(plone-upgrade-guide-label)=
1111

12-
# Upgrading the Backend
12+
# Plone Upgrade Guide
13+
14+
This part of the documentation describes how to upgrade an existing Plone installation.
15+
16+
This guide focuses on [Unix-like](https://en.wikipedia.org/wiki/Unix-like) environments, although the discussion may be useful for every platform.
1317

1418
```{toctree}
15-
:caption: Upgrading the Backend
19+
:caption: Upgrade Guide
1620
:maxdepth: 2
17-
:hidden:
1821
19-
v60
20-
migrate-to-volto
22+
intro
23+
preparations
24+
add-on-upgrade
25+
troubleshooting
26+
version-specific-migration/index
2127
```

docs/backend/upgrading/intro.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Introduction to upgrading Plone"
5+
"property=og:description": "Introduction to upgrading Plone"
6+
"property=og:title": "Introduction to upgrading Plone"
7+
"keywords": "Introduction, Upgrading, Plone, migration, version"
8+
---
9+
10+
(introduction-label)=
11+
12+
# Introduction
13+
14+
This part of the documentation describes how to upgrade an existing Plone installation.
15+
For most people, this means upgrading Plone to a newer release, for example, from 5.2.9 to 6.0.0.
16+
This guide applies to all modern versions of Plone.
17+
For unsupported versions from the year 2009 and before, see older versions of this documentation.
18+
19+
Upgrading Plone includes the Plone application and its add-ons, as well as migration of its content.
20+
21+
A *migration* is the process of taking a component in your Plone site, and moving it from its current version to a newer one.
22+
Migration is necessary because the internals of Plone sometimes change to support new functionality.
23+
When that's the case, the content that is stored in your Plone instance may not align with the requirements of the new version.
24+
To handle this situation, Plone has a built-in tool that migrates existing content to the new structure.
25+
26+
Before migrating you should read this entire document, as well as {ref}`introduction-version-specific-upgrade-guides-label`, to understand the potential impact migrating will have on your Plone site.
27+
It is also wise to read the {doc}`troubleshooting` chapter, in case you run into any issues.
28+
29+
30+
(introduction-versioning-policy-and-numbering-label)=
31+
32+
## Versioning policy and numbering
33+
34+
Plone follows [semantic versioning](https://semver.org/) to communicate what users and developers can expect from a release regarding breaking changes, new features, and bug fixes.
35+
We use a three-digit version scheme (e.g., `6.0.0`), following the `major.minor.patch` scheme.
36+
37+
(introduction-versioning-policy-breaking-or-major-release-label)=
38+
39+
### Breaking (major) release
40+
41+
A _breaking_ release indicates a change that might break an application or third-party add-on that relies on Plone.
42+
The version numbering would increase as in the following example.
43+
44+
````
45+
5.2.3 -> 6.0.0
46+
````
47+
48+
For every breaking release, details of what breaks and how to mitigate it must be documented in the change and release notes.
49+
50+
51+
(introduction-versioning-policy-feature-minor-release-label)=
52+
53+
### Feature (minor) release
54+
55+
A _feature_ release indicates that a new feature has been added to Plone in a non-breaking fashion.
56+
The version numbering would increase as in the following example.
57+
58+
````
59+
5.1.7 -> 5.2.0
60+
````
61+
62+
You do not have to expect any breaking changes from such a release.
63+
It is possible that the user interface changes, due to a new feature that has been added.
64+
65+
66+
(introduction-versioning-policy-bugfix-patch-release-label)=
67+
68+
### Bugfix (patch) release
69+
70+
A _bugfix_ release indicates one or more bugs in Plone have been fixed.
71+
The version numbering would increase as in the following example.
72+
73+
````
74+
5.2.8 -> 5.2.9
75+
````
76+
77+
There should be no breaking or UX/UI changes from such a release.
78+
It just fixed a bug.
79+
80+
```{seealso}
81+
A post on the Community forum, [Rules for Plone 6 development during the beta stage](https://community.plone.org/t/rules-for-plone-6-development-during-the-beta-stage/15432), discusses alpha and beta versioning.
82+
```
83+
84+
85+
(introduction-version-specific-upgrade-guides-label)=
86+
87+
## Version-specific upgrade guides
88+
89+
In addition to the general upgrade procedure, there are {doc}`version-specific migration guides <version-specific-migration/index>`.
90+
These guides contain specific instructions and valuable information that has been collected from real-life migration cases.
91+
92+
This approach is recommended for all upgrades of minor versions, and can work fine for most major upgrades.
93+
When dealing with major changes in Plone, or with very large or complex installations, an {ref}`export-import based migration <introduction-upgrade-strategies-export-import-migrations-label>` is often the better solution.
94+
95+
(introduction-upgrade-strategies-label)=
96+
97+
## Upgrade strategies
98+
99+
100+
(introduction-upgrade-strategies-in-place-migrations-label)=
101+
102+
### In-place migrations
103+
104+
An in-place migration means the content and settings of a Plone installation are being updated while Plone is running.
105+
These upgrades use a built-in tool.
106+
They run upgrade steps that are collected in [plone.app.upgrade](https://github.com/plone/plone.app.upgrade/).
107+
108+
This approach is recommended for all upgrades of feature (minor) versions.
109+
This usually works fine for most breaking (major) upgrades as well.
110+
111+
When dealing with major changes in Plone, or with very large or complex installations, an {ref}`export-import <introduction-upgrade-strategies-export-import-migrations-label>` based migration is often the better solution.
112+
113+
During in-place migrations, it is advisable **not to skip over** breaking (major) version numbers.
114+
115+
Going from Plone 5.2 to Plone 6.0 is fine.
116+
117+
If you are at Plone 2.5 and want to upgrade to the latest Plone 6, you should approach this in several steps:
118+
119+
- First upgrade from Plone 2.5 to the latest Plone 3 version (3.3.6).
120+
- Then upgrade from Plone 3 to the latest Plone 4 version (4.3.20).
121+
- Then upgrade from Plone 4 to the latest Plone 5 version.
122+
- Then upgrade from Plone 5 to the latest Plone 6 version.
123+
124+
125+
(introduction-upgrade-strategies-export-import-migrations-label)=
126+
127+
### Export-import migrations
128+
129+
Export all content and settings that you want to keep from an old site and import it into a fresh site.
130+
131+
This approach allows you to migrate from Plone 4 to 6, from Python 2 to 3, and from Archetypes to Dexterity, in one migration step.
132+
It is recommended for large and complex migrations.
133+
134+
The recommended tool for this is [`collective.exportimport`](https://github.com/collective/collective.exportimport).
135+
An alternative is `transmogrifier` (see the training {ref}`training:transmogrifier-label`).
136+
137+
138+
(introduction-major-changes-label)=
139+
140+
## Major Changes
141+
142+
The following major changes in the history of Plone require special attention when migrating.
143+
144+
145+
(introduction-plone-5.0-dexterity-replaces-archetypes-label)=
146+
147+
### Plone 5.0: Dexterity replaces Archetypes
148+
149+
With Plone 5.0 the default framework for content types switched from Archetypes to Dexterity.
150+
151+
Up through Plone 5.2.x, there is a built-in migration from Archetypes to Dexterity, but it only supports Python 2.
152+
See [Migration](https://pypi.org/project/plone.app.contenttypes/2.2.3/#migration) in the latest stable release of `plone.app.contenttypes` for details on the migration of custom and default content types to Dexterity.
153+
154+
Using [collective.exportimport](https://pypi.org/project/collective.exportimport/) you can export Archetypes content and import it as Dexterity content.
155+
156+
157+
(introduction-plone-5.2-support-for-python-3-label)=
158+
159+
### Plone 5.2: Support for Python 3
160+
161+
Plone 5.2 added support for Python 3, while Plone 6.0 dropped support for Python 2.
162+
This means that you can use Plone 5.2 to upgrade to Python 3.
163+
164+
This requires that you run Plone in Python 3 and only use code that supports Python 3.
165+
It also requires that you migrate the database in a separate step from Python 2 to 3 while Plone is not running.
166+
167+
See the chapters {doc}`version-specific-migration/upgrade-to-python3` and {doc}`version-specific-migration/upgrade-zodb-to-python3` for detailed information on these steps.
168+
169+
Using [collective.exportimport](https://pypi.org/project/collective.exportimport/), you can export content from Python 2 and import it in Python 3.
170+
171+
172+
(introduction-plone-6.0-volto-as-new-frontend-label)=
173+
174+
### Plone 6.0: Volto as new frontend
175+
176+
Plone 6.0 comes with a new default frontend called {term}`Volto`.
177+
It is written in React, and expects some subtle but important changes.
178+
179+
See {ref}`backend-migrate-to-volto-label` for the specific migration steps.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Plone upgrade preparations"
5+
"property=og:description": "Plone upgrade preparations"
6+
"property=og:title": "Plone upgrade preparations"
7+
"keywords": "Plone, upgrade, preparations"
8+
---
9+
10+
11+
(upgrade-preparations-label)=
12+
13+
# Preparations
14+
15+
This chapter lists things to do before you migrate Plone.
16+
17+
18+
(upgrade-gather-informationlabel)=
19+
20+
## Gather information
21+
22+
- Read the "What's new in..." for your relevant Plone version, and read the release notes.
23+
You will find these in the [online directory of released versions on `dist.plone.org`](https://dist.plone.org/release/).
24+
As an example, you can find the file [`RELEASE-NOTES.md` for 6.0.0b2](https://dist.plone.org/release/6.0.0b2/RELEASE-NOTES.md).
25+
- Check for dependencies.
26+
27+
- Read the release notes of the Plone release to which you are upgrading, in particular:
28+
29+
- What version of Python is required?
30+
- What version of Zope is required?
31+
- Do you need any new Python libraries?
32+
33+
- Make sure all the add-on products you are using have been updated to support the version of Plone to which you are upgrading.
34+
- Start with the third-party products that are in use on your site.
35+
Verify that they have been updated or verified to work on the new version, and get them upgraded in your existing instance before you start the Plone/Zope/Python upgrade, if possible.
36+
- If Zope depends on a newer version of Python, install the new version of Python first.
37+
- If the newer version of Plone depends on a newer version of Zope, you will need to install that before proceeding with the Plone upgrade.
38+
39+
```{seealso}
40+
Zope has its own documentation of migration guidelines.
41+
Of most interest for migration are the following documents.
42+
43+
- [What's new](https://zope.readthedocs.io/en/latest/news.html) at a high level.
44+
- [Migrating between Zope versions](https://zope.readthedocs.io/en/latest/migrations/index.html).
45+
- [Detailed changelog](https://zope.readthedocs.io/en/latest/changes.html).
46+
47+
If Plone is being upgraded at the same time as a Zope version, Plone will usually handle the Zope upgrade with its own migration script.
48+
```
49+
50+
51+
(upgrade-back-up-your-Plone-site-label)=
52+
53+
## Back up your Plone site
54+
55+
```{danger}
56+
Always back up your Plone site before upgrading.
57+
```
58+
59+
```{seealso}
60+
See Plone 5.2 documentation, [Backing up your Plone deployment](https://docs.plone.org/manage/deploying/backup.html).
61+
```
62+
63+
```{todo}
64+
Migrate the Plone 5.2 docs for Backing up your Plone deployment into Plone 6 docs.
65+
```
66+
67+
68+
(upgrade-setup-a-test-environment-to-rehearse-the-upgrade-label)=
69+
70+
## Setup a test environment to rehearse the upgrade
71+
72+
```{danger}
73+
Never work directly on your live site until you know that the upgrade was successful.
74+
```
75+
76+
Always create a test environment to rehearse the upgrade.
77+
Copy your instance into a new environment and upgrade the copy.
78+
This is a good way of working through your third-party products and dependencies in preparation for the final upgrade of the live site.

0 commit comments

Comments
 (0)