Skip to content

Fix: Use site_url() instead of home_url() for Bedrock compatibility#530

Open
celidrissi wants to merge 1 commit intoelementor:masterfrom
celidrissi:fix/bedrock-site-url-mismatch
Open

Fix: Use site_url() instead of home_url() for Bedrock compatibility#530
celidrissi wants to merge 1 commit intoelementor:masterfrom
celidrissi:fix/bedrock-site-url-mismatch

Conversation

@celidrissi
Copy link
Copy Markdown

@celidrissi celidrissi commented Feb 26, 2026

On Bedrock installations, home_url() and site_url() differ. The OAuth token contains site_url(), but the plugin was sending home_url(), causing 'site url mismatch' error.

Fixes #529

✨ PR Description

Purpose: Fix site URL detection in API client to ensure compatibility with Bedrock WordPress installations where site and home URLs differ.

Main changes:

  • Replace home_url() with site_url() in Client class to correctly identify WordPress installation directory
  • Ensure API client sends accurate site URL for Bedrock multisite and custom directory configurations

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

On Bedrock installations, home_url() and site_url() differ.
The OAuth token contains site_url(), but the plugin was sending home_url(),
causing 'site url mismatch' error.

Fixes elementor#529
@celidrissi
Copy link
Copy Markdown
Author

Hi @rami-elementor @pkniazevych @DinetsV @bainternet @nirbhayel
Would you have a moment to take a look at this PR when you get a chance ?
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bedrock: site url mismatch - home_url() should be site_url()

1 participant