Any tutorial to use my LEMP server to serve many WP sites?

So far I found a tutorial of how to install a simple WP installation on LEMP under Nginx, but actually what I want is to use the server to host my Html and my WP sites.

Does anyone knows any tutorial on how to configure the server ready to host many WP sites?


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.

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.

I have my root web directory at /var/www/html/ and following the tutorial, I created a folder with the name Wordpress.

What I actually need is to have at the root directory, my main corporative website which is even in HTML so I just could upload the files and that is. But then, I need to have all my wp sites organized in a directory. I will call this directory secure/

What I would like to do, is configure 1 WP installation with the default plugins that I always use, like W3 supercache, Toast Seo, etc, and then, once I need a new WP installation, I think that I should do this:

  1. Copy the WP clean template directory installation, into the new one.
  2. Copy the WP database
  3. Open the wp-config,php and change the name of the database
  4. Copy the configuration file in /etc/nginx/sites-enabled/, change the server_name and setting web root directory.

Then, I’m not sure if the following commands are correct:

  1. To duplicate the directory wordpress I will cp -r wordpress newfoldername
  2. To copy the database, I don’t know how to performance it.
  3. To edit the wp-config.php, I will move to the directory name cd directoryname and edit the file nano wp-config.php
  4. To copy the nginx configuration file I don’t know how to do it, and to edit the new copied file I will do it typing sudo nano /etc/nginx/sites-available/newfile

Am I in the right way? Could someone let me know if the steps are correct and help how to copy/clone the database and copy the nginx configuration file?

Many thanks

Ok thanks I’ll give a try