Upgrade XWiki Installed from the Debian Packages
Steps
To upgrade an XWiki instance installed from the Debian packages:
- Back up the database, the configuration files and the permanent data.
- Check the Release Notes of every version between the one you are running and the one you are upgrading to.
- Update the packages index:
sudo apt update - Upgrade the packages, which upgrades every package installed on the system and not only XWiki:
sudo apt upgrade - Check that migrations are enabled, as described in Database Upgrade.
- Restart the servlet container.
- Upgrade the flavor from a browser, which the Distribution Wizard offers as soon as you log in.
The wiki then runs the new version, and its Pages are the ones the flavor upgrade installed.
FAQ
How do I upgrade XWiki without upgrading every other package?
Install the top-level package instead of running a full upgrade: sudo apt install xwiki-tomcat11-mariadb, replacing the name with the package you actually installed.
Why does apt refuse to upgrade the xwiki packages?
Either a dependency cannot be found, because the new XWiki version requires a Java version that your repository has no package for (see the "No package can be found for Java" section of Installation using Debian/Ubuntu (.DEB) packages), or the package name changed because XWiki dropped support for the servlet container version you were using.
What do I do when XWiki drops support for my servlet container?
Stop and remove the old container, which also removes the XWiki packages that depend on it, then install the package for the new container and the database you already use: sudo systemctl stop tomcat10, sudo apt remove tomcat10, sudo apt install xwiki-tomcat11-mariadb — the xwiki-xjetty-* packages follow the same naming. Two versions of Tomcat cannot run at the same time by default, which is why the old one has to be removed first.