分类
WordPress

WordPress Publishing The response is not a valid JSON response的解决办法(centos7更新php到7.0)

在更新完WordPress之后,本来高兴得准备写点啥纪念以下,结果登陆了控制台出现了:

这是Warning?anyway管他呢。然后就开始了写文章的操作。

当写完了文章点击Publish之后,出现了…

发布失败。错误信息:此响应不是合法的JSON响应。

(这张图片转自https://blog.naibabiji.com/skill/wordpress-fa-bu-wen-zhang-shi-bai.html,自己的图没保存下来)

然后经过一系列的搜索和排查,原因锁定在了我的阿里云服务器php版本太低了,据说5.3.2支持最低php版本为5.6.20,看了自己的php版本5.5.14…然后升级一下php版本即可:(需要用ssh登陆服务器操作)

以下以php7.0为例

1.确认你当前安装的php版本:

php -v

2.卸载老版本php:

yum remove php* php-common

3.安装Remi和EPEL数据源(仓库)

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

4.安装新版本:

yum clean all

yum install php70w

5.重启php-fpm:

systemctl restart php-fpm

6.检查你的Php版本

php -v

 

引用和参考:

https://www.wpdaxue.com/minimum-php-version-update.html

https://www.wpdaxue.com/wordpress-5-3-php-native-json-extension-now-required.html

https://blog.csdn.net/baidu_35297131/article/details/89960654

“WordPress Publishing The response is not a valid JSON response的解决办法(centos7更新php到7.0)”上的2条回复

Long time supporter, and thought I’d drop a comment.

Your wordpress site is very sleek – hope you don’t mind me asking what theme you’re using?

(and don’t mind if I steal it? :P)

I just launched my site –also built in wordpress like yours–
but the theme slows (!) the site down quite a bit.

In case you have a minute, you can find it by searching for “royal cbd” on Google (would appreciate any feedback) – it’s still in the works.

Keep up the good work– and hope you all take care of yourself
during the coronavirus scare!

thanks for visiting my site 🙂 the theme i am using is 2020 and the wordpress version is 5.3.2. have a nice day

发表评论

电子邮件地址不会被公开。 必填项已用*标注