{"record":{"id":"9c4fdc9fb03c8b75","repo":"gatsbyjs/gatsby","slug":"received-preview-data-from-a-different-remote-url","errorCode":null,"errorMessage":"Received preview data from a different remote URL than the one specified in plugin options. Preview will not work. Please send preview requests from the WP instance configured in gatsby-config.js.\n\n Remote URL: ${webhookBody.remoteUrl}\n Plugin options URL: ${url}\n\n","messagePattern":"Received preview data from a different remote URL than the one specified in plugin options\\. Preview will not work\\. Please send preview requests from the WP instance configured in gatsby-config\\.js\\.\n\n Remote URL: (.+?)\n Plugin options URL: (.+?)\n\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/steps/preview/index.ts","lineNumber":339,"sourceCode":"    const { hostname: remoteHostname } = urlUtil.parse(webhookBody.remoteUrl)\n\n    if (settingsHostname !== remoteHostname) {\n      const sendPreviewStatus = createPreviewStatusCallback({\n        previewData: webhookBody,\n        reporter,\n      })\n\n      await sendPreviewStatus({\n        status: `RECEIVED_PREVIEW_DATA_FROM_WRONG_URL`,\n        context: `check that the preview data came from the right URL.`,\n        passedNode: {\n          modified: webhookBody.modified,\n          databaseId: webhookBody.parentDatabaseId,\n        },\n        graphqlEndpoint: webhookBody.remoteUrl,\n      })\n\n      reporter.warn(\n        formatLogMessage(\n          `Received preview data from a different remote URL than the one specified in plugin options. Preview will not work. Please send preview requests from the WP instance configured in gatsby-config.js.\\n\\n ${chalk.bold(\n            `Remote URL:`\n          )} ${webhookBody.remoteUrl}\\n ${chalk.bold(\n            `Plugin options URL:`\n          )} ${url}\\n\\n`\n        )\n      )\n\n      return\n    }\n  }\n\n  const inPreviewDebugMode =\n    inPreviewDebugModeOption || process.env.WP_GATSBY_PREVIEW_DEBUG\n\n  if (inPreviewDebugMode) {\n    reporter.info(`Sourcing previews for the following webhook:`)","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-wordpress/src/steps/preview/index.ts#L321-L357","documentation":"In sourcePreviews, the hostname of the preview payload's remoteUrl is compared against the plugin options url (and WP settings). When they differ, the preview is rejected: a status callback reports RECEIVED_PREVIEW_DATA_FROM_WRONG_URL and this warning is logged. It prevents sourcing data from an unintended WordPress instance, which would silently mix content from another environment.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/steps/preview/index.ts:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send preview requests from the WordPress instance whose URL matches pluginOptions.url in gatsby-config.js.","Fix the remoteUrl configured in WPGatsby on the WordPress side.","Check for staging/production mismatch — the preview was likely triggered on a different environment.","Verify hostnames including scheme and subdomain (e.g. www vs non-www) match."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}