Automattic / wp-calypso

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

Preserve Privacy Settings on Production when Syncing Staging to Production #94077

Open mgozdis opened 2 months ago

mgozdis commented 2 months ago

What

Privacy Settings should be preserved on Production when syncing the Staging database to Production.

Why

When syncing the Staging database to Production, Privacy Settings are overwritten due to not offering any selective database sync and how this option is stored. The following change purposefully sets blog_public to 0 in wp_options on Staging sites: https://github.com/Automattic/dotcom-forge/issues/2105

When a Staging database is synced back to Production, Production is then set to noindex and nofollow, potentially damaging SEO if a user does not realize. There is currently no way to change the setting on Staging and SEO could be equally damaged if users allowed indexing their Staging site.

A user requested this feature here: 8670964-zd-a8c

How

I do not know an easy fix for this unless we allowed selective syncs to exclude the wp_options table, preserved the option during syncing, or changed the Privacy Settings to not store data in the database and rely on a constant instead.

github-actions[bot] commented 2 months ago

Support References

This comment is automatically generated. Please do not edit it.