Rerun the Distribution Wizard on an Empty Instance
Last modified by Eleni Cojocariu on 2026/08/18 15:19
Steps
Emptying an instance makes the Distribution Wizard run from the start again on a wiki that has already been set up, which is how a test instance is brought back to the state of a fresh install.
- Stop the Servlet Container.
- Drop and recreate the main database, and drop the databases of the subwikis if the farm has any. With MySQL:
DROP DATABASE xwiki; CREATE DATABASE xwiki CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; GRANT ALL PRIVILEGES ON xwiki.* TO 'xwiki'@'localhost'; - Empty the permanent directory, which is the environment.permanentDirectory property of xwiki.properties. On an installation from the Debian packages:
sudo rm -rf /var/lib/xwiki/data - Start the Servlet Container and open the wiki in a browser.
- The Distribution Wizard greets you as on a new install, as follows:

FAQ
Is the wiki content recoverable afterwards?
No. The database and the permanent directory are the whole of the wiki, so export what matters beforehand.
Why is emptying the database not enough?
Because the permanent directory keeps the record of the runs the wizard has already made, which stops it from opening again.