• Resolved arvoreen

    (@arvoreen)


    I followed the instructions from here: https://jetpack.com/support/offline-mode/ and set the value to true. But when I visit my dev site, I still get the warning about jetpack being in staging mode. Is there anyway to stop that warning from showing up when I log into my dev site clone?
    (clone built by copying db & all file content to a new linux server, inside my home LAN and restoring. Then updating paths that have changed, URLS that have changed and setting JETPACK_DEV_DEBUG to true.)

    Note, I have also tried setting JETPACK_STAGING_MODE to true — and combinations of both. I still always get the warning message when I first log in.

    I want to be able to fully automate this (wp cli and/or bash scripts) — so what other things can I try?

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Paulina H. (a11n)

    (@pehaa)

    Hey there,

    Are you referring to the following notice:

    Currently in Offline Mode (some features are disabled) because:
    The JETPACK_DEV_DEBUG constant is defined
    Your site URL is a known local development environment URL

    If so, then it’s expected.

    If not, could you share the exact warning message?

    I want to be able to fully automate this (wp cli and/or bash scripts) β€” so what other things can I try?

    Could you clarify which Jetpack features/functionalities you want to have access to from your local installation?

    Thank you. We will be standing by for your response.

    Thread Starter arvoreen

    (@arvoreen)

    No, I expect and want to see that message. Instead, I’m getting the one about safe mode being activated.

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @arvoreen .

    Thanks for getting back to us.

    Can you please confirm whether your local development site is online/connected or not?

    I’m asking this because, if your development site is online, it’s advised that you proceed with setting it up as a staging site instead of having it in Offline Mode.

    In the above scenario, Jetpack automatically detects and categorizes sites as staging sites based on the default way WordPress defines environments and some known patterns.

    Furthermore, you will see a “Safe Mode” warning when you access your Jetpack site in staging mode for the first time. This is because Jetpack will notice that the staging site is a copy of another production site.

    The “Safe Mode” notice appearing on you dev site and your dev site potentially being in staging mode are not mutually exclusive statuses.

    Let us know if this helps clarify things.

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @arvoreen

    Do you have updates about the above? We usually close inactive threads after one week of no activity, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thread Starter arvoreen

    (@arvoreen)

    Sorry, missed the notification about your reply

    Yes, my site is connected to the internet (it has access out) but the site itself is private to my own network (not visible to the world).

    The site itself is loaded up as a copy of the production site, with URLS updated as needed (all via command line scripts)

    I tried the staging flag, but was still getting warnings. Can you outline any specific steps I need to do? The process used is

    restore a copy of all files
    restore/load db backup
    rewrite all of the URLS in the DB

    If there are additional steps/changes needed please let me know

    Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Hey @arvoreen – if you are creating a staging version of your main site then recommended steps are:

    • First, disconnect Jetpack on production site.
    • Then create staging version of the production site.
    • Then connect Jetpack at staging version of site.
    • And then, you can connect the Jetpack to the production site as well, and this will avoid any notice from Jetpack.

    Similarly, before deploying the staging site to the production site, you can follow these steps:

    • Disconnect Jetpack on staging site and production site.
    • Deploy staging site to production site.
    • Connect Jetpack at the production site and this will again avoid any notice from Jetpack.
    Thread Starter arvoreen

    (@arvoreen)

    I’m sorry, that doesn’t make a lot of sense — or at least really negatively impacts any type of automation

    What I am trying to do is setup an automated backup mechanism — the net result is 2 LIVE backup copies of my production site. One for ‘dev’ purposes that I only load on demand. The other is automatically loaded from the backup created the day before. To me it sounds like the only way I can accomplish what I’m looking to do is to disconnect jetpack on the restored sites and not have any access to it’s functionality when doing development or examing older backups. Is this accurate?

    Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Hello @arvoreen – the above steps can be done to avoid any kind of notice from Jetpack if you clone the site or create a staging version of the production site, but if you don’t want to do this every time, then once you create two live backup copies of the production site and if Jetpack shows the safe more notice of both live backup copies then you can choose the option “Create a fresh connection” there and it will create a separate Jetpack connection for both the two live backup copies without disturbing Jetpack for the production site.

    Thread Starter arvoreen

    (@arvoreen)

    I’m sorry — part of the point of all this is to do it via command line tools only. Is there any way to do this in an automated fashion WITHOUT my having to login and go to the dashboard?

    Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Howdy @arvoreen – I understand your preference for utilizing command line tools for automation purposes. However, at the moment, I’m afraid it cannot be achieved through command line tools without accessing the WP Admin dashboard.

    Thread Starter arvoreen

    (@arvoreen)

    Ok — thanks — so I think I may just disable the plugin on the backup/dev sites to make sure nothing bad happens with the production connection. It would be great if more commands became available to the ‘wp cli’

    Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    I think I may just disable the plugin on the backup/dev sites to make sure nothing bad happens with the production connection.

    Sure, you can disable the plugin on dev sites – however, even if you don’t disable the plugin, it may just show the safe mode there but don’t disturb the site, and once you enter the WP Admin area, you can choose the correct option to fix the notice (if it appears). However, it is always your choice in which you are comfortable. πŸ™‚

    It would be great if more commands became available to the β€˜wp cli’

    If you want, you can create a feature request for this.

    Our dedicated team will take a look at that and get back to you with questions or feedback if needed.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘‘JETPACK_DEV_DEBUG’ not working’ is closed to new replies.