Question

Can we run multiple WordPress sites on a single Droplet?

Hi there,

I am very new to these things. Suppose I sign up for 10$ plan, can we run more than one WordPress websites?

If yes, how? Please post supporting link/tutorials.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

Hi there,

You could follow the steps from this video on how to host multiple WordPress websites on the same server with Apache Virtual Hosts:

Essentially, what needs to happen is:

  • Download a new copy of WordPress with the wget command:
wget wordpress.org/latest.zip
  • After that extract the files
unzip latest.zip
  • Then move the files to the /var/www/ folder:
mv wordpress /var/www/your_site.com
  • Then set the owner of the file to the Apache2 user:
chown -R www-data:www-data /var/www/your_site.com
  • After that copy the existing Apache config:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/your_site.conf
  • Then enable the new site:
sudo a2ensite
  • Run a configtest:
sudo apachectl -t
  • If you get Syntax OK reload Apache:
sudo systemctl reload apache2
  • Then create a new MySQL database and username. To create the database first access MySQL:
mysql

Then run the following queries:

CREATE DATABASE wp_site;

CREATE USER 'wp_site'@'%' IDENTIFIED BY 'use_secure_password_here';

GRANT ALL PRIVILEGES ON wp_site.* TO 'wp_site'@'%' WITH GREANT OPTION;
  • Finally, access the site via your web browser to finish the installation.

Hope that this helps. Regards, Bobby

Want to learn more? Join the DigitalOcean Community!

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.

It’s actually pretty straight forward… just create a new directory for each site and install Wordpress on that sites directory… then configure your virtual hosts (Apache) or server blocks (Nginx) accordingly. I followed the DO tutorials and to be honest, no disrespect to the authors, but they were often lacking critical information that then needed hours of troubleshooting and Googling to resolve. Don’t get me wrong, the DO tutorials are a great resource, as is this community, but I find some of the tutorials often jump around between different configurations and what not, and I personally found that they were often confusing.

Again, it isn’t a reflection on the knowledge of the authors, as I think they are all actually great, but there is such an abundance of configurations available, such as several OS’s, web servers, and a myriad of programs to install and settings to configure, that it really is a mammoth task to tailor tutorials to specific needs outside of just installing a specific item. A prime example is that you might be reading a tutorial about logging files and it jumps between different systems… to those that have a reasonable understanding of what they are doing, they’re great, for a total n00b, I would suggest perhaps not the best. I also found that some of the tutorials are a little dated now. Like I said, I personally found them to be a great resource, but for a n00b wanting to achieve things from beginning to end, don’t be surprised if you also end up spending some “Google time” outside of the tutorials, when things don’t work out exactly as planned.

As a side to the original poster, you’re better off creating a droplet with a SSH key embedded from the get-go and don’t do the one-click Wordpress install, mainly because the install of Wordpress takes mere seconds to do it manually anyways. Focus on the OS you are going to use as your first click, then focus on locking it down with the firewall and fail2ban (even if just SSH to start) and then move on to your server stack… again so many choices and different ways to go. IMHO, your first 5 minutes on a new server should be geared towards security… it’s crazy how fast the hack attempts come flying in and it can be pretty disheartening spending hours following guides and getting everything installed, only to realize your server was compromised before you even managed to secure it.

Good luck with moving forward and if you need any help, I’m sure the community here will be a valuable resource for you.

Actually, there’re a couple of DigitalOcean tutorials to complete this task. How To Dockerise And Deploy Multiple WordPress Applications On Ubuntu How To Configure Single and Multiple WordPress Site Settings with Nginx

Depending on your goal, you could use Multisite: How To Set Up Multiple WordPress Sites Using Multisite

Please look at the existing tutorials before posting here.

You could try WordPress Multisite. It basically allows you to have multiple sites on one installation. Here’s a tutorial for it but I would look into it first to make sure it would work for your specific use case. I use it all the time on $5 and $10 Droplets and it works perfectly.