Auto backup before automatic WordPress updates

Is it possible to have a auto backup solution, that backs up my files and database before automatically upgrading WordPress.

Keeping up to date with the WordPress versions seems to be more important than ever now and I want to be able to do this, but not break my site at upgrade intervals.

1 Answer
1

you should be able to use this hook which fires just before an auto update:

do_action( 'pre_auto_update', $type, $item, $context );

$type can be ‘core’, ‘theme’, ‘plugin’, ‘translation’

a specific solution would depend on your particular backup plugin/service, but as long as this plugin/service provides either suitable hooks or an API it should be doable

more details on the hook here:
https://developer.wordpress.org/reference/hooks/pre_auto_update/

Leave a Comment