The MU forums have moved to WordPress.org

Where in the tables is the admin user set??? (13 posts)

  1. gthorne
    Member
    Posted 15 years ago #

    Hi, I'm setting up WPMu to work with different domains as explained in this thread. It's all working fine, but now I want to import the other blogs. I'd like to do this via SQL, so I can script the import.

    I've been able to export a current blog, import it via SQL, and have it work. I can see it from the domain I want to see it from.

    The problem I'm having, though, is that I cannot see it in the control panel. Is there a table somewhere that says what blogs the admin can see? I can't seem to find it.

    Here's how I did it:
    1) Export all wp_* tables in SQL from existing WP install, except wp_usermeta and wp_users.
    2) Change all instances of 'wp_' in the sql to 'wp_<blog_id>_'.
    3) Import SQL into WP_Mu DB.
    4) Add record in wp_site for new site.
    5) Duplicate entries in wp_sitemeta for new blog:
    insert into wp_sitemeta (site_id, meta_key, meta_value) SELECT <site_id>, meta_key, meta_value FROM wp_sitemeta WHERE site_id = 1
    6) Insert new entry in wp_blogs for new site.
    7) Re-point the DNS.

    That's everything I did in the DB, there were a few other things like moving themes and plugins, and I haven't gotten to migrating users or media content yet.

  2. andrea_r
    Moderator
    Posted 15 years ago #

    You must have missed something.

    Try this way:
    http://bavatuesdays.com/importing-a-single-wp-blog-to-a-wpmu-installation/

    And use the domain mapping plugin.

    That thread is two years old, there are better ways now. :)

  3. gthorne
    Member
    Posted 15 years ago #

    I'm open to hearing about the 'better ways.' :)

  4. gthorne
    Member
    Posted 15 years ago #

    I'm trying out the 'domain mapping' plugin, but I get 'Sorry, domain mapping only works on virtual host installs.' Was that an option on install? Is there a way to change over an existing WPMu install? I searched the forum for this error, but couldn't find much of anything.

    I've only been working with WPMu for 2 days now, so I feel like I have a few years' of progress to catch up on when I'm reading the forums.

  5. andrea_r
    Moderator
    Posted 15 years ago #

    "Was that an option on install? "

    Yes, it was. :D vhost=subdomains.

    The subfolder install part was kind of an important piece to leave out. ;) Some things don't work the same.

    Create your sub-blogs and import the content as in the link above. then use the Multi-Site manger plugin to give them their each domain. They won't show up on the list of blogs, they'll be under a new (plugin-created) menu item called 'sites'.

  6. gthorne
    Member
    Posted 15 years ago #

    Ahh, yes. Is it just me, or does calling it 'virtual hosts' and not 'subdomains' add confusion. Oh, well. I suppose I'll re-install.

  7. gthorne
    Member
    Posted 15 years ago #

    Ok, I'm feeling really stupid, because I'm just not getting this.

    I reinstalled WPMu using the subdomains option, and it's all working fine.

    I installed and configured the Domain Mapping plugin.

    I found the Manage -> Domain Mapping page, and added the new domain name.

    I can now go to that URL, and it points to the main WPMu install. But I'm still not sure where the new blog is, so I create a new blog under Site Admin -> Blogs. But where do I say that <blogname>.<wpmudomain>.com is the blog for http://www.<blogname>.com? I can't find the new 'Sites' menu anywhere (it's not under Site Admin, and I've looked everywhere else).

    Am I missing something (literally or figuratively)?

  8. andrea_r
    Moderator
    Posted 15 years ago #

    Yes, you are. :D It's completely backwards. You have to create a blog first before you change its domain. :)

    Undo the domain mapping you did, because you just mapped a domain to your main blog and your "real" domain is no longer working.

    Now. Create the sub-blog FIRST.
    it will show up on the list of Blogs.

    Then login to the backend of that blog (newblog.your.domain.com/wp-admin/ and THEN do the Domain Mapping there.

    Ignore what I said about the Sites menu as that only applied to the Multi *Site* manager plugin.

  9. gthorne
    Member
    Posted 15 years ago #

    Will I have to set up the newblog.wpmudomain.com in the DNS of my webhost to point to wpmudomain.com, or will the redirect take care of that for me?

    Andrea, thanks for all your help on this. You are my favorite person right now.

  10. andrea_r
    Moderator
    Posted 15 years ago #

    Nope, you don't have to set that up - the *.yourdomain.com takes care of that.

  11. gthorne
    Member
    Posted 15 years ago #

    Hmm, doesn't seem to work for me. <blogname>.<wpmudomain>.com/wp-admin (or without the wp-admin, for that matter) gives me a 'server not found' error.

    For our purposes, it seems the directory method worked better; wpmu was on the server accessed at http://www.<wpmudomain>.com, and the files were stored locally in ~/<wpmudomain>. I just pointed the other domains to also point to ~/<wpmudomain>, and set them up in wp_site and wp_blog. It seemed to work well. Is it stupid or unwise to do it that way?

  12. andrea_r
    Moderator
    Posted 15 years ago #

    Did you add the wildcard hosts record in Apache?

  13. gthorne
    Member
    Posted 15 years ago #

    To my understanding, in order for this to work, I need to add *.<wpmudomain>.com to the DNS, AND add the ServerAlias line to Apache's config. We're on shared hosting with 1&1 (or at least, this domain is), and I can't find where I can do either. I don't think I can do either with the shared package we have.

    We also have a Virtual Private Server with them, where we have full control. What I'm trying to decide now is if using this method (subdomains + domain mapping) is "better enough" to where I want to move everything instead of using the directory method I was using.

About this Topic