如何在修改 MediaWiki 中的 LocalSettings.php 文件后强制重新加载配置

How to force reload of configuration after modifying LocalSettings.php file in MediaWiki

我需要在修改后重新加载配置 LocalSettings.php 而无需重新启动 Apache。

怎么可能?

亲切的问候

如果您的 LocalSettings.php 缓存在 opcache 中,您需要刷新它。它是如何完成的,被告知 here。简而言之:

  • mod_php: apachectl graceful,
  • php-fpm: service php-fpm reload,
  • CGI 或 FastCGI:不需要。

如果您有 APC:this answer