Report this

What is the reason for this report?

Installing two wordpress instances on one droplet - problem with second site redirecting to first

Posted on July 31, 2017

Hi - I’m trying to install two instances of wordpress on one one-click droplet Unbuntu Wordpress 4.8 on 16.04.

I’ve followed the following tutorials and setup a virtual host for my 2nd wordpress site https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-12-04 https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-12-04 https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts https://www.digitalocean.com/community/questions/is-it-possible-to-install-another-wordpress-on-droplet

I’ve now redirected my domains to DO’s nameservers, created the virtual host, created a new DB, copied over wordpress into my new 2nd wp web root directory, pointed WP to the new DB, updated the .conf, set permissions and restarted apache.

Now when I goto the 2nd WP domain address, it gets redirected to the 1st WP instance and shows my droplet’s IP Address.

I’ve gone through each of these tutorials several times and have destroyed and rebuilt the droplet 4 times without any luck. I’m stuck and hope someone can point me in the right direction.

Below are my .conf file settings

wordpress 1 (resolves to IP address http://138.197.80.189/)

/etc/apache2/sites-enabled/000-default.conf <VirtualHost *:80> ServerAdmin webmaster@leagueoto.com ServerName leagueoto.com ServerAlias www.leagueoto.com DocumentRoot /var/www/html

<Directory /var/www/html/>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

wordpress2 (also resolves to IP address http://138.197.80.189/) /etc/apache2/sites-enabled/d1p.co ServerAdmin webmaster@d1p.co ServerName d1p.co ServerAlias www.d1p.co DocumentRoot /var/www/html

<Directory /var/www/html/> 
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Both domains point to the same root directory. If you want to run two instances of WP you would need each domain to point to different directories.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.