wordpress 部分页面打开显示连接重置

排查后发现是post_name的字段太长导致的,我使用了固定链接 %post_id.html  没有用post_name作为固定连接。

想改wp_posts 中post_name的字段,发现提示post_date值 Invalid default value for 'date'

找到配置文件my.cnf 在[mysqld]下面添加如下列:

sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

重启数据库

WordPress 也能正常显示了。

猜你喜欢

转载自blog.csdn.net/chenxianxing/article/details/88669975
今日推荐