...a place to bury thoughts

Automatic Updates WordPress

May 5, 2022 @ 07:05 pm 🔗 Post Link

Wordpress

why won’t you die!

why won’t you die!

In the Site Health Status I kept getting Background updates are not working as expected: All automatic updates are disabled.

After stumbling around and searching google for hours (and trying plugins which DIDN’T work)… I was directed to the file: \wp-admin\includes\class-wp-automatic-updater.php

In it….is this section of code:

> // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters. > $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED; > /** > * Filters whether to entirely disable background updates. > * There are more fine-grained filters and controls for selective disabling. > * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name. > * This also disables update notification emails. That may change in the future. > * @since 3.7.0 > * @param bool $disabled Whether the updater should be disabled. > * was $disabled > */ > return apply_filters( 'automatic_updater_disabled', $disabled ); > Which appears to be defining which things to DISABLE… specifically AUTOMATIC_UPDATER_DISABLED and AUTOMATIC_UPDATER_DISABLED which I DON’T WANT! I remmed out the $disabled= line and refined > $disabled to equal nothing. So the code looks like: (note the code lines are one line and wrap only due to width limitations) > > // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters. > // $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED; > $disabled = defined( '' ); > /** > * Filters whether to entirely disable background updates. > * There are more fine-grained filters and controls for selective disabling. > * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name. > * This also disables update notification emails. That may change in the future. > * @since 3.7.0 > * @param bool $disabled Whether the updater should be disabled. > * was $disabled > */ > return apply_filters( 'automatic_updater_disabled', $disabled ); > }

And Bam! I’m good! The critical error is gone!

Finally!

Finally!

I hope this helps someone!

Nice to see the Bolts tied up the series!

⚬ ⚬ ⚬ 🇪 🇳 🇩 ⚬

 

✍️ Add a Comment 📝

Comment(s):

😬 No comments found for this post.