|
| 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. |
0 commit comments