How to put a wiki in readonly mode?
Version 1.1 by Lucas Charpentier (Sereza7) on 2024/10/24
There’s a property in xwiki.cfg: xwiki.readonly that you can set to true and restart. If you don’t want to restart you can also execute a small snippet with a user having programming rights:
{{groovy}}
def xwiki = xcontext.getXWiki()
xwiki.isReadOnly = true
{{/groovy}}
Note that this flag doesn’t prevent against any modifications in your wiki, there’s still some places where it’s not taking into account, you can see the status here: XWIKI-18437 .
This answer was first provided by @Simon Urli on https://forum.xwiki.org/t/how-to-put-wiki-in-readonly/15787