LoginSignup
0
0

More than 3 years have passed since last update.

【WordPress】サーバ移転でNotFoundになる場合の解決策

Posted at

きっかけ

WordPressのサイトをサーバ移転したところ、グローバルナビがリンク切れになった。
image.png

対策

2ヶ所を調整する。
① httpd.conf や .htaccess で Require all granted 行を追加する。
.htaccess が使えるならサービス再起動不要なのでよい。

httpd.conf
<Directory "/var/www">
    AllowOverride All
    Require all granted
</Directory>
# systemctl restart httpd などサービス再起動する。
.htaccess
    Require all granted

② WordPress のパーマリンク設定を開き、単に「変更を保存」ボタンをクリックする。
変更されない場合は、便宜上どれか選択肢を選んで設定保存してまた戻して設定保存する。
image.png

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0