WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Switching from subdomains to subdirectories AFTER adding another site? (8 posts)

  1. Jessica
    Member
    Posted 8 months ago #

    I hope you can help me. I created a development site through DesktopServer and implemented WordPress Multisite. I have one main site and one additional site. It was my intention to use subdomains, and this is how I set it up in DesktopServer, but when I went to launch my sites to the live web server, it turns out they don't allow the use of subdomains with WordPress Multisite.

    I have already switched Multisite to use subdirectories, but the tutorials and forum posts I've read all assume that people have not yet created any additional sites. My question is... is it possible to change my existing subdomain site to a subdirectory site?

    Also, I am not opposed to just re-doing my second site, but unfortunately I get a 500 Internal Server Error when I create a new site and attempt to go to that new site's admin panel.

    I'm really hoping I don't have to start completely over...

  2. You can. It's annoying.

    You'll have to go into the DB and update the tables so everywhere it references the subdomain, you change it to the main domain and edit the path.

  3. Jessica
    Member
    Posted 8 months ago #

    Since I created the site through DesktopServer it was easy to update the database... So I did that and unfortunately it still doesn't work... I'm getting a 404 Page does not exist error... also I cannot get to the dashboard of my second site, it keeps taking me to the dashboard of my main site. I must have set something else up wrong. Any advice is appreciated. Thanks!

  4. Did you update the .htaccess?

    HOW did you update the DB? what was your search pattern? You can't just search/replace blindly. And you STILL need to go back and look through settings.

  5. Jessica
    Member
    Posted 8 months ago #

    I used DesktopServer - it has custom scrubbing options when exporting the site. I had it replace http://www.site2.example.dev with http://www.example.com/site2. I also updated the .htaccess and the wp-config.php file. What other settings do I need to look at?

  6. I'd start checking these tables:

    wp_blogs
    wp_site
    wp_sitemeta

  7. Jessica
    Member
    Posted 8 months ago #

    Thanks very much for your help. I ended up just redoing everything and it only took a couple days.

  8. healthproductsusa
    Member
    Posted 5 months ago #

    In a slightly different situation. I have an existing subdomain structured multisite. I need to redirect 100's of subdomains to subdirectories which, of course, don't exist. For example:

    one.site.com to site.com/one
    two.site.com to site.com/two
    .
    .
    .
    322.site.com to site.com/322

    Is this even possible? If have tried numerous .htaccess rewrites but nothing has worked because they are WP created subdomains, not actual subdomains created on the server. Any suggestions would be appreciated.

Reply

You must log in to post.

About this Topic