How to delete everything in the main domain, but leave the subdomain

Avatar
  • Answered
Hi,

I got this website built for me staffme.co.nz but it turned out that I wanted to redo it myself, in wordpress.
I created a subdomain, newsite.staffme.co.nz , installed wordpress there and got a pretty cool site going.
Now I want to delete the original site and install the new site there. I have made a back up of the whole lot and stored it inside my computer. I also think I can figure out how to migrate the wordpress site across using a plugin when it comes to it.
What I really want to know is what files should I delete before I do the migration? and what should I leave there?
I'd like to keep all my emails but the site itself can go.
Thanks in advance, Brad
Avatar
Arn
Hello Staffme, Thanks for your question about moving the files for your WordPress site into the main domain. We do have an article of how to do this called Moving your WordPress from a subfolder to the root directory. However, it doesn't tell you what to do with the existing files in the root domain. A defined subdomain will have its own folder, though it will be under the primary domain. This folder will contain the website files that belong to the domain you want to move (newsite.staffme.co.nz). All of the files UNDER the public_html folder (the default document root folder) will need to be deleted or moved into its own folder. Make sure you make a full backup before you make any file movements. All of the folders EXCEPT the one that contains your subdomain's files (under the public_html) should also be deleted or moved. After you finished cleaning out the files and folders, you can start moving your WordPress files and folders OUT of the subdomain folder and into the PUBLIC_HTML folder. Remember that some files or folders may be important to you. You don't have to worry about the Mail folders as it is already outside of the PUBLIC_HTML folder. However, if you have created FTP accounts, the folders are created by default under the PUBLIC_HTML folder. So, take a close look at the structures in your account and make a list of the files and folder that must remain in the PUBLIC_HTML folder before you begin removing them for your WordPress site. Some files or folders can definitely remain, but they should not conflict with your WordPress files. The files that conflict would be ones that are named the same as the files (or folders) in your WordPress site. If you have any further questions or comments, please let us know. Regards, Arnel C.