create wordpress and html sites on one droplet

July 2, 2015 795 views

how do i create a wordpress site and a regular html site on one droplet. the only tutorials i can find do multiple wordpress sites or multiple html sites.

1 Answer

To add another site to (for example) the WordPress one-click image you simply need to create additional Apache virtualhosts. This tutorial will guide you in this process. The default WordPress site on that image is simply set up as a single virtualhost so it's really just a matter of adding additional configurations pointing to different directories.

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.
  • Hi ryan, I'm using that method and it works fine. But then when I checked the existing wordpress site it was pointing to the new database. What was wrong there? Please help. Thank you.

  • @gasak I would suspect you need to double check the virtual hosts .conf file and make sure the DocumentRoot is where it should be. It's hard to say without knowing exactly what you did. Also, double check all your steps through that tutorial.

  • @gasak There are two possible reasons for this.

    1. Check the existing site's wp-config.php to ensure it specifies the correct database.
    2. As @SamiF said, check the virtualhost configuration to ensure that each host has the correct directory set as it's DirectoryRoot
Have another answer? Share your knowledge.