Install UpdraftPlus plugin – https://wordpress.org/plugins/updraftplus/
In Settings -> Updraft set the files and backup retention days, then select Google Drive and insert client ID and secret:
Now you need to create a simple php script which will be launched from cron:
<?php //define('UPDRAFTPLUS_CONSOLELOG', true); define('DOING_CRON', true); require_once('wp-load.php'); echo "Starting..."; do_action('updraft_backup_all'); echo "All done!";
Define a scheduled job to http://yourdomain.com/do_cron_backup.php in your preferred cron server. You should password protect the script execution.
I use the free CronJob service found at https://cron-job.org/, it’s reliable and easy to setup:
After the job, just check your Google Drive!