Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Atomic: Utilize `restore-wp-config-php` Atomic endpoint to add a User and/or HE facing wp-config restore button #56450

Open JoshuaGoode opened 3 years ago

JoshuaGoode commented 3 years ago

What

The Atomic platform offers a restore-wp-config-php endpoint which was planned to be used to help users restore their wp-config.php.

After working through some recent requests to fix sites without a wp-config file, @kdevnel highlighted that we have an API endpoint in place but WPCOM isn't using it.

Why

There are various situations where a user and/or HE might need to restore a missing wp-config. In most cases, a default/clean wp-config will be fine.

Migrations, accidental deletions, and malware can lead to wp-config being missing which can then prevent the site from being managed in Calypso, prevent Jetpack backups from working, and more.

Even if backups are accessible, restoring a backup can take time depending on the size of the site and isn't always an acceptable solution.

If a customized wp-config is necessary, that can be restored once the site is working again.

Work was performed to provide an endpoint to allow users to easily restore their wp-config on their own but this was never finished.

The endpoint exists on Atomic but WPCOM needs to implement the rest.

Internal Context

Examples of where having a restore button would save tie and be useful.

How

HE facing: Provide HEs with a Restore wp-config.php button within our Atomic site info tools on the blog's report card.

User facing: In many cases, Calypso will not be accessible for a user that has a missing wp-config and, in turn, a broken Jetpack connection.

If it's possible to retain access to the Hosting Configuration settings in this broken state, we should try to offer a button to the user in the Hosting Configuration page.

Internal Context for Previous Work

p9o2xV-Ca-p2

Robertght commented 3 years ago

Thank you for flagging this @JoshuaGoode ! This would be a great feature! Flagging this for Flow Patrol Manage