Manual:$wgReadOnly/ja

詳細
機能上は、この設定は  と同じですが、ファイルの代わりに変数を使用する点が異なります.

「LocalSettings.php」内で  に文字列を設定した場合は、編集が拒絶され、変数に指定した文字列が理由として表示されます. 指定した理由の前に MediaWiki:Readonlywarning の内容が表示されます.

上記の例は、データベースをロックし、編集画面に既定のメッセージを表示し、さらにデータベースがロックされている理由の説明として「 」を表示します. 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.

In contrast to its name, this settings does not make the database read only! Even if  is set, extensions, API scripts and other cachable events can write data nonetheless.

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.

Thumbnails
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 LocalSettings.php: