Report this

What is the reason for this report?

how can I transfer my data on my domain to my subdomain?

Posted on March 19, 2019

hi to all. I have got a wordpress nginx ubuntu 14 droplet which has 4 subdomains. 2 of them are operational. i need to copy my main site’s data to one of my subfolder to make the other subdomain operational too. i tried to do that getting data from root directory and use import from wordpress dashboard but it crashes my website. i tried a migration plugin in wordpress it is no good either. i dont know the way for it. can you please help? 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.

Hello,

As all of the domains are on the same server, you need to create separate Nginx server blocks for each sub domain. You can follow the steps on how to do that here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

After that you need to make sure that you create a separate database and database user for each website.

Once you have these two things, you can move the data of your website as you described in your post. Even a migration plugin should work in this case.

Hope that this helps! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.