• I tried the classic solutions by adding the following to wp-config.php:

    define(‘WP_POST_REVISIONS’, false);
    define( ‘AUTOSAVE_INTERVAL’, 3600 );

    but they didn’t work. I still get the posts saved & “revisioned” every minute or so.
    Also, every time I add media content, like an image, an entry is added to the wp_posts table.

    How do I completely disable these features? What I want is to have only post entries in the wp_posts table, no other rev/auto-save/media crap.

Viewing 10 replies - 1 through 10 (of 10 total)
  • See: http://codex.wordpress.org/Revision_Management#Revision_Options

    WP_POST_REVISIONS

    • true (default), -1: store every revision
    • false, 0: do not store any revisions (except the one autosave per post)
    • (int) > 0: store that many revisions (+1 autosave) per post. Old revisions are automatically deleted.

    Setting WP_POST_REVISIONS to false or 0 will still save 1 autosave (which is overwritten every time another one is saved).

    This thread has some options for completely disabling autosave.
    http://wordpress.org/support/topic/turn-off-the-autosave-already?replies=19

    Thread Starter adevland

    (@adevland)

    I managed to get them to work. But http://codex.wordpress.org/Revision_Management#Revision_Options failed to mention where exactly to add those constant declarations. Because if you add them after the wp-settings.php call, they are ignored. That’s why I didn’t get them to work the first time. That support page should be edited accordingly.

    And one more thing: the fact that you cannot disable autosave entirely sucks bigtime. I like to have all my tables with their ids strictly managed, and having autosaves added in the same table as the published posts makes for silly situations like when you post your second blog post, and it turns up having an id of 27. The other ids before it being used by post revisions and autosaves.

    I think I will ditch wordpress entirely. And yes, just because of this issue.

    Thread Starter adevland

    (@adevland)

    To permanently disable autosave I commented out the line:

    wp_enqueue_script(‘autosave’);

    from both post.php and post-new.php from the wp-admin folder. I’m happy with how it works now. 🙂

    @adevland: the page http://codex.wordpress.org/Revision_Management#Revision_Options is clearly marked as a rough draft. It may not be completely accurate. And http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions states where to add those lines correctly.

    By modifying post.php and post-new.php, you’ve changed core files and will have to make those changes each upgrade.

    And if WordPress “sucks bigtime,” please, go ahead and “ditch wordpress entirely.” It’s open source software, maintained mostly by volunteers, and these forums are entirely volunteer, too. Write your own CMS that works the way you want it to.

    Thread Starter adevland

    (@adevland)

    I admit, I may have said some things that were out of line.
    But the more I’m looking into how wordpress is made (db wise), the more I’m getting disappointed.

    Now I found out that all attachments are added to the wp_posts table as well.

    My goal was to have only posts in that table, so that ids won’t jump forward between posts. Clearly wordpress doesn’t work that way and jumps are inevitable.

    I’m used to having things very neatly managed in my dbs as of lately, and turning up this in a hugely popular CMS as wordpress is intriguing to say the least.

    This worked for me and after one year of sudden hanging on my blogs I can now work without frustration.

    Only today did I realise it was the wp-ajax.php file that was causing it. The autosave is hanging without break and it effects all further use of the blog afterwards.

    This feature needs the option to disable it without having to install a plugin to do that.

    I would suggest that a save is done when the Preview button is clicked, a custom field is added or other meta. That way the save can be done $_POST method rather than Ajax?!

    We had problems backing up the MySQL database using phpMyAdmin because the database was too big and we were hitting some kind of limit or timeout with phpMyAdmin. The wordpress.sql file was stopping after 18.4 MBytes, so the backup flles incomplete.

    wp-posts table was 24MB. It turns out a lot of the posts had 10 and 20 revisions. After we deleted all the revisions with DELETE FROM wp_posts WHERE post_type = “revision”; , wp-posts was 2.4 MB, so it was 10x the size.

    Database can now be backed up via phpMydmin

    Here’s the story.

    http://www.lagunabeachbikini.com/index.php/2011/06/01/wordpress-how-to-disable-post-revisions/

    I have another WordPress blog with almost the latest version. Is this still a problem? Could not find the code for WP_POST_REVISIONS in wp-settings.php

    BTW, one of the reasons I posted the above message is because I read on some related threads that have been close, where some WordPress Developers don’t think that saving unlimited revisions can ever cause a problem.

    Well in our case, it made our backups for the past couple of months incomplete–it’s a good thing we didn’t have to restore any of them.

    The thread listed in this thread, to show how to completely ‘disable’ post revisions and auto-save’ is closed.

    So, is there a definitive guide as to how to COMPLETELY disable these 2 annoying ‘features’ please ?

    I have been using the WP-Optimize plugin to keep cleaning up the garbage from the database, but I noticed after a ‘clean’, as soon as I went into posts on the dashboard, a row got added to the posts table. You guessed it, .. auto-save.

    I (and it seems many others) don’t want this at all. Every post is drafted and carefully prepared off-line. Then I simply want to login and paste the contents.

    I found this on another thread ..

    remove the wp_enqueue_script(‘autosave’); line on your post-new.php (which is located in wp-admin folder) and your posts will not be autosaved anymore.

    Is that method ‘safe’ and okay to do ? Yes, I know it is one 9core) file changed, but I cannot manage a one line mod everytime a WP upgrade comes out.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘disable post revisions and auto save’ is closed to new replies.