在编辑 WordPress 文章时提示“您正在编辑展示最新文章页面”,如图:文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
解决方法:文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
进入phpmyadmin → 当前数据库 → wp_posts 表 → 结构 → 第一行(名字为ID的那行) → 修改 → 勾选A_I → 保存, 之后查看额外会变成:AUTO_INCREMENT文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
再次打开wp_postmeta表,检查第一行meta_id额外是否也有这个:AUTO_INCREMENT,同样修改一下。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
看看是不是正常了。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
产生这个问题的原因,大概是之前进行过数据库导出导入操作,造成数据库结构损坏,网上说导入时不要勾选“不要给零值使用自增 (AUTO_INCREMENT)”文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
经测试,删除这个“AUTO_INCREMENT”,并没有复现问题,上述方法只能自己测试了。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
另一个方法:文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
尝试使用WP内置的数据库修复功能。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
在配置文件wp-config.php中添加:文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
define( 'WP_ALLOW_REPAIR', true );
然后打开:域名/wp-admin/maint/repair.php文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
点击“修复数据库”。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
用后删除添加的代码。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html
还有一种情况会出现这个提示,当一个页面,在阅读设置中 → 您的主页显示 → 一个静态页面(在下方选择) 被设置为文章页,也会提示“您正在编辑展示最新文章页面”。文章源自知更鸟-https://zmingcx.com/you-are-currently-editing-the-page-that-shows-your-latest-posts.html

2022年3月31日 11点15分 1F
支持鸟叔