0

I have a production site 'domainA.com', which is a multi-site WordPress installation.

I have another site 'domainB.com'. I want domainB.com to have exactly the same contents and configurations of domainA.com. This means that when something on domainA.com is updated, the change must be immediately reflected on domainB.com without having to do anything else.

For example, I want to make a WooCommerce API call from domainB.com, and it must return the same content as if it were called from domainA.com. https://abc.domainB.com/wc-api/v3 must return the same content as https://abc.domainA.com/wc-api/v3.

I want to do this because I want to access domainA.com's content without increasing the load on domainA.com's server.

I have made the necessary changes to enable a remote MySQL connection from domainB.com. I have updated domainB.com's wp-config.php to connect to domainA.com's database.

Currently, I am unable to browse on domainB.com. This is what I am getting on the browser:
www.domainB.com redirected you too many times.

What else do I need to do?

1

You need to set the WP_SITEURL and WP_HOME in domainB.com's wp-config.php file. Please add below code.

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

In your server SSL setup then used below code

define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.