【WordPress】辣鸡历史版本

背景

WordPress不知从何时起,开始保存一篇文章的历史版本
还™一分钟就保存一次 (╯‵□′)╯︵┻━┻
作为一名强迫症患者,这让我非常不爽
于是今天查了查,干掉了这个辣鸡玩意儿

解决方案

主要是参考了这里:http://www.pythoner.com/27.html
说简单一点,就是打开wp-includes/defaut-contants.php
然后将下面两个东西的值改成false就好辣

if ( !defined( 'AUTOSAVE_INTERVAL' ) )
  define( 'AUTOSAVE_INTERVAL', 60 );
if ( !defined('WP_POST_REVISIONS') )
  define('WP_POST_REVISIONS', true );

—————————— UPD 2017.6.12 ——————————
上述方法不好,建议直接在wp-settings.php里加入

define('WP_POST_REVISIONS', false);

这样既可以保留自动保存功能,WordPress自己更新以后又不用重设
另外,更改之后建议nginx -s reload重启一下

2 thoughts to “【WordPress】辣鸡历史版本”

  1. Does your website have a contact page? I’m having a tough time locating it but, I’d like to shoot you an email. I’ve got some suggestions for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it improve over time.

Leave a Reply

Your email address will not be published. Required fields are marked *