I have 1 domain name that requires multiple (and different WP installations).

How can I setup the following 2 websites:

Website 1:

  • Domain name: domain.com
  • Physical folder: /var/www/vhosts/domain.com
  • URL: https://domain.com/
  • CMS: WordPress One (with database one)

Website 2:

  • Domain name: domain.com
  • Physical folder: /var/www/vhosts/domain.com.test
  • URL: https://domain.com/test/
  • CMS: WordPress Two (with database two)
  • Why? Why can't you use a multisite installation?
    – vancoder
    Oct 13, 2021 at 16:31
  • Completely different websites with different usage / traffic patterns that require different optimizations. Compliance requirements that dictate data segregation in different databases
    – Elie
    Oct 13, 2021 at 18:34
  • "Completely different websites with different usage ".....in that case, you should consider using subdomains, not a folder structure. Much simpler in that you can point the subdomain directly to your second instance of WP.
    – Trisha
    Oct 19, 2021 at 20:45

1 Answer 1


install a normal wordpress like it was to install only one

in this case in /var/www/vhosts/domain.com

Website 1:

Domain name: domain.com
Physical folder: /var/www/vhosts/domain.com
URL: https://domain.com/
CMS: WordPress One (with database one)

now /var/www/vhosts/domain.com has all wordpress files and folders

in this directory /var/www/vhosts/domain.com create a new folder called test

now install a new wordpress in /var/www/vhosts/domain.com/test

Website 2:

Domain name: domain.com
Physical folder: /var/www/vhosts/domain.com/test
URL: https://domain.com/test
CMS: WordPress Two (with database two)

and this is how you get two wordpress sites with two different databases in the same domain. basically you create a folder inside that has another wordpress , the main wordpress never goes there because doesnt know that exists. and can be access by directly writting the url with the folder name. this is good for developing a second version of the website, or to have two websites in one domain also.

  • Thank you Tiago but is it possible to accomplish this without installing in a sub-folder? but rather in 2 folders side-by-side. Is there a server/dns/website/WP config that could do this?
    – Elie
    Oct 14, 2021 at 13:04
  • you make two folders on the main directory and install one wordpress in each, then make a file index.php side by side of the folders, this means also in the main directory. then in the index.php redirect write code that fetch the url introduced and redirect to the folder wanted. you can use javascript or php to do this, other way is to make the redirect on one of the wordpress with functions in functions.php. other way is to use one .htacess to do this. basically there are a few ways to do this. the only thing you have to do is not have duplicate files and folders on the same directory Oct 14, 2021 at 18:57
  • offcourse you need to ave to databases created also. here is one example. youtube.com/watch?v=lGSRDV2IQhw . there also more youtube videos about it Oct 14, 2021 at 18:58
  • @tiago this will cause major trouble if at any point the OP creates a "Page" in the 1st install named Test (or the actual name of the folder), WP will default to creating the same URL as the folder created outside of WP. Or vice versa - any Pages created in either installation that match the other will cause headaches such as redirect loops. To be honest, I don't think what OP wants to do is possible the way described - two completely different websites should probably not be sharing a domain, but using sub-domains it would be workable if not ideal.
    – Trisha
    Oct 19, 2021 at 20:52
  • I make this to have a development site and it works just fine. Oct 21, 2021 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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