Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

Feature Request: Upload Jetpack local backup to a website #38987

Open LauDijksterhuis opened 4 weeks ago

LauDijksterhuis commented 4 weeks ago

Impacted plugin

Backup

What

Being able to upload a custom Jetpack backup to a WordPress website

How

Before answering how, I think its more important to mention why:

There are many reasons on why people would want this feature, like;

But most likely the reason is (indirect) connected to having a website backup without active source website. Making the local backup the only option to restore on the destination website.

Yes, there is a way of uploading all the files via FTP and updating the database ( https://jetpack.com/support/backup/manually-restore-a-backup/ ) But this is really a hazard, especially if you are not that tech-savvy or have to do this frequently.

Why this feature matters to me personally

I recently came across the WordPress Studio App which lets you develop WordPress sites locally. I love it, but when I finished building a site for my client it was really a pain to get the website online. I have tried: All in one WP, Duplicator, WPVivid, Migrate Guru but none of them worked because their wasn't an active host.

Luckily I got early access to the beta build ( https://github.com/Automattic/studio/issues/482 ), allowing me to export the website content. And via the manually restore a backup guide I was able to get the website online.

Why is this relevant

As requested here: https://github.com/Automattic/studio/issues/62 it would be great if there was a direct sync between hosting and studio. But for all other website owners who have their own hosting provider it would be great if the website they create locally could sync (preferred) or at least be transferable to the host via Jetpack.

Luckily when opening both a Studio backup and a Jetpack backup the content seems almost identical, with the main difference being Jetpack splitting the SQL files, where Studio creates a single SQL file. So it shouldn't be really hard to make them compatible. CleanShot 2024-08-21 at 11 10 21

How could this be achieved:

One way would be to change the copy button on the cloud.jetpack.com website to a migrate button. Allowing you to choose to copy the site (as it is now) to another site (export) But also to create a copy of another site replacing the current site (import), I think it's similar to the staging site option in the settings page). But a custom upload would be great.

CleanShot 2024-08-21 at 11 13 22

Security risks

However, I do understand that the cloud.jetpack.com site is a secure place. And you don't want people to upload all kind of stuff to the jetpack servers. So I'm not sure if this could be filtered, or checked with a digital signature. If not, another possibility could be to allow uploads on the host directly via the Jetpack plugin.

Where the plugin can validate the content before changing the website. Making sure the uploaded content is never send to the cloud.jetpack.com servers.

CleanShot 2024-08-21 at 11 15 07

This last option could be build in directly to Jetpack backup plugin, or separately like the WordPress importer plugin.

LauDijksterhuis commented 4 weeks ago

To be clear, I personally would like a direct sync from Studio with WordPress.com. And when compatible with other hosting providers this would probably be the best case scenario as suggested here: https://github.com/Automattic/studio/issues/62 and this which might also be an upload option instead of via a webbrowser.

But for other use cases like burned down servers a custom upload would probably be beneficial for the most people.