Sharing WP MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baddog
    So Fucking Banned
    • Apr 2001
    • 107089

    #1

    Sharing WP MySQL

    Pretty sure I read here that you can have multiple WP blogs on one MySQL database.

    Can someone confirm this for me?
  • RawAlex
    So Fucking Banned
    • Oct 2003
    • 9465

    #2
    I wrote a little routine that I use to pull the newest post from the WP database and use it to show on another site. Yes, in theory, you can access the data and use it in more than one place.

    However, because WP puts all the site information and such into the DB, it is hard to get around stuff. You would have to make a nice custom hack to use one database for the site information (which includes all the links, categories, the base URL, etc) and another to get the posts.

    That would probably get ugly.

    Comment

    • viki
      Confirmed User
      • Jan 2005
      • 2640

      #3
      You can setup blogs or other scripts on the same DB as long as you put a different table prefix on during the install.

      viki [at] realsexcash [dot] com
      228 263 454

      Comment

      • jacked
        sperm tail
        • May 2004
        • 11019

        #4
        Originally posted by viki
        You can setup blogs or other scripts on the same DB as long as you put a different table prefix on during the install.
        first time i noticed it in the wp-config the other day

        Code:
        // You can have multiple installations in one database if you give each a unique prefix
        $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
        
        // Change this to localize WordPress.  A corresponding MO file for the
        // chosen language must be installed to wp-content/languages.
        // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
        // to enable German language support.
        define ('WPLANG', '');
        
        /* That's all, stop editing! Happy blogging. */
        this is under the MySQL settings in the config just change the prefix to wp_1 instead of wp_ , and you should be good to go.
        Got Cam Models?
        icq: 361-607-616

        Comment

        • baddog
          So Fucking Banned
          • Apr 2001
          • 107089

          #5
          thank you, every one

          Comment

          • Subway
            Confirmed User
            • Apr 2004
            • 584

            #6
            It is possible but is it wise ?

            I rather have 100 small mysql databases than 1 large database.

            Much better if you want to restore

            Comment

            • ClickBuster
              Confirmed User
              • May 2004
              • 210

              #7
              Originally posted by jacked
              first time i noticed it in the wp-config the other day

              Code:
              // You can have multiple installations in one database if you give each a unique prefix
              $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
              
              // Change this to localize WordPress.  A corresponding MO file for the
              // chosen language must be installed to wp-content/languages.
              // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
              // to enable German language support.
              define ('WPLANG', '');
              
              /* That's all, stop editing! Happy blogging. */
              this is under the MySQL settings in the config just change the prefix to wp_1 instead of wp_ , and you should be good to go.
              Yeah, DON'T DO THAT! That will only change the configuration, but not the actual table names. Table prefix is configure BEFORE the tables are created But yeah, you can put 100s of them in 1 single db and watch it crash
              -- ClickBuster
              -- ICQ# 263653704
              -- Email: clickbuster1 [-at-] gmail [-dot-] com

              Comment

              • GreyWolf
                So Fucking Banned
                • Jun 2007
                • 2036

                #8
                Originally posted by Subway
                It is possible but is it wise ?

                I rather have 100 small mysql databases than 1 large database.

                Much better if you want to restore
                Wot he said ^^^

                Keep it simple and spread the risk.

                Comment

                • baddog
                  So Fucking Banned
                  • Apr 2001
                  • 107089

                  #9
                  Originally posted by Subway
                  It is possible but is it wise ?

                  I rather have 100 small mysql databases than 1 large database.

                  Much better if you want to restore
                  well, the person asking only had 3 blogs, but point taken

                  Comment

                  Working...