Support » Plugin: Jetpack by WordPress.com » Can I force Safe Mode?

  • Resolved John Hawkins

    (@vegasgeek)



    I’m trying to set up a local/development copy of a multi-site WP install. When I’ve done this in the past with sites using Jetpack, it has offered me the opportunity to switch Jetpack into “Safe Mode” on the local install. But, for whatever reason, this particular install isn’t offering that up. As a side effect, it ended up causing some token issues and I was forced to manually reconnect the live site back to WP.com.

    My question is, is there a way to force Jetpack to use Safe Mode while on my local install?

    FYI, I’ve tried defining JETPACK_DEV_DEBUG in wp-config, but that removes some functionality that I need, so isn’t a viable option.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Happiness Engineer

    Hi! Are you using an actual domain name while working locally? Or are you using .dev? If you’re using an actual domain name, you can try our staging mode instead:

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

    However, if this is on a local install, it won’t work as you’d expect; Jetpack needs the site to be publicly accessible in order to connect and function properly. If it isn’t a site that’s available on the Internet, then Staging mode won’t work either, only dev mode.

    Hi Richard. The site is on a local install (on my laptop) and uses the format of domain.local

    Just tried staging mode, and ask you suggested, it didn’t work either.

    If neither of those are going to work, maybe the question I need to ask is this…

    The live site uses Photon CDN. So when being run on my local site, the image calls using the format of:
    https://i1.wp.com/domain.local/wp-content/uploads/

    If I turn off Photon on my local install of Jetpack, is that going to affect how the live site handles images?

    Really appreciate your help, thanks!

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Happiness Engineer

    Let’s take a step back here.

    My question is, is there a way to force Jetpack to use Safe Mode while on my local install?

    No, but if it’s local and not accessible to the Internet, it shouldn’t cause any problems. Yet, you said:

    As a side effect, it ended up causing some token issues and I was forced to manually reconnect the live site back to WP.com.

    I’d like more details about this, because again, if the local dev site isn’t actually connected to WordPress.com (which it *can’t* if it’s only local and not accessible to the outside world), then this shouldn’t have happened.

    You also said this:

    FYI, I’ve tried defining JETPACK_DEV_DEBUG in wp-config, but that removes some functionality that I need, so isn’t a viable option.

    Which functionality is this? Turning on Dev mode has, in effect, the same as running a site locally: you can’t connect it to WordPress.com in either case. Can you explain what functionality you mean?

    The live site uses Photon CDN. So when being run on my local site, the image calls using the format of:
    https://i1.wp.com/domain.local/wp-content/uploads/…

    That’s expected, but obviously the images won’t work.

    If I turn off Photon on my local install of Jetpack, is that going to affect how the live site handles images?

    Well, no, it shouldn’t. Again, if the local site is inaccessible to the outside world, then it shouldn’t affect the live site.

    Here’s another question for you: When you clone from live to dev or vice-versa, are you disconnecting Jetpack on the live site first? Especially if you are not running dev mode, you should do that to ensure that there isn’t any problems with the live site when cloning from dev to live.

    Let me start with my local setup process:
    1. Setup a generic WP install on domain.local
    2. FTP down the wp-contents folder
    3. Migrate DB Pro the live site down to local

    At the time of my setting all this up, my user account on the live site was not connected to WP.com through Jetpack.

    I’d like more details about this, because again, if the local dev site isn’t actually connected to WordPress.com (which it *can’t* if it’s only local and not accessible to the outside world), then this shouldn’t have happened.

    The site has multiple authors/admins. After my setup process above, I saw Photon was active on my local so all my images were broke. So, I added JETPACK_DEV_DEBUG to wp-config. This brought back the images, but broke some custom code on the site causing this error message:
    Fatal error: Uncaught Error: Call to undefined function stats_get_csv()

    The following day, I heard from one of the other authors on the site that Jetpack was no longer connected, and, when he logged in to WP.com, the site was no longer listed.

    Which functionality is this? Turning on Dev mode has, in effect, the same as running a site locally: you can’t connect it to WordPress.com in either case. Can you explain what functionality you mean?

    This would be the fatal error explained above.

    Here’s another question for you: When you clone from live to dev or vice-versa, are you disconnecting Jetpack on the live site first? Especially if you are not running dev mode, you should do that to ensure that there isn’t any problems with the live site when cloning from dev to live.

    My user account at the time of cloning was not connected. I have since connected my account on the live site.

    When I’m on my local with JETPACK_DEV_DEBUG set to FALSE and JETPACK_STAGING_MODE set to true, I am able to access the Jetpack dashboard and I have the ability to turn on/off Photon (i.e. Speed up images and photos). I’ve been hesitant to try it, but, I’m thinking what I need to do is:
    – Turn off Photon on local
    – Clear cache on live site
    – Visit live site and see where images are being pulled from
    – Log in to live site and see if there are jetpack connection issues
    – Confirm with other admin that he can still see site listed on WP.com account

    Worst case scenario, I have to go through the process of reconnecting my account and reactivating Photon.

    Thoughts?

    Hi John,

    That sounds like the way to go. You will just need to force dev mode on your staging, after switching off Photon. You shouldn’t need to force your live site to staging/dev because it shouldn’t be impacted by your local site.

    Let us know how you get on.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can I force Safe Mode?’ is closed to new replies.