It’s stupid to have a nag about doing a DB backup before updating core and plugins and not having a simple tool to let the user make that DB backup and recover. A simple DB export (and possibly import) feature should be in core.
Read-only archive: https://petitions.classicpress.net/posts/59/core-support-for-basic-backups
Author: Alvaro Gois dos Santos
Vote count: 25
This isn’t a nag, it’s an advisory.
There are lots of plugins for backups. Anyway, I’ve only used the import function, but if you look under Dashboard > Tools, you’ll find there are an importer and exporter built in.
~ posted by John
Although the idea is nice, I cannot support it as this is plugin territory.
@Alvaro, perhaps a better idea is to fine-tune your feature request and ask to include more information on what to do to make the updating process safer for the user. For example with a setp by step list of recommended actions.
@John, the importer is actually not built in at all as for it to run, first the WP Importer plugin needs to be downloaded. On top of that the most important part, the database itself, is not being im/exported, so it is pretty much useless as a protection measure.
~ posted by Pieter Bos
I agree with others that this is plugin territory because it’s not obvious to me where core should then send the backup. That’s part of the point of using a plugin: the user gets to choose.
But I do wonder whether it might be possible to add a button and a hook that plugins could then use. So a user seeing this notice and who has a backup plugin installed could then click the button, and the plugin would run immediately before the update.
~ posted by Tim Kaye
Yes, it could be a core plugin. But at least a simple procedure to enable downloading the database. It’s basic and should be available. Of course, a more elaborate system would be better, but the minimal should be available.
~ posted by Alvaro Gois dos Santos
I would strongly recommend starting this as a plugin, that way we can iterate there and recommend the plugin for testing.
If you’d like to put something up on GitHub under the ClassicPress name, let me know and I’ll create a repository for it.
ClassicPress/site-backup is one idea for the name.
In order to be considered for merge into ClassicPress core, the plugin should have excellent automated test coverage and consistent code style.
~ posted by James Nylen
I was already in the process of writing a database replacement plugin for WordPress which also doubles as a database-only backup, see
https://github.com/akeeba/replace Its engine is fully unit tested. I would gladly refactor it into a database-only backup plugin,including unit tests, and contribute it to ClassicPress. The engine code is a cleaned up, stripped down version of a very mature code base which has backed up and restored dozens of millions of Joomla and WordPress sites over the last 12 years.
FWIW, having the experience of writing full site (files and database, including an installer) backup software for Joomla! and nearly 5 writing the same for WordPress (and just completed the conversion for ClassicPress) it doesn’t make much sense to do full site backups as a core CMS feature. Any CMS release cycle is too long to deal with the inevitable bugs arising from the practically infinite ways people develop their site, the environments they backup from / restore to, how they intend to use backups etc. Dealing with that is a full time occupation if you want to do it right. Database backups have a much smaller scope and cover many of the practical use cases where all you need is a backup in case an update goes pear-shaped. The more complicated cases are best served by taking a full site backup either manually or with a plugin (the latter also means that you have an experienced person to help you if things get really hairy).
~ posted by Nicholas Dionysopoulos
Hi Nicholas, this sounds like a great start to me!
Since I wrote that last message, we’ve refined our approach to accepting “research” plugins based on petitions, and they now live at
https://github.com/ClassicPress-research. This will serve to try out ideas behind petitions, and also to populate our upcoming plugin directory with some initial samples.
So, we’d be more than happy to have you work on something there. We really just need a way to get in touch with you to set up access and answer any questions. Generally the best way to do that has been to join our Slack group.
~ posted by James Nylen
Sounds perfect! I joined the Slack group with the handle nikosdion (same as my GitHub username). I keep general notifications off but if you at-mention me you’ll grab my attention for sure. Thank you for letting me contribute
~ posted by Nicholas K. Dionysopoulos
I believe a plugin for this is more ideal than it being in core. My own thoughts about backups are perhaps old school but I have always been of the oppionion that an application should never be left responsible for its own backups. Ever.
~ posted by William Patton