Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress Auto Draft disabling

Tags:

wordpress

I am using Wordpress v.3.3.1 With Multisite management on.

I am trying to disable the auto draft function, but it seems that I have tried everythig.

What I have tried:

define('WP_POST_REVISIONS', false);

define('WP_POST_REVISIONS', false);

Didn't work.

I have tried to remove the auto_save lines in post-new.php, post-php. Both in wp-includes and in wp-admin. Didn't work.

I have also tried several plugins, but they won't do it! Any idea why?

like image 828
NecoV Avatar asked Apr 19 '12 18:04

NecoV


People also ask

Does WordPress automatically save drafts?

WordPress Autosave. Autosaves are automatically saved drafts of your WordPress posts. By default, a new autosave is captured every 60 seconds as you edit your content.

What is WordPress auto draft?

WordPress automatically saves your post (or page) while you are editing it. This is called WordPress auto-draft. If you don't hit the publish/update button, then the post/page will be saved as auto-draft and any modification to your post/page will not be visible in your public site.


1 Answers

I notice that you are asking about disabling Auto-Drafts and NOT Auto-Save.

You cannot disable Auto-save, but you can achieve a similar affect by setting a long interval, for example:

define( 'AUTOSAVE_INTERVAL', 3600 ); // Default is 60

(You'd add it in your WordPress site's wp-config.php file.)

As for Auto-Drafts, you don't want to disable them. They are there for an important reason. Let me grab a quote or two for ya...

Samuel 'Otto' Wood, Tech Ninja at Audrey Capital (Matt Mullenweg's angel investment company), says:

Auto-drafts exist because of the fact that multiple users can create new posts at the same time. If two people enter post-new at roughly the same moment, then have their first autosaves occur nearly simultaneously, then there is a race condition that can cause one of them to get back the wrong post ID, which will cause a post to be overwritten/lost when they then continue editing the post.

The auto-draft creates the post and gets the ID of the new post before the editing screen is displayed, thus preventing two simultaneous authors from accidentally having the same post ID in the data in their browser.

Andrew Ozz, who worked on WordPress' TinyMCE integration, says:

This also makes it possible to upload images before the first draft is saved and they will be properly attached to the new post.

And lastly:

Auto-drafts are automatically deleted after 7 days of going unused. They're self-cleaning, basically. No need to worry about them.

like image 170
its_me Avatar answered Oct 03 '22 23:10

its_me