初期診断

Invalid line in .htaccess after a plugin update: HTTP 500 on every page

レシピ 20261105-htaccess-bad-waf-block · 最新の実行 2026-11-06 · 初回公開 2026-11-09 · 更新 2026-11-09 · Forum case

サイト所有者に見えていた症状

A security plugin update wrote a line into .htaccess that Apache does not recognize. Every page, including the login page, returned HTTP 500, and the Apache error log showed "Invalid command".

出典(公開フォーラムのスレッド): https://wordpress.org/support/topic/server-error-after-updating-to-1-5-5-quick-fix-and-update-to-1-5-6/

テスト構成と、障害再現後に観測した状態

テストサイト:WordPress 7.1、PHP 8.3。下の表は、レシピどおりに障害を再現した後のトップページとログインページの HTTP ステータスです。

サーバー構成トップページログインページ備考
Apache + PHP-FPM500500Apache error log: Invalid command.
nginx + PHP-FPM200200nginx does not read .htaccess; the failure does not occur on this setup, so no run was made here.

各実行の結果

日付(UTC)サーバー構成接続方式結果製品バージョン備考
2026-11-06Apache + PHP-FPMSSHRecovered2.1.434The recovery removed the one unrecognized line and kept the other rules.
2026-11-06Apache + PHP-FPMFTPDeclined at the pre-payment check2.1.434First FTP attempt; see gaps.
2026-11-06Apache + PHP-FPMFTPRecovered2.1.434Second FTP attempt after the change below.
2026-11-06Apache + PHP-FPMSSHRecovered2.1.435Re-test after later changes shipped.

ギャップと修正版

「復旧」以外で終わった実行はすべてここに記載します:変更内容、修正を含むバージョン、再実行の日付と結果。

発見日サーバー構成接続方式変更内容修正版再実行
2026-11-05Apache + PHP-FPMSSHThe pre-payment check declined a site that returned HTTP 500 on every page, which is the state the site owner reports. The check now accepts a site in this state.2.1.4342026-11-06 · Recovered
2026-11-06Apache + PHP-FPMFTPOn an FTP server that hides dot-files from directory listings, the check treated .htaccess as missing. The check now sees hidden files.2.1.4342026-11-06 · Recovered

この事例が対象とする問題の種類

補足

The first attempt, on 2026-11-05 over SSH, was declined at the pre-payment check (first row in the gaps table). The product version of that attempt was not recorded, so it is not listed as a run.

これらは当社のテストサーバー上で、特定のバージョン・特定の日に記録したものであり、どのサイトについても結果を約束するものではありません。ホスティング、PHP、WordPress のバージョンが異なれば結果も異なることがあります。

初期診断 →