ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

Core support for basic backups

September 12, 2018 · 08:06 · Alvaro Gois dos Santos

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.

+19 more
Request: Add feature

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.

Pieter Bos

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.


Thanks for the reminder, Pieter, and the info on how it works under the hood. It's been in my dashboard for so long that I came to think it was a built-in.

Pieter Bos

@John, you're welcome :) It might actually be an idea for a feature request to remove the whole Tools menu from the admin sidebar and make all of that available for plugins.


I wouldn't be sad to see it go elsewhere.

Tim Kaye

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.

Fabian Wolf

A real backup tool built for the Import / Export section would probably a better choice.

James Nylen

This is "below-plugin" territory, IMO. The best way to do a backup is always to directly grab the site files and a database dump.

Fabian Wolf

I'd add a "core plugin" with basic backup functionality instead, similar to the import / export tools.


I like the idea of "core plugin".

Alvaro Gois dos Santos

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.

James Nylen

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.

Nicholas Dionysopoulos

I was already in the process of writing a database replacement plugin for WordPress which also doubles as a database-only backup, see 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).

James Nylen

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 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.

Nicholas K. Dionysopoulos

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 :)

James Nylen

Great, this repo is created:

Thanks for your interest!

William Patton

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.


Not a core feature in my view. Most hosting control panels provide basic backup facilities at the system level which is where I believe backups belong.