gatsbyjs/gatsby · error

The Url set in plugin options has a different protocol than

Error message

The Url set in plugin options has a different protocol than the Url saved in WordPress general settings.

options.url: ${pluginOptions.url}
WordPress settings: ${wpUrl}

This may cause subtle bugs, or it may be fine.
Please consider addressing this issue by changing your WordPress settings or plugin options accordingly.

What it means

In checkIfSchemaHasChanged, the plugin compares the protocol of pluginOptions.url with the generalSettings.url returned by WordPress. When they differ (http vs https), the warning fires because requests may be redirected or served differently than the site's canonical URL, which can cause mixed-content or inconsistent data issues. Sourcing continues; this is a configuration-consistency advisory.

Source

Thrown at packages/gatsby-source-wordpress/src/steps/ingest-remote-schema/diff-schemas.js:56

      {
        schemaMd5
        # also get the wpUrl to save on # of requests
        # @todo maybe there's a better place for this
        generalSettings {
          url
        }
      }
    `,
  })

  const {
    schemaMd5,
    generalSettings: { url: wpUrl },
  } = data

  if (url.parse(wpUrl).protocol !== url.parse(pluginOptions.url).protocol) {
    helpers.reporter.log(``)
    helpers.reporter.warn(
      formatLogMessage(`

The Url set in plugin options has a different protocol than the Url saved in WordPress general settings.

options.url: ${pluginOptions.url}
WordPress settings: ${wpUrl}

This may cause subtle bugs, or it may be fine.
Please consider addressing this issue by changing your WordPress settings or plugin options accordingly.

`)
    )
  }

  let cachedSchemaMd5 = await helpers.cache.get(withPluginKey(MD5_CACHE_KEY))

  let foundUsableHardCachedData

View on GitHub (pinned to e85d62f177)

Solutions

  1. Update the WordPress Site URL (Settings > General or wp-cli option update home/siteurl) to use the same protocol as pluginOptions.url.
  2. Or change the plugin options url in gatsby-config.js to match WordPress's protocol.
  3. Prefer https on both sides; ensure TLS is correctly terminated before WordPress.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/ingest-remote-schema/diff-schemas.js:56 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/8c91f796f541fada. Report an issue: GitHub.