Can a WP site have parent domain but have the site render a different domain

My company hosts our own company site at something abc.com at our physical company location but wants to use a third party host with a domain similar to production.cim and manipulate the WordPress php to make anything published at production.com appear as abc.com/xyz. (Please don’t ask me why they chose to use different servers I don’t know 😕) Can WordPress even handle that?

I’m not asking about our hosting but if this is company but rather WordPress itself can actually do this if we modify the backend like setting the WordPress url to production.com and the site address to abc.com/xyz? Our developer is also going to rewrite/global search and replace the MySQL tables. We had it working once so any help is great.

3 Comments
  1. I’d say no. You’ve to tell WordPress an URL and it goes with that. Whenever you redirect another URL to your site, WordPress will take the previously mentioned URL (which you enter in the settings).

  2. I’ve never done this, but yes you in theory could do that…

    If you installed WordPress on both domains servers but in one secondary sites wp-config file, you put in the credentials for the Main database, it would use that..
    However you need to override the site url and home url in wp-config to stop the database redirecting you to the main url if that makes sense.

    I feel like there should definitely be an easier way to do this using a redirect that keeps the URL the same in the Htaccess file . I’ll have a think.. This quick Google suggest you can..

    4. Redirect Domain Without Changing URL

    If you want to redirect visitors from your old domain (old-site.com) to new domain (new-site.com)without changing URL, add the following lines to your htaccess file.

    RewriteEngineOn RewriteCond%{HTTP_HOST} ^old-site.com RewriteRule ^(.*) [P]

    This will redirect URL (e.g old-site.com/product) from old domain to same url on new domain ( e.g new-site.com/product)

  3. Have you considered using a subdomain e.g. site.abc.com? Before users see a website, their device queries the IP address for the domain. Rewriting the URIs in WordPress won’t change this as the query occurs well before that.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer