Support » Plugins » Multiple blogs in a server

  • Hello,
    I’m studying the possibility of implementing b2 (WordPress or b2evolution) for multiple final users in a single server and a single database.
    I’m the administrator of a forum with thousands of users and I want to give them the possibility of having a blog. I may have 10 or 20 very active people and 50 or 100 people who will sign up to try it but won’t really use it (Pareto’s rule).
    The users won’t have any access to the server other than the blog’s web interface (no phpMyAdmin, no config / application file uploads etc).
    I have 3 days of flying experience with b2, so bear with me. I’m asking for opinions here about the following discussion.
    I have discarded the option of having a ID that identifies the blog (“$BID”) passed as another parameter in just one b2 file tree, as I’ll always have a few guys who will want to change the CSS etc and I’d upload their changes manually in a case by case fashion. So I wan to reproduce the whole tree structure in a new directory that represents each user ( /blogs –> /blogs/usernick ). By the way, to have PHP create the files is a permission nightmare, but that’s another story (I’m already scared of the chmod 777 to upload pictures).
    Then in each function that uses a SQL query, I’d add $BID in the list of globals, and then I’d insert in the WHERE clauses: WHERE BID = $BID AND …(original WHERE condition). This gives flexibility; the $BID can be assigned from a passed parameter or it can be taken from the current path using __FILE__. This second option is the tricky part I’m not so sure about (not how to implement it, but its soundness and security issues).
    In the database I’m adding a field BID to each table, so that I only need 1 database and the same tables. The other option (that doesn’t scale so well) is having a set of tables with different names per blog, that may good for a few blogs.
    The rest:
    I’d need to create a sign-up form, rewrite the installation script and add some maintenance code to delete inactive blogs.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Actually what I’m thinking now is to reproduce in the file tree just the files that will change (config, style) and add the other files which will have just an “include” to the real files, which will be in a “common” directory, so the application files don’t really need to be duplicated for each blog.

    Hi, I’m not really sure that you are using the easiest route for what you are trying to accomplish. Since the bloggers will only be using the interface, why not just upload it to directories and let them blog?
    I had a central system when I ran a free blogging service. I would create a directory under the main domain and put a copy of b2 in there. The table was prefixed by the name of the person it belonged to. It was easy to delete someone that wasn’t using their blog. The .CSS and index.php was CHMODed to 766 and some wanted to mess with the commentspopup.php as well. It was easy. I just created an images folder and CHMODed that and they were on their own.
    I don’t run the service any longer as I was taken advantage of and wouldn’t do it again. Just be warned that people will not appreciate it all the time. There will be some that will, but there will be some that will take advantage of the situation. Take it from someone that’s been there and done that, put out rules or whatnot, but don’t be surprised when it’s abused.
    Good luck!

    > why not just upload it to directories and let them blog?
    Yes, that’s the easiest way, but that would mean adding 1 MB of files per user, and if I just add the same file names but containing only a php include, it’s not difficult and saves all that space. Besides, upgrading would be much easier as I only need to upgrade the real or “common” files instead of every user’s directory, that I can leave untouched from now on.
    > The table was prefixed by the name of the person it belonged to
    That’s the approach taken in the latest WP beta, it’s already built in in the conf file (thank you guys!). As I said, that’s fine and maybe I’ll go that way, but for say, 100 users is better to have 100 more records in our 10 or so tables that 100 * 10 more tables. I think that the payoff for just adding an ID column is great.
    > I was taken advantage of and wouldn’t do it again. Just be warned that people will not appreciate it all the time
    I hear ya. I’ve been there too (I AM there). I started around ’96. I had a PC support web site for a couple of years, kind of second tier web (featured or mentioned in a few magazines). I spent my time solving people’s problems and I only got a few thanks. So I killed that site.
    Now I run the technical part of the message board system I created (guess: PHP+MySQL), it’s mostly hands-free, as I don’t even read most of the messages. They insult each other and such, I don’t care, it’s not worth my time.
    I just bakup the database from time to time and improve it here and there.
    Tell me about nasty people! I had a mentally perturbed person making death threats posting phone numbers and stuff (there I had to delete the messages).
    My forum population is like the one in Internet, 90% of people write something from time to time, think that everything (my time, web server) is free and don’t make trouble or say thanks. 5% are very active and that’s the people I have in mind, since they write articles and stuff. 5% of the rest are the jerk crowd.
    So, back to my “requirements”, I want to spend maybe a few hours implementing the system, and then it should be automatic with little maintenance; if I have to spend more that a few minutes a week deleting blogs and stuff, it will be > /dev/null

    I’m working on putting multiple-blogs support into WP. Because it’s a major change I’ll probably post mods on my own blog at but the changes will go back into CVS once we’ve discussed them on the dev list.

    What’s the deal? b2++ has smarty and supports multiple blogs. Now, donncha, you’re here. So, what’s going on? Does this mean that b2++ is dead?

    I’m not surprised that I’m the only forum admin thinking of doing this. Talk about powerful buy-in for your community.
    The reason to have multiple blogs is that you can then have a most-recently-updated page that takes incoming XML-RPC pings.
    Lazyant seems to be onto something in wanting to have one centralized locus for files; that way as you upgrade WP, you only upgrade one set of PHP files and one database.
    I’m willing to help. 🙂

    blah!! all so confusing lol… i just bought my domain a few days ago and have one hostee right… i uploaded and set up b2 for myself but the dam thing wont let my hostee log in… i was wondering if she just registers will that mean it’s a joint blog?? and if it is the case how in the world do i give her, her own little index.php to work with for her hosted site??? please any help from the other admins!! please!! and talk dumb to me lol im still learning!!!!!

    i just posted above this one if you could email me to that would be greatly appreciated… i no doubt will forget to check this :s gosh im dumb!! sorry 1am very tired 🙁

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Multiple blogs in a server’ is closed to new replies.