• I wonder if anyone has done it: deleted the main site and put the subdomain how the main site, and if it did, as it did? It would just delete the db of the main site and play there the subdomain or requires a more complex action?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can do it in just two steps (I hope)

    a) Put every folder and files of main domain to subdomain.

    b)Do not need to delete the db you can simply change the url in the db so that it will work fine on the subdomain.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    For a Multisite network? No, that’s not how it works, Extech.

    It’s more complicated because you have to edit your wp-config.php file to treat the subdomain as the main site, AND you have to edit the database so the URLs for the domain and subdomain are swapped in the wp_blogs table.

    I’ve done it, but I wouldn’t do it again. It’s actually EASIER to make a new subdomain for the main site, export the content, import it to the new site, wipe out the main site, and repeat, pulling in the subdomain to main.

    Thread Starter markk26

    (@markk26)

    Thanks for the answers, but as I still have no content at the secondary site, I’d better create a new site and play in the root, avoid headaches in the future!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If you have nothing in the secondary site, what are you trying to ‘swap’ it for? You can just wipe out the content.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Delete the main site’ is closed to new replies.