• Hi,

    Recently I cleared my database of post revisions, now I need to limit the number of post revision. Still now I don’t get why that functionality doesn’t exist on settings or why number of post revisions isn’t limited by default. I have to limit the number of post revisions because I need to optimize my database. Clear the database of trash with same query nearly everyday is very tedious… I saw elsewhere that define( ‘WP_POST_REVISIONS’, int ); was supposed to limit number of post revisions! But you know what it really does? It causes my web server to return HTTP 500!

    • This topic was modified 2 years, 9 months ago by boostxd.
    • This topic was modified 2 years, 9 months ago by boostxd.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • define( ‘WP_POST_REVISIONS’, int ); is wrong

    define('WP_POST_REVISIONS', 100); ok

    • This reply was modified 2 years, 9 months ago by gotgotf.
    • This reply was modified 2 years, 9 months ago by gotgotf.

    define('WP_POST_REVISIONS', 3);

    Change the number to whatever you need. That “int” is probably causing your issue. It should be an actual integer.

    Thread Starter boostxd

    (@boostxd)

    int is integer data type. I only placed it there to demonstrate that any number I put there causes my server to return HTTP 500.

    You use or ' ?

    break wp-config.php

    • This reply was modified 2 years, 9 months ago by gotgotf.
    • This reply was modified 2 years, 9 months ago by gotgotf.
    Thread Starter boostxd

    (@boostxd)

    I use ', BTW in previous comment I meant a number, instead of any number because I didn’t test with all range of numbers. I put a number greater than 1 (of course), but less than 5. If there is minimum value, I was using 2, I’ll try to increase to 3 (if that is the case).

    • This reply was modified 2 years, 9 months ago by boostxd.
    • This reply was modified 2 years, 9 months ago by boostxd.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The INT part is correct. In your first paste, you’re using the wrong version of the prime character.

    Thread Starter boostxd

    (@boostxd)

    Like I thought, increasing the number doesn’t change anything. I replaced number 2 with 3 – same issue. I don’t have much plugins installed (and activated) in my site, most of cases I’d rather code to add a desired functionality (I don’t trust plugins).

    • This reply was modified 2 years, 9 months ago by boostxd.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Limiting Number of Post Revision causes HTTP 500’ is closed to new replies.