Wordpress quiestion! MASS install? Heeeeeeeeeeeeelp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Antonio
    Too lazy to set a custom title
    • Oct 2001
    • 14136

    #1

    Wordpress quiestion! MASS install? Heeeeeeeeeeeeelp

    here's the story - I have 30 domains on the SAME host, can I install wordpress on all of them but use only ONE database?

    What happens right now is I have to add database request for each one of them, then wait for the host to add the databases, then upload to each domain and so on..


    I'm 99% sure that this can be done like blog one has tables with prefix 1 eg 1wp_posts, 1wp_comments, then blog 2 has a prefix 2 etc

    Anyone done it?

    thanks
  • HomerSimpson
    Too lazy to set a custom title
    • Sep 2005
    • 13826

    #2
    you can use only one database

    in wp-config.php there's a setting for table prefix
    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    all you need to do is change it
    and there you go...
    Make a bank with Chaturbate - the best selling webcam program
    Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

    PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

    Comment

    • newbreed
      Confirmed User
      • Nov 2003
      • 9898

      #3
      The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

      Also, you'll need to maintain one Admin section.

      Content on each blog would obviously be the same as well.

      Loryn ‎(3:16 PM):
      I love it, just as long as we keep the bedroom door closed from all ears then we can have throw down hard core sex that makes us money haha
      fuck it we can have sex on money never did that before

      Comment

      • Bro Media - BANNED FOR LIFE
        MOBILE PORN: IMOBILEPORN
        • Jan 2004
        • 16502

        #4
        Originally posted by newbreed
        The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

        Also, you'll need to maintain one Admin section.

        Content on each blog would obviously be the same as well.
        Fail.

        Originally posted by HomerSimpson
        you can use only one database

        in wp-config.php there's a setting for table prefix
        $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

        all you need to do is change it
        and there you go...

        Comment

        • Antonio
          Too lazy to set a custom title
          • Oct 2001
          • 14136

          #5
          Originally posted by HomerSimpson
          you can use only one database

          in wp-config.php there's a setting for table prefix
          $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

          all you need to do is change it
          and there you go...

          Thanks!

          Comment

          • fris
            Too lazy to set a custom title
            • Aug 2002
            • 55705

            #6
            http://www.optiniche.com/blog/392/mu...ngle-database/

            http://sitening.com/blog/how-to-easi...one-code-base/
            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

            Comment

            • candyflip
              Carpe Visio
              • Jul 2002
              • 43069

              #7
              Originally posted by newbreed
              The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

              Also, you'll need to maintain one Admin section.

              Content on each blog would obviously be the same as well.
              Sorry man, but you're totally off on this one.

              Spend you some brain.
              Email Me

              Comment

              • Antonio
                Too lazy to set a custom title
                • Oct 2001
                • 14136

                #8

                thanks the second link looks like exactly what I need but that code looks a bit weird to me (don't know php)

                Code:
                // You can have multiple installations in one database if you give each a unique prefix
                $domain_list = array();
                
                // auto database name
                $domain_list["yourdomain.com"] = ??;
                
                $domain_name = preg_replace(?/^www\./?, ??, $_SERVER["SERVER_NAME"]);
                
                if (array_key_exists($domain_name, $domain_list))
                {
                $table_prefix = $domain_list[$domain_name];
                if (!$table_prefix) { $table_prefix = ?wp_? . md5($domain_name); }
                }
                else
                {
                print ?Unknown error?; exit;
                }
                do I add every domain HERE:
                $domain_list = array();

                like

                $domain_list = array(mydomain.com, mydomain2.com, mydomain3.com);

                ??


                or just use the code as it is

                thanks

                Comment

                • Bro Media - BANNED FOR LIFE
                  MOBILE PORN: IMOBILEPORN
                  • Jan 2004
                  • 16502

                  #9
                  Originally posted by Antonio
                  thanks the second link looks like exactly what I need but that code looks a bit weird to me (don't know php)

                  Code:
                  // You can have multiple installations in one database if you give each a unique prefix
                  $domain_list = array();
                  
                  // auto database name
                  $domain_list["yourdomain.com"] = ??;
                  
                  $domain_name = preg_replace(?/^www\./?, ??, $_SERVER["SERVER_NAME"]);
                  
                  if (array_key_exists($domain_name, $domain_list))
                  {
                  $table_prefix = $domain_list[$domain_name];
                  if (!$table_prefix) { $table_prefix = ?wp_? . md5($domain_name); }
                  }
                  else
                  {
                  print ?Unknown error?; exit;
                  }
                  do I add every domain HERE:
                  $domain_list = array();

                  like

                  $domain_list = array(mydomain.com, mydomain2.com, mydomain3.com);

                  ??


                  or just use the code as it is

                  thanks
                  yeah

                  $domain_list = array('domain.com', 'domain2.com', 'domain3.com');

                  Comment

                  • teg0
                    Confirmed User
                    • Jan 2006
                    • 4204

                    #10
                    if you use a lot of plugins you could run into some bugs, but someone already pointed that out. If they are pretty basic installs you'll be find as long as you change the prefix.

                    Comment

                    • tranza
                      ICQ: 197-556-237
                      • Jun 2003
                      • 57559

                      #11
                      Hope you can fixed your problem
                      I'm just a newbie.

                      Comment

                      • Z
                        Vidi Vici Veni
                        • Nov 2002
                        • 6308

                        #12
                        Wordpress MU...learn it, love it.

                        Comment

                        Working...