WordPressのoptions.phpの設定が反映されない時の対処
あらすじ
“image_default_link_type“の設定を変えようと思ってoptions.phpで設定を変更しても全く変わらない。
変更前

変更して保存。

「設定を保存しました。」の表示を確認してから、再度設定を見ると変更前の”none”から変わらず。

参考
対処
PHPで一度にPOSTできる上限数が超えてるのが原因っぽいので、php.iniの”max_input_vars”を変更して対処。
PHP7.4の場合は未設定だとデフォルトで”1000″となっているようなので”10000″に変更。

ubuntuの場合、php.iniは /etc/php/x.x/apache2/php.ini
にあります。
1 2 3 |
; How many GET/POST/COOKIE input variables may be accepted ;max_input_vars = 1000 max_input_vars = 10000 ; 追加 |
Apache2を再起動して再度option.phpで設定を変更して値が変われば成功。
1 |
systemctl restart apache2 |

おわい
options.phpの画面重すぎ。
おわい