1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu18.04 WordPressのパーマリンクを設定すると「返答が正しい JSON レスポンスではありません」のエラーで記事が保存できない問題

Posted at

環境

  • Ubuntu 18.04
  • Apache2
  • WordPress 5.4.2

問題の概要

WordPress管理画面の設定で「パーマリンク」を「基本」以外に設定したところ、記事を下書き/公開しようとしたときに「返答が正しい JSON レスポンスではありません」というエラーメッセージが出て保存できない不具合に遭遇し、小一時間格闘しました。

結論

Apache2でmod_rewriteモジュールを有効化したところ解決しました。
パーマリンクを有効にする場合、ApacheでURLをリライトするようですが、モジュールがないので処理がエラーになっていたようです。

方法

sudo a2enmod rewrite
sudo systemctl restart apache2

これだけです。
初期でリライトモジュールが有効になっていないというのも驚きですね。。

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?