create wordpress and html sites on one droplet

Posted July 2, 2015 3.3k 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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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