So you want to map multiple domains to the same WordPress site?
You might want to look for “multiple domains” in the plug-in directory:
https://wordpress.org/plugins/search/multiple+domains/
Thank you for your reply @stevenlinx
There are so many plugins for multi domains and it seems that they are intended to enable multi domain only for single site not for multi site sub directories.
I do not think their plugins work well for multi sites.
So I will manage to do that duplicating mysql data and wordpress directories.
Thank you.
multi site sub directories
You can do this with WordPress multisite network.
https://wordpress.org/support/article/create-a-network/
https://wordpress.org/support/article/before-you-create-a-network/#types-of-multisite-network
The sites in a network have different URLs. You can choose one of two ways for the URL to specify the site:
Each site has a different subdomain. For example: site1.example.com
, site2.example.com
.
Each site has a different path. For example: example.com/site1
, example.com/site2
https://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network/#customdomain
Thank you for your suggestion @stevenlinx
I have these 2 sites.
example.com/mySite1
example.com/mySite2
And I want to show example.com/mySite1 as mydomain.net/mySite1 too.
How about in this case?
I could not find any solutions.
so I have tried duplicating DB and contents and it worked well.
I will go ahead with this way.
Thank you for your help!
so I have tried duplicating DB and contents and it worked well.
I will go ahead with this way.
Good to hear.
I have these 2 sites.
example.com/mySite1
example.com/mySite2
And I want to show example.com/mySite1 as mydomain.net/mySite1 too.
How about in this case?
I could not find any solutions.
There is a standard solution to this. I’ll describe here in case other users who may be reading this thread.
This method is the primary way to solve your problem; it’s simpler and less problematic than duplicating DB and contents. You don’t need to duplicate DB and contents just to solve this.
You basically redirect the DNS records of mydomain.net
to your web server and set mydomain.net
as your WordPress site URLs.
1.) With your domain registrar, set the DNS A
record of mydomain.net
to your web server. Then, configure your web server listen for mydomain.net
(you can do this with software such as cPanel).
2.) Set mydomain.net
as your WordPress site URLs:
edit WP_HOME
and WP_SITEURL
according to this guide:
https://wordpress.org/support/article/changing-the-site-url/#edit-wp-config-php