Manual:$wgReadOnly/pl

Szczegóły
Działa podobnie jak $ReadOnlyFile, jednak używa zmiennej tekstowej zamiast pliku.

Jeżeli ustawiona jako ciąg w "LocalSettings.php",  blokuje edytowanie, wyświetlając podany jako ciąg powód. Podany powód ma pierwszeństwo przed zawartością MediaWiki:Readonlywarning.

Powyższy przykład blokuje bazę danych i pokazuje domyślny komunikat na stronach edycji i dodatkowo pokazuje dodany ciąg  jako wyjaśnienie, dlaczego baza danych została zablokowana. Wikitext is allowed in this string and will be rendered when the read-only warning is shown which can be used to provide links or highlight upgrade notifications.

Upgrading
Since MediaWiki 1.27, running the upgrade script will not work if  is set.

A simple solution is to set it to read only when not running from the command line, which will not affect the command line update script:

Sessions
If sessions are not stored on an external caching system such as Redis or Memcached, users may get logged-out, and no further login attempts would succeed during the time the wiki is set read only, receiving a message similar to.

Pamięć podręczna DB
Caches that use the database cannot be written to during read only mode, which could prevent more than just editing (depending on the configuration, logging in or even viewing pages). This can be avoided by disabling cache, albeit at the cost of making your wiki slow. This can be accomplished with the following settings in LocalSettings.php:

If you want your wiki to be fast, while still not using the DB, you should consider using something like Memcached. See  and   for details. If you want to enable logins while the database is readonly, at least  needs to be set to some real non-DB caching mechanism.

Miniaturki
When in read-only mode, images which need to be transformed or scaled will be shown as an error message instead of as an image. To avoid this problem, put the following in the "LocalSettings.php" file: