Feature or Plugin - back-up before update

Yesterday evening I saw a conversation in Slack’s #migration with @james and @anon99806173 duking it out over forced updates in the ClassicPress environment.

Louis’ point (correct me if I’m wrong) is ‘forced updates might trigger data loss’. Annoying, if not critical, for our client base (being businesses who dislike data loss).

James’ point (cmiiw) is ‘security is very important and should be forced in small updates’, which is for the same client base equally valid (being businesses who need a secure website and framework).

As the environment has seen plenty of back-up plugins and services, I wondered whether this could be a feature / important plugin in the ClassicPress environment to do this.

ACTION: If there’s an update that’s forced or pushed, it will first run a back-up based on settings user has defined first, then run the update.

Back-ups could be to a connected Dropbox / Google Drive / back-up-to-server, whichever. In my conception it could be something like https://nl.wordpress.org/plugins/all-in-one-wp-migration/ (which works for me as a back-up service as I periodically download the file to harddisk, and could restore with a clean WP installation + the plugin + the file. All themes, plugins and data are packaged.)

What do you guys think? Is it feasible? How does it play into ClassicPress’ strengths?

1 Like

I like the idea, but it is not feasible for v1 due to time and resource constraints. This is a huge amount of work to support correctly, especially when you get into all the edge cases that come up with different possible hosting configurations where various features are disabled or requested. Basically there is a reason that existing backup solutions are bundled into large, well-developed plugins: it’s a complicated problem to solve correctly and thoroughly.

A “ClassicPress official backup plugin” would be a nice thing to have, but it needs to start as a plugin.

My personal opinion on backups is that it is always better to do this at the level “below” WordPress/ClassicPress. Use the shell, or SFTP to copy the site’s files, and use mysqldump or a tool like PHPMyAdmin to get a database dump.

Not all hosting providers support this. I try to only work with the ones that do, and recommend that my clients do the same.

Admittedly, I am not the programmer/developer that I’d like to be but (for me) I always run WPOptimize and then UpdfraftPlus on all my clients sites before updating. That being said, if it’s a serious security patch I think it should be done automatically just as most WP users are accustomed to. So…for example, if I didn’t have updates blocked (waiting for Gutenberg to drop obviously), I know to disable the Disable Updates plugin once per week to check for needed security updates to other plugins. I think most WP users know to do that even if they’re occasional hobbyists. Nobody wants to lose data from form submissions certainly or clear out your SEO or something like that …but I think serious security patches updated should be fine but major changes not so much.

This is exactly what we will do. We have a very clearly defined versioning policy and we will do our best to never push a breaking change as part of an automatic update.

Just like WordPress - minor security updates are no big deal, you see them and you don’t worry. And honestly, most WP updates you don’t worry about either, since very few (if any I can recall) were ever really a threat to formatting before. So if you are in theory updating WP core to keep it safe and “as is” there should not be changes and updates that would worry average developers and designers and I’d think most would be security related. Am I on track with that?