Support » Networking WordPress » Migrate website from subdomain to main domain and deleting the old website

  • farangiztwitty1997

    (@farangiztwitty1997)


    Hi All,

    I created a website http://www.example.com. We decided to change its layout and content and for ease of use I decided to create a subdomain – new.example.com using a Multisite feature of the WordPress and work on a new website there. I am done with the new website, so now I wanted to transfer the website from subdomain to a main domain (so the old website which is now in the main domain is not used anymore) – however since I am using a multisite – I have a shared database and folder which is being used for both websites. I am not sure how to separate between two websites – migrate the new website to a main domain and delete the old website. Can you kindly advice?

    many thanks in advance!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Do you want to return to single site, or do you only wish to alter which sub-domain is mapped to which site? Going back to single is very messy to do, try to avoid it. You should be able to use the domain mapping feature to route www requests to the newer sub-site. The old site can be mapped to “old” sub-domain. It still remains the primary site internally though, so I don’t think you can delete it like you would sub-sites.

    To actually make the new sub-site the main site would involve a bunch of table renaming in phpMyAdmin. If you go through all of that you could then return to single site relatively easily if you want. All of the renaming is the messy part. In the future, know that it’s easier to setup a staging site as a secondary single site installation in a sub-folder than it is to do so through multi-site. You can then use virtually the same wp-config.php file in the second site, only changing the value assigned to $table_prefix.

    Regardless of which approach you take, you’re essentially moving the site as far as URL references go, so all domain name references in the data will need to be updated. Review the portion of this section in Moving WordPress regarding search and replace.

    Always make a full DB backup before making any changes through phpMyAdmin. It’s all too easy to accidentally corrupt the DB when using this tool. Wield it carefully.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.