🚀 Is building a website too difficult? Let me guide you step by step—Learn about the 「Naibabiji WordPress Website Building Coaching Service」 →

What is the Windows revision version? How to disable auto-save

After upgrading to a new version of WordPress, the Gutenberg editor was introduced. The code you previously used to disable auto save and revisions may have become ineffective. This article shares theMethod to Disable Revisions and Auto Save

What are WordPress Revisions and Auto Save

WordPress修订版本If you are using the Gutenberg editor, you will notice an additional revision appears after clicking the Save Draft button once. If you are using the older Classic Editor, you will also find that it auto-saves every minute, creating another revision. The revision looks like the image below.修订版本In some cases, this revision and auto-save feature is useful. However, in most situations, auto-save and revisions are unnecessary. Over time, your database will retain a lot of revision data, causing database bloat and therebyaffecting WordPress performance speed. Therefore, when the revision and auto-save features are not needed, we can disable WordPress Post Revisions and Auto Save.

Official Recommended Method to Disable Revisions and Auto Save

By default, WordPress has a WP_POST_REVISIONS function for post versions. WP_POST_REVISIONS is used to control whether revisions are displayed. We can set the revision function by inserting relevant code into the WordPress configuration file wp-config.php.
//禁用WordPress修订版本
define( 'WP_POST_REVISIONS', false );
WP_POST_REVISIONS has three default values: true (default), -1: means store every revision. false, 0: do not store revisions (except for one auto-save version per post). A value greater than 0: sets the number of revisions to save, previous versions will be deleted. So we also need to disable auto-save. WordPress defaults to auto-saving periodically (though Naiba tested in the new Gutenberg editor and found revisions only appear after manual save, no auto-save was found; auto-save was found in the Classic Editor).Method to Disable Auto SaveInsert this string of code into the wp-config.php file to set the auto-save interval.
define( 'AUTOSAVE_INTERVAL', 160 ); // 修改自动保存间隔时间为160秒
We can modify the value 160 to set the auto-save interval. Setting it to 86400 means auto-saving the article once a day. Presumably, by that time, your article has already been published, which is equivalent to disabling WordPress's auto-save function. Insert the above code above /* That's all, stop editing! Happy publishing. */ in the wp-config.php file to take effect. The above method is fromofficial documentation

Method to Clean Up Revision and Auto Save Data

If your WordPress has already saved many revisions and auto-save data, you can useWP-Optimizeto clean up and optimize your database. If you are usingWP Rocketthis caching Plugin, you can also clean up redundant database files in the settings.

🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step instead.

「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.

👉 Learn about Website Building Coaching Service
🔒

Comments are closed

The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.

×
二维码

Scan to Follow