• monica5

    (@monica5)


    Dear kind community,

    upon doing the upgrade, I get the following error message when trying to sign into my site:

    Warning: Constant WP_POST_REVISIONS already defined in /home/customer/www/…/public_html/wp-config.php on line 91

    I followed @threadi first suggestion made in his contribution to
    https://www.ads-software.com/support/topic/help-php-warning-constant-wp_post_revisions-already-defined/
    and commented the line 91 by adding the first two characters

    //define( ‘WP_POST_REVISIONS’, 3 );

    I could then carry out the PHP upgrade to 8.1.26.

    I don’t have in Code Snippets or anyhow added / defined wp-post_revisions, so I wonder whether commenting this line in wp-config.php , doesn’t create unforeseen issues elsewhere (issues I can’t be aware of).

    Please kindly advise of which consequences to check for.

    Many thanks!

    Monica

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ashutosh Sharma

    (@ashutosharma97)

    Hi Monica,

    WP_POST_REVISIONS controls how many revisions (copy of each edit) WP will keep. The code that you commented had set the limit to 3 revisions. The warning messages that you provided means that this limit is defined somewhere else.

    The only possible consequences are that WP will store each revision in the DB. If you have a big website, and make often updates, this would increase your DB size, and affect performance (depends on server).

    You can find more about revision system here.

    threadi

    (@threadi)

    The tip in the other topic resulted, as far as I remember after more than a year, from the error message displayed in the browser, which showed that this line was in the wrong place in wp-config.php. It was just a suspicion and not a final solution, as you can see from the history.

    In your case, I would advise you to take a look at the error log to see if there are any other errors besides this warning. Also deactivate all plugins as a test.

    Thread Starter monica5

    (@monica5)

    Thank you gentlemen.
    @ashutosharma97 It may have got defined in some subsequent site update (theme?), and I am cleaning the database (post revisions specifically) via WP DB Cleaner.
    Is that a sufficient decision in your opinion please?
    Using a mailing solution, the database size gets bloated over years fast, and I struggle to keep it below 1 GB obviously…

    @threadi Thank you, I have read that topic. This isn’t a matter of browser, or correctly said wasn’t.
    Where can I see the error log that you’re talking about please?
    Now after upgrading PHP, I have no (visible) issues, and my hosting says website is running, and hinted at Astra probably setting that value newly, leading to that conflict.
    I can’t deactivate any plugins really please.
    Looking forward for your kind answer showing where to find that error long, and how it should look like in case of no issues.

    threadi

    (@threadi)

    You can find the error log in your hosting area. Contact their support if necessary. Alternatively, you can also activate debugging in WordPress as described here: https://www.ads-software.com/documentation/article/debugging-in-wordpress/

    Ashutosh Sharma

    (@ashutosharma97)

    @monica5, if you have a scheduled cleaner set up to delete revisions regularly, then you don’t really have to worry about it.

    Thread Starter monica5

    (@monica5)

    Thank you again gentlemen.

    @threadi I asked my hosting to check, and after marking the line as // there were thankfully no more error messages. All running smooth.

    @ashutosharma97 Thank you, I do that manually. I publish just one article a day, and that comes to some 50 revisions in two weeks at worts (when correcting typos).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP upgrade from 7.4.33 to 8.1 higher crashes my site’ is closed to new replies.