Can anyone point me to instructions on how to copy/clone a one-click WordPress install to another folder so I can run a second site on my Droplet? The one-click install includes some security settings and plugins enabled by default, and I hope to avoid doing the second WordPress installation manually.
I’ve found a tutorial on how to modify a VirtualHosts file to allow multiple domains/sites to be hosted on a single Droplet so can do that part.
Thanks!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hey friend,
Let’s say domain1.com is a Wordpress at /var/www/html and you want domain2.com to host a copy of the same installation. Let’s also say these values are true for domain1.com’s Wordpress instance, all of which can be found in wp-config.php:
Here’s what I’d do:
In this example I set these values for you to change in /var/www/domain2/wp-config.php:
Obviously use better passwords than I did in this example. Next you have to change domain1.com to domain2.com in the Wordpress configuration, and you can find a few different ways to do that here:
https://codex.wordpress.org/Changing_The_Site_URL
You already mentioned that you have no problem configuring the virtual hosts, but just a quick reference for anyone else reading later:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
Hope that helps :)
Jarland
Plesk (now free on reinstalled DO droplets?) had a one click button to do it.