WordPress.org

Ready to get started?Download WordPress

Forums

Unable to switch off post revisions (59 posts)

  1. Ashfame
    Member
    Posted 5 years ago #

    Hello there!
    I am having issues in switching the post revisions feature off. I tried defining the WP_POST_REVISIONS as false and even 0 but it didn't work for me. Post Revisions are still being generated. Looks like a sorta bug too me. Am I doing something wrong here?

  2. asechrest
    Member
    Posted 5 years ago #

    Couple of options and some information on turning off WordPress post and page revisions.

    If you're intent on editing a core file it should be define('WP_POST_REVISIONS', false);. Was that how you defined it?

    Personally, I use the plugin option.

  3. Ashfame
    Member
    Posted 5 years ago #

    Yes I did that. I have tried both define('WP_POST_REVISIONS', false); and define('WP_POST_REVISIONS',0); but none of them worked out for me. I don't want to use a plugin for this.

  4. Ashfame
    Member
    Posted 5 years ago #

    Any solutions without using a plugin?

  5. asechrest
    Member
    Posted 5 years ago #

    Have you actually browsed the wp_posts table and seen revisions still being generated in your database after adding that code to wp-config.php?

    If I get a chance this week I'll disable my revision control plugin and try adding that line to my wp-config.php to see if it works for me.

  6. Ashfame
    Member
    Posted 5 years ago #

    I didn't peek into the DB but I used a plugin to delete the revisions which were still being generated. They were being generated, thats for sure.

  7. Ashfame
    Member
    Posted 5 years ago #

    BUMP

    Please refrain from bumping as per Forum Rules

  8. Ashfame
    Member
    Posted 5 years ago #

    Isn't it weird that I can't switch it off? Please help WP geeks.

  9. esmi
    Forum Moderator
    Posted 5 years ago #

    Try the Revision Control plugin:

    http://dd32.id.au/wordpress-plugins/revision-control/

    Works like a charm for me.

  10. Ashfame
    Member
    Posted 5 years ago #

    This plugin doesn't work either. It says "Cannot load revision-control."
    What harm does it do other than increasing the db size in terms of performance?

  11. MichaelH
    Member
    Posted 5 years ago #

    At 2.8 this works in wp-config.php:

    define('WP_POST_REVISIONS', false );

    At 2.8, this plugin, after setting Revisions to Disabled for both posts and pages, works:
    http://wordpress.org/extend/plugins/revision-control/

    You asked:

    What harm does it do other than increasing the db size in terms of performance?

    Not much.

  12. TrishaM
    Member
    Posted 5 years ago #

    I also have this problem, and using
    define('WP_POST_REVISIONS', false );
    definitely does NOT work - revisions are still being generated. (as earlier poster noted, I also tried 0 instead of false, still didn't work)

    I also do NOT want to use a plugin to do something that should be able to be accomplished simply using this wp-config.php file - this define statement above SHOULD work but is not.....so it does look like a 2.8.1 bug - any other suggestions (and please don't say a plugin, I don't like to use plugins to fix a bug or do minor tasks that can easily be handled without a plugin).

    This really should be an option under the Settings - allowing us to turn off this feature or if left on, choose how many revisions to keep - 0 to all......

  13. Ashfame
    Member
    Posted 5 years ago #

    @MichaelH
    I already have that in my config file. What else I can do?

  14. TrishaM
    Member
    Posted 5 years ago #

    @ashfame - I had to change the same "define" statement in my wp-settings.php file (in same root as wp-config.php), in my 2.7.1 version it's on line 495, HOWEVER this is not a good solution as it would need to be repeated every time you upgrade the WP version. And really putting it in wp-config is supposed to override wp-settings but it isn't.

    I've been hearing and reading the same complaints about 2.8.1 (not sure about 2.8.2) so it looks like this bug is still around.

    Post revisions should be a user-definable option, but until it is there should be an easy and reliable way to disable it.

  15. TrishaM
    Member
    Posted 5 years ago #

    I've just installed a 2.8.2 version (clean) for a new site, and this bug is still around.

    I've got the correct statement in my wp-config.php file
    define('WP_POST_REVISIONS', false);

    But revisions are still being created and kept....aaarrrgh!

    Is there any way to turn this off without having to modify wp-settings.php (which would need to be repeated for each upgrade)?

  16. esmi
    Forum Moderator
    Posted 5 years ago #

    Have a look at the Revision Control plugin.

  17. TrishaM
    Member
    Posted 5 years ago #

    Hello esmi - I appreciate your taking time to reply, but I understand people are still having trouble with that plugin that you referenced.

    However -- and more importantly -- if you'll note from earlier posts both ashfame and I are looking for solution that does NOT involve a plugin.

    What I'm looking for is the correct solution, which is to make the define statement in the wp-config file behave is it is supposed to, which is to override the same statement in the wp-settings.php file. I've tried inserting it both before and after the call to include wp-settings.php, neither works.

    So my question remains - why is wp-config.php not doing what it's supposed to do?

  18. misthero
    Member
    Posted 5 years ago #

    I have the same issue, I want to get rid of post revisions without plugins, and

    define('WP_POST_REVISIONS', false);

    is not working anymore

    wp 2.8.3 doesn't fix the issue.

  19. Marcomail
    Member
    Posted 5 years ago #

    i've the same porblem, added define(’WP_POST_REVISIONS’, false); in wp-config.php but the revisions are created the same.

    i'm using the last wp 2.8.3

  20. Ashfame
    Member
    Posted 5 years ago #

    The problem remains as of WordPress 2.8.4

  21. windows2000
    Member
    Posted 4 years ago #

    I am also having this issue on WP 2.8.4. It's really obnoxious because I use the Codex-recommended Permalink structure of domain.com/%post_id%/%postname%/. But with all these useless revisions that I instructed WP to disable (via wp-config.php), my Post-IDs are being driven up at a furious rate! I only have 6 posts but already my next Post-ID is nearly #40!

  22. Ashfame
    Member
    Posted 4 years ago #

  23. This works fine for me on a fresh install of WordPress 2.8.4

    Where are you seeing revisions appear?

    With revisions disabled there will still possibly be an autosave revision for each post as this is a separate feature.

  24. Ashfame
    Member
    Posted 4 years ago #

    @westi
    I am not confusing it with the autosave feature. I can see the Post ID increasing more than what it should. That means the revisions are being generated and I use a post revision delete plugin which also shows up my edited posts.

  25. MichaelH
    Member
    Posted 4 years ago #

    On an existing 2.8.4, put define('WP_POST_REVISIONS', false); in wp-config.php and revisions stop getting created.

    Delete the define('WP_POST_REVISIONS', false); from wp-config.php and edited post and it created a revision as expected. The revision record in wp_posts has a post_status of "inherit".

    Wonder if you are using the correct wp-config.php or if a plugin is causing to problem.

  26. WoodiE
    Member
    Posted 4 years ago #

    Fresh install (2.8.4) and I too am seeing post revisions even with define('WP_POST_REVISIONS', false); being added to the end of wp-config.php

    When I open a page, make a change and save, at the bottom of the edit page is a box listing past page revisions. Every new change and save add's another to the list.

  27. WoodiE
    Member
    Posted 4 years ago #

    I did have four plugin's installed:

    • All in One SEO Pack
    • Contact Form 7
    • NextGEN Gallery
    • Secure WordPress

    I even tried disabling all plugins, going back to a page and making a change and saving. Still added a post revision.

  28. MichaelH
    Member
    Posted 4 years ago #

    I too am seeing post revisions even with define('WP_POST_REVISIONS', false); being added to the end of wp-config.php

    That's the problem--end of wp-config.php.

    I put the define right after define('DB_COLLATE', '');

    The key is, it has to go before this line:

    require_once(ABSPATH . 'wp-settings.php');
  29. Ashfame
    Member
    Posted 4 years ago #

    I have it before that line only.

    define('WP_POST_REVISIONS', false );
    
    /* That's all, stop editing! Happy blogging. */
    
    /** WordPress absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
            define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    I will try after the DB_COLLATE line

  30. Ashfame
    Member
    Posted 4 years ago #

    No use of adding the line after DB_COLLATE line. Post revisions are still being created.

Topic Closed

This topic has been closed to new replies.

About this Topic