web関連

【wordpress】一般設定でエラー出て保存できない

【wordpress】一般設定でエラー出て保存できない

サブディレクトリで運用中のwordpressで「一般設定」で保存しようとするとエラーがでてたので調べた件
(ルートディレクトリは.htaccessとindex.phpのみ)

サブディレクトリ内にindex.phpがなかった

ルートディレクトリにwordpressを置かず、サブディレクトリでwordpressを運用しようとする際にサブディレクトリ内の「index.php」をルートディレクトリにあげるという工程があるんだけど、「コピー」じゃなくて「移動」させちゃっててサブディレクトリ内に「index.php」がなくなったことが原因だった…
サブディレクトリにも「index.php」を置いたら直った。

↓サブディレクトリで構築中のwordpressをルートで運用する方法

実際に出たエラー

一般設定にすでに出てたエラー

Warning: fileperms(): stat failed for /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/index.php in /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/wp-admin/includes/file.php on line 1423

エラー出た状態で「変更を保存」押したら真っ白な画面に↓のエラーでた

Warning: fileperms(): stat failed for /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/index.php in /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/wp-admin/includes/file.php on line 1423

Warning: Cannot modify header information - headers already sent by (output started at /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/wp-admin/includes/file.php:1423) in /home/(サーバー初期ドメイン)/www/(ドメイン名)/(サブディレクトリ)/wp-includes/pluggable.php on line 1219

▼参考
http://delight-net.org/archives/562

「/wp-admin/includes/file.php」側に問題あるよってエラー出てたけど、index.phpが無かったのが問題だったっていうね。
なんだかよくわからないファイルのエラーで怖かったわー