WordPress.org

Ready to get started?Download WordPress

Forums

how to: swap databases/tables/etc between sites within a network? (11 posts)

  1. vvvvv
    Member
    Posted 4 years ago #

    hey guys,

    anyone mind helping me out and educating me a bit with this matter?
    i'd like to know how to swap databases(if in fact each site in a network has it's own database) or swap all the database info that contains a blog's posts, tags, etc from one site to another inside a multisite network.

    i.e:

    [a] site.com/s/ (main installation of wordpress network, in a subdirectory)
    [b] site.com/s/blog1 (a site within the network)
    [c] site.com/s/blog2 (another site within the network)

    1) how do you move/transfer all the blog entries and other database tables from [a] to [b], or from [b] to [c] (second bit is hypothetical, once [b] is populated with posts, as for now it's empty)

    2) do all sites inside a network share the same database? i'm pretty sure they do because my wp-config.php file's table prefix only defines "wp_"

    3) if they do share the same database, is it possible to split it so each site has their own database?

    thanks in advance!
    ~a

  2. Can I ask what you're ultimately trying to do? :)

    You can scale the databases, but they do not split one blog in each. the network feature is designed to run hundreds, thousands, millions of blogs. Can you image a db for each one?

    One db can house quite a number of blogs before it gets unwieldy.

    Are you just trying to push posts from one blog to another, or other data?

  3. vvvvv
    Member
    Posted 4 years ago #

    hey andrea,

    thanks for the reply. i'm just trying to learn what i can and can't do actually more than anything. i have my network installed on a subdirectory right now. because i don't want to clutter my root.

    sorry i don't understand the term, scaling a database. i'll google it up. i'm using multisite so i can separate a blog from a portfolio, that from a one-a-day blog, that from a bbpress forum etc.

    i'm not aiming to have a million blogs or anything more than 4 or 5 at max actually unless my trigger finger for posting gets out of hand.

    maybe it's just OCD, (or using multisite for the intended purpose listed up top is OCD as well), but i thought having them in separate databases made it easier for organization and access to the tables when necessary easier as well.

    do all th blogs in a network fall under the same table prefixes? think mine is set to default "wp_" if they do, how do you discern between them?

    sorry for the blob of questions. thanks for your reply!

  4. All blogs have the same db prefix, but the *also* have a numerical ID attached to them. So the posts for the main blog will be in wp_posts, but the posts for the second blogs will be in wp_2_posts.

    really, if you only have 4-5 blogs, using separate dbs will be more trouble than it's worth. One db can hold that just fine. the numbering system makes it easy to access tables as needed.

  5. vvvvv
    Member
    Posted 4 years ago #

    hey andrea,

    then how would you recommend going about sharing or swapping the tables between blogs? maybe sometimes theres a stack of blog posts that i think belongs in blog A but is for now in blog B? i know you an use the import export function from the wordpress dashboard but i'm not sure how one would use that feature to import/export specific parts of a blog.

  6. i know you an use the import export function from the wordpress dashboard but i'm not sure how one would use that feature to import/export specific parts of a blog.

    If you look at the Import/export now, the "advanced export" plugin was rolled in to core.

    Now you CAN, by default, export posts meeting a certain criteria. By author, date, category, and more! (act now, no operators are standing by ;P )

  7. malmilligan
    Member
    Posted 4 years ago #

    I have basically the same question with a real world example. I have a WordPress site with some categories and posts and pages already setup. The client I am building it for wants to see some different color options. So I turned it into a multisite and I'd like the same set of categories and posts and pages from
    [a] site.com/s/ (main installation of wordpress network)
    but also on
    [b] site.com/s/blog1 (a site within the network)
    and
    [c] site.com/s/blog2 (another site within the network)
    That way, I can just modify the style sheet for [b] and [c] so I can see the same exact WordPress site but with different color options...
    If anyone knows of a way to accomplish this using multisite I would be grateful for the info... Thanks !! Mal

  8. If it's just the same content, then the quickest way is to just export & import.

  9. malmilligan
    Member
    Posted 3 years ago #

    Thanks Andrea. I've done hundreds of exports and imports from phpMyAdmin but I never did exports and imports from the dashboard with any success until you mentioned it. I'm now able to export from a stand alone wordpress into a multisite child using the Dashboard / Tools. Regards -

  10. Gerard_Wassink
    Member
    Posted 3 years ago #

    I've been looking for this as well, and in my child site, when I select the Import option, it tells me that there are no import options available. am I missing something?

  11. Gerard_Wassink
    Member
    Posted 3 years ago #

    Donwloaded the import plugin. works now... ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic