Different WP_HOME and WP_SITEURL causes CORS error
-
Hi there
I have built many webpages with WordPress REST API and a custom frontend, and now I started to update to WordPress 5. Suddenly it seems to be a problem that
WP_SITEURL and WP_HOME differ (different domains).
(I can’t publish or save a page anymore: publish failed, update failed)
But actually this ist just true: if I have WordPress running on a totally different domain than the frontend, I want them to be different.No suddenly I can’t save a post anymore because of CORS.
Has someone a hint how I could still use different domains on WP_SITEURL and WP_HOME in my wp-config.php?
define('WP_SITEURL', 'https://cms.domain.test/wp/'); // change this to your domain or dev-domain define('WP_HOME', 'https://localhost:3000/'); // change this to your domain or dev-domain
This is on my local wp-config.php
whereas on my live Backend I got something like this:define('WP_SITEURL', 'https://cms.domain.ch/wp/'); // change this to your domain or dev-domain define('WP_HOME', 'https://domain.netlify.com'); // change this to your domain or dev-domain
My netlify frontend url will change after the go live…
Thanks a lot for your help on this matter.
Cheers
- The topic ‘Different WP_HOME and WP_SITEURL causes CORS error’ is closed to new replies.