.user.ini points auto_prepend_file to a missing file: HTTP 500 after a move
サイト所有者に見えていた症状
After the site was moved to another host, every page including the login page returned HTTP 500. The host error log showed "PHP Fatal error: Failed opening required '.../wordfence-waf.php'". A plain file (/license.txt) still returned 200.
出典(公開フォーラムのスレッド): https://wordpress.org/support/?p=17075291
テスト構成と、障害再現後に観測した状態
テストサイト:WordPress 7.1、PHP 8.3。下の表は、レシピどおりに障害を再現した後のトップページとログインページの HTTP ステータスです。
| サーバー構成 | トップページ | ログインページ | 備考 |
|---|---|---|---|
| Apache + PHP-FPM | 500 | — | /license.txt returned 200. The login page status was not recorded in these runs. |
各実行の結果
| 日付(UTC) | サーバー構成 | 接続方式 | 結果 | 製品バージョン | 備考 |
|---|---|---|---|---|---|
| 2026-11-06 | Apache + PHP-FPM | SSH | Not recovered | 2.1.434 | The re-check did not pass, and the system issued the automatic recovery-fee refund (payment is simulated in the lab). |
| 2026-11-06 | Apache + PHP-FPM | SSH | Declined at the pre-payment check | 2.1.434 | The pre-payment check timed out. |
| 2026-11-06 | Apache + PHP-FPM | SSH | Recovered | 2.1.435 | |
| 2026-11-06 | Apache + PHP-FPM | FTP | Case did not complete | 2.1.434 | Copying the site over FTP stalled and the case did not reach the health check. |
| 2026-11-06 | Apache + PHP-FPM | FTP | Declined at the pre-payment check | 2.1.434 | The pre-payment check timed out. |
| 2026-11-06 | Apache + PHP-FPM | FTP | Recovered | 2.1.435 | The FTP server offered explicit TLS and the product used it. |
ギャップと修正版
「復旧」以外で終わった実行はすべてここに記載します:変更内容、修正を含むバージョン、再実行の日付と結果。
| 発見日 | サーバー構成 | 接続方式 | 変更内容 | 修正版 | 再実行 |
|---|---|---|---|---|---|
| 2026-11-06 | Apache + PHP-FPM | SSH | The recovery removed the broken setting on the copy, but the copy's PHP kept the old setting cached and the re-check failed. The copy now reloads PHP after the change. | 2.1.435 | 2026-11-06 · Recovered |
| 2026-11-06 | Apache + PHP-FPM | SSH | The pre-payment check timed out on this setup; it no longer does. | 2.1.435 | 2026-11-06 · Recovered |
| 2026-11-06 | Apache + PHP-FPM | FTP | Copying the site over FTP stalled and the case did not reach the health check. The copy step no longer stalls on this setup. | 2.1.435 | 2026-11-06 · Recovered |
| 2026-11-06 | Apache + PHP-FPM | FTP | Over plain FTP, passive-mode replies were dropped between the recovery station and the test server, and the pre-payment check timed out. The product now uses explicit TLS when the server offers it. The re-test was run after the test server was set to offer TLS; plain FTP on this path has not been re | 対応中 | — |
この事例が対象とする問題の種類
補足
On this setup PHP-FPM re-reads .user.ini on a cache interval, so a change to that file takes effect after a delay rather than on the next request.
これらは当社のテストサーバー上で、特定のバージョン・特定の日に記録したものであり、どのサイトについても結果を約束するものではありません。ホスティング、PHP、WordPress のバージョンが異なれば結果も異なることがあります。