By C K
Its almost been an month I’m researching on how to create a subdomain of one click wordpress install in same droplet, but there are no proper tutorials or guide for it. Some help would be appreciated!!
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!
Accepted Answer
Hey friend!
While I can’t give you a step by step on this, I can help you widen your search. If you’re searching for how to do this on our one-click image, you’re limiting the results too far. Basically, this is the question you’re asking:
“How do I host two Wordpress sites on one LAMP stack?”
What it comes down to are these key points:
Since you’ll be adding a second virtual host, you need the answer to this question: “How do I set the ServerName and ServerAlias values in my existing virtual host?”
Because, you see, when you only have one site then you don’t need Apache to know which site to serve when called by a certain URL. Now that you’ll have two sites, you need to edit the virtual host config (should be in /etc/apache2/sites-enabled) and define the ServerName and ServerAlias variables. Perhaps to something like this:
ServerName myfirstdomain.com ServerAlias www.myfirstdomain.com
After that, it becomes only about answering these questions: “How do I install Wordpress?” “How do I create an Apache virtual host?”
If this sounds workable, you can find many tutorials on the subject of those. If it has you scared to death because you don’t want to dive that deeply into Linux and Apache (this is okay, and many people feel this way), then you might consider just using a second droplet instead.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.