• Resolved cdc43339

    (@cdc43339)


    Hello, I host a few sites on WPEngine. Our typical process is to clone from prod to staging (including database), do any testing of new code there, then push codebase changes to production. The last time I cloned from prod to staging, Jetpack turned the safe mode on prod on rather than staging. How do I turn on safe mode for staging and turn off safe mode for prod, without losing any site stats? How do I prevent this from happening again in the future?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @cdc43339

    It seems that your production site and staging one are suffering an identity crisis. In summary, a Jetpack-connected site is assigned a Blog ID which represents its identity and contains its data (that is synced on our end); what is happening here is that Jetpack is confusing these two sites (production and staging) thinking it’s the same one and that it’s just an URL change.

    You can avoid that from happening by using the Staging Mode on the staging site; this is explained on our documentation below:

    https://jetpack.com/support/staging-sites/

    It’s good to note that it’s best if you are able to prevent the wp-config.php file from being cloned while cloning to production or staging; your host may be able to guide and provide more information about whether that’s possible or not on their end.

    Best,

    Thread Starter cdc43339

    (@cdc43339)

    I was able to place the staging site into staging mode, but that doesn’t solve the problem with production. How do I turn off safe mode for prod, without losing any site stats? If I click “Fix Jetpack’s Connection,” I am given “Migrate Stats and Subscribers” (but it says migrate from <stagingURL> to <prodURL>) or “Start Fresh and Create New Connection.” I’m guessing I want “Migrate?” I need to keep the stats and subscribers, and to know that I’m not destroying anything by proceeding.

    Thread Starter cdc43339

    (@cdc43339)

    Bumping this.

    Plugin Support Bruce (a11n)

    (@bruceallen)

    Happiness Engineer

    Hi @cdc43339

    There are currently two ways to do staging sites on WPEngine, but only one currently is able to work with Jetpack.

    We’ve got an open issue here where we’re looking into this:

    https://github.com/Automattic/jetpack/issues/21504

    You can also see WPEngine’s documentation on this here:

    https://wpengine.com/support/staging-environments-1-click-staging-different/

    When you use staging are you using the Staging/Development Environments or the Legacy 1-Click Staging version?

    Thread Starter cdc43339

    (@cdc43339)

    Staging / Dev environments, not the legacy staging setup. Direction on how to proceed without losing stats?

    Hi @cdc43339

    Staging/Development Environments is currently not supported by Jetpack, so it makes sense why the issue is happening when you are pushing from Production to Staging, and there isn’t a specific way to avoid that as it will happen every time you push from Production to Staging.

    At this point, I’d suggest if you reached out to WPEngine and see if they’re able to exclude the wp-config.php file from being altered when you push from Production to Staging; otherwise, you could follow along with the progress of the Github issue that my colleague had mentioned below:

    https://github.com/Automattic/jetpack/issues/21504

    Our developers are looking into that, but there’s isn’t an ETA for that. I’ve also added your thread there.

    Best,

    Thread Starter cdc43339

    (@cdc43339)

    @muffinpeace thanks for the link. That looks like it could be helpful going forward, but I’m still looking for a response to the core question:

    I was able to place the staging site into staging mode, but that doesn’t solve the problem with production. How do I turn off safe mode for prod, without losing any site stats? If I click “Fix Jetpack’s Connection,” I am given “Migrate Stats and Subscribers” (but it says migrate from <stagingURL> to <prodURL>) or “Start Fresh and Create New Connection.” I’m guessing I want “Migrate?” I need to keep the stats and subscribers, and to know that I’m not destroying anything by proceeding.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Safe Mode Disconnected Wrong Site’ is closed to new replies.