How to install subdomain in a Digital Ocean Droplet


How to install subdomain in a Digital Ocean Droplet.
I have already one site running and I want to kbnow how can i install a subdomain of my blog in the same droplet.
please help me urgently @GulshanKumar @AbhishekVerma @anon9455539


same way, where you type domain you would be typing your subdomain… and pointing IP for subdomain using A record.

1 Like

means there main domain and subdomain both should be there


No, it should be seperate.


yes you can point domain and subdomain on the same droplet


I didnot get
Please tell me in detail
How to do it
Do I have to create in any new folder or what
And what about wp-config
And what should be the same process for from last wordpress installation process


Check this tutorial


But I have installed it in LEMP i mean NGINX


Oh. Google it bro. Steps similar to you did before. Only you need to point domain on DNS & nginx.conf file and create a new folder for new domain


Check /etc/nginx/ folder


ok bro sure


You don’t have enough knowledge in commands means just install CP.
My suggestion try vestacp


Bro I know a little bit do i have to create a new wp-config.php for subdomain website


It will be created automatically using ‘five min famous installation page’ of WordPress.



[quote=“GulshanKumar, post:14, topic:8149”]
five min famous installation page’
Sir couldnot get this


Suppose my domain is and i want to install wordpress and make subdomain like
Then how to do it?


create folder “ask” inside domain pointed directory.

  1. Download Wordpress from here
  2. Upload it on ask folder
  3. Unzip it
  4. Now, Visit
  5. Config DB & everything


1 Like

Well, that is called subdomain Subdirectory.

It will require below configuration, else you may see 404.

location /ask {
index index.htm index.html  index.php;
try_files $uri $uri/ /ask/index.php?$args;

Then, follow as suggested by @svignesh1994


sir i was trying to follow the method but site is not working


Main site stopped working
Solved by removing subdirectory name from sites-enabled

1 Like