Virtual Multiblog for WordPress

<?php echo "Hello Again, World!"; ?>

Note: If upgrading to VMB 2.5 from a previous version, please read the upgrade instructions.

Greetings and salutations.

This is my second blog, which is here to serve as a repository for the really die-hard geekery that I feel just doesn’t belong in my regular blog. When I realized the need for a second blog, installing it ended up being a longer process than i anticipated, and I thought I would share the fruits of my experience.

Let me step back for a moment. I am a true hacker at heart, in the traditional sense: I love to pull things apart and take a look. To see how they work and how they might work better. I’m also an avid Mac-head, and since the rise of OS X, I’ve been learning the ins and outs of its Unix-like underbelly.

In a nutshell, my computer is highly customized.

A few years back I got a second computer — a laptop — and quickly discovered that while keeping one computer tweaked to prime operation just the way I like it is kind of fun, trying to keep two computers in such a state, and relatively synchronized, is a frustrating exercise in futility.

I also know a good bit of web coding. As I’ve been working with WordPress for a couple years now, I’ve come across a number of good plugins and expansions along the way. Beyond issues involved with installing them, (which is admittedly pretty easy, usually) over time I have to keep up with updates to these — not to mention updates to WordPress itself. From time to time I even delve into the plugin files myself and make improvements….

And I want to put in a second blog? Am I nuts??? Thinking of what a pain it would be to maintain two copies of WordPress, I started looking into the various multi-blog solutions people have come up with. Most of them involve a lot of weird modifications to several files and basically comprise major modifications to large swaths of the WordPress code that are fundamentally incompatible with the regular version.

I am a great fan of what I consider “elegant” coding, which means that the designer does his job with the simplest and most straightforward methodology possible. And I found a very elegant solution to the “multiple blog on one install” question. Allan Mertner came up with something that blew me away with its simplicity and power.

WordPress holds all of its data in a MySQL database, and there is a single file called wp-config.php that holds the database login information. Allan looked at this and realized that if you can change that one file, you can completely replace the blog. With this key realization he came up with a cunningly straightforward multi-blog system:

  1. Replace the standard wp-config.php file with a new version that calls a different configuration set depending on what directory it’s in.
  2. Set up symbolic links that serve as “virtual directories” that all point to the WordPress directory.

Using the example of this site, I have an install of WordPress in the root web directory, and a symbolic link called “nerdaphernalia” (that’s right, you’re soaking in it!) that points back to the root. The modified wp-config file points to either the default or nerdaphernalia config file, depending on which of those two directories it thinks it’s in.

So other than a happy user, where do I come in in all this? Well, I made a number of improvements. First, Allan’s system was great, but it required us to install various files in and around the core WordPress files, which for me at least defeats part of the purpose of using a multiblog system in the first place. I’m trying to make updates easier, remember? Updating WordPress generally involves deleting everything but the wp-config.php file and the wp-content folder, and then dropping in the new versions of everything else; but if there are important but non-standard files strewn about, I can’t just do that. I have to remember to go through and preserve those files, and then replace them when they’re done. Add in a few plugins that work the same way, and we have a real hassle.

So first off, I tucked all the files, except for the one modified wp-config.php, into a folder in a safe place. Next, I greatly streamlined the install process. At a minimum, the user only need edit a single configuration file, autoconfig.php. If desired, the various blogs can each have individual config files, but it’s no longer necessary.

I’ve added user-accessible functions (and the really handy VUSER constant) that can be used in themes and plugins. I’ve added the ability to customize the location of the configuration files, so the security-conscious can move them entirely out of the Web directories if they wish. Overall, we are left with a easy but powerful system for running virtually any number of blogs off a single install of WordPress.

Install instructions are included with the download. Still have questions? Check out the readme and the FAQ. (Note: Sometimes the readme will list a higher version than the download. That happens if I have a development version installed.)

User “JZ” is selling written instructions for installing the system. (Please Note: I have not even seen his instructions, I’m just letting you all know.) More info in this comment.

…And if the directions are worth money to you, perhaps the actual software is worth something as well?

Download

Here’s what you’re really looking for: the download link. Have at it!

Virtual Multiblog v2.6.2

History/ Acknowledgements

For a detailed history, please see the readme file in the download.

Many of the improvements to version 2 were based upon or inspired by commenters to my blog. To them, and to everyone who has sent comments, I am grateful.

Good luck. Have fun.

684 Comments

  1. #1 | Posted November 23, 2007 at 1:08 am

    I have WP on a test server running Debian. I read your instructions on the multiblog. Created the symlink. However I get a 403 forbidden everytime. I have wp installed in the root directory. However I am not sure how to fix this issue. I have pointed the symlink to various places according to the comments of other users and directions. With no change. It is currently pointed at the root directory(where the wordpress files are located).

  2. #2 | Posted November 23, 2007 at 10:08 pm

    The symlnk should be pointed to the directory in which you installed WordPress.

    Do you only get the error when you go to the symlink, or do you get it on the “real” WordPress directory as well?

  3. #3 | Posted November 23, 2007 at 11:57 pm

    I was only getting errors when I went to the symlink. I did however fix the problem. It was something silly. The mb-config files had .php twice on the file names and apache freaked out about it. I guess next time I will work on stuff when I am a little less tired. It is working great right now. I am really impressed with it. Thanks for the speedy reply and apologize if I wasted your time.

  4. #4 | Posted November 24, 2007 at 12:39 am

    Stephen, I got to step 5 in your Easy Setup instructions, but am stuck there. I have wordpress in /etc/wordpress, so I’ve moved the wp-config.php file there. I have my other wordpress files in /usr/share/wordpress. I currently have one blog, but want to set up a second. My first blog has the url dennistein.com/blog and I want my second one to have the url erivellino.org/blog Using Linux, I just use the ln -s command to make a symlink which I can point to /etc/wordpress. What folder to I put this symlink in?

    Step 6 says to go to each site, blogs through Five Minute Install. I thought the Virtual Multiblog idea was so that you don’t have multiple installs of WordPress on the same computer. I’m new at this… I’m hosting this on my own computer.

    Thanks for your help.

  5. #5 | Posted November 24, 2007 at 3:23 am

    [...] Nerdaphernalia » Virtual Multiblog for WordPress ???? ?????? ??? ???? ???? ?????? ????? ??? ????? ???. ?????? ?????? ??? ????? ???? ????? ??? ??? ?? ???? ?????? ???? ?????? ?????. (tags: wordpress multi-blogs hacks) [...]

  6. #6 | Posted November 24, 2007 at 12:08 pm

    Did not tried it yet, but just for the idea i nrrd to WOW !!

    I’ll try it this weekend hope all go well

  7. #7 | Posted November 27, 2007 at 5:35 am

    [...] you run more than one WordPress site? Virtual multiblog may be useful to you. It’s a very different beast to WordPress MU, but I’m going to [...]

  8. #8 | Posted December 6, 2007 at 2:12 pm

    Stephen, thanks for the great work.

    I set up multiblog as you outlined in the advanced setup instructions. As a test, I set up a symlink to the wordpress folder in http://www.mysite.com/dog and included only that one user in mb-users.php. I went to the http://www.mysite.com/dog and it launched me into the WordPress install, which worked perfectly.

    Then I created a second symlink: http://www.mysite.com/cat and edited mb-users.php to add that user. When I went to http://www.mysite.com/cat, I saw the page for http://www.mysite.com/dog. When I tried http://www.mysite.com/cat/wp-admin/install.php, I got the "Wordpress is already installed" message.

    Can you tell me where I’ve gone wrong?

    Thanks!

  9. #9 | Posted December 6, 2007 at 3:35 pm

    Dan –

    What exactly do you have in the vusers[] array? Where are the WordPress files installed? Where exactly do the two symlinks point?

  10. #10 | Posted December 6, 2007 at 3:55 pm

    Stephen–

    Thanks for the response.

    The document root for my website is /nfs/users/ayso/public_html

    I installed WordPress outside the document root in /nfs/users/ayso/wordpress

    In the file /nfs/users/ayso/wordpress/wp-content/multiblog/config/mb-users.php:

    $vusers[] = ‘www.mysite.com/dog’;
    $vusers[] = ‘www.mysite.com/cat’;

    My symlinks point to /nfs/users/ayso/wordpress:

    ln -s /nfs/users/ayso/wordpress /nfs/users/ayso/public_html/dog
    ln -s /nfs/users/ayso/wordpress /nfs/users/ayso/public_html/cat

    When I configured the first blog, database tables were created which were prefixed by "wp_mysite_com_dog_".

    –Dan

  11. #11 | Posted December 10, 2007 at 1:09 am

    Dan — Honestly, I’ve never even tested it with an “install in one place, site in another” setup . You’re the first person to ask about it!

    That VUSER and table prefix is correct for the “dog” URL. Off the top of my head I don’t know why the “cat” one would not work, but I’m not surprised, either….

    I’ll have to look into it. I’ve never done a setup like that, but it’s worth my looking at, I think.

  12. #12 | Posted December 10, 2007 at 6:00 pm

    Stephen–

    Ok, I did a fresh install and got some things working.

    I installed wordpress outside the document root as I described before, and created symlinks to it called dog and cat in the document root. Now http://www.mysite.com/dog and http://www.mysite.com/cat each show separate blogs. That is, everything works as advertised.

    For that, I say thank you and great job. That will make my job as webmaster easier.

    What does not work is if I try to add a blog at http://www.mysite.com/lizard/gecko.

    It appears that all the blogs have to be at the document root level. I see in mb_get_virtual_user() you use

    $mbroot = substr( $mbroot, 0, strpos( $mbroot, ‘/’ )

    to truncate everything after the first slash. So a blog in a subdirectory below the document root will not work. I’ve tried changing that as follows:

    if ( strpos( $mbroot, ‘/’ ) ) $test_mbroot = substr( $mbroot, 0, strpos( $mbroot, ‘/’ ) );
    if ( $test_mbroot == ‘wp-admin’ || $test_mbroot == ‘wp-content’ || $test_mbroot == ‘wp-includes’ ) $mbroot = ”;

    That allows mb_get_virtual_user() to return a user like mysite_com_lizard_gecko. But that is not the whole answer, and I’m trying to trace out the other changes that are needed.

    Am I going down a bad path trying to edit your code to work with blogs at different levels in the website? Is there a fundamental reason that blogs need to be on the document root level?

    Thanks for your help!

    –Dan

  13. #13 | Posted December 10, 2007 at 9:16 pm

    There’s nothing inherently _wrong_ with it, but it is dangerous….

    A setup allowing for lower nested blogs allows for some really screwy setups. If you put a directory “lizard” at the root, and then put a “gecko” symlink back to the root directory, you would also have /lizard/gecko/lizard/ (err… I think…). You might not even realize it, but if somebody else _did_ they could come along and literally set up another blog on _your_ site.

    I left out that ability because of the potential for mischief and error. So… go for it, but be careful you know _all_ the blogs you are creating….

  14. #14 | Posted December 10, 2007 at 9:28 pm

    Stephen Hi – this seems like an extraordinary tool.

    I’ve tried a few times to get it up and running, but each time I do, something very strange happens. The wp-login.php works just fine on both blogs, but for some reason the homepage for each is blank. I’m trying to install this for a school site that needs a second blog for displaying Spanish language content, so the setup i hope to build is as follows:

    A. One instance of wordpress, installed in the root at http://www.mitatlawrence.net.
    B. The base website, the English version, would just be http://www.mitatlawrence.net (this instance is already installed and has received some use).
    C. The Spanish version would be http://www.mitatlawrence.net/espanol .

    I believe i’ve successfully created the appropriate symlink. the site is hosted on godaddy, so i had to run a php command in browser, using the following:

    symlink (‘.’, ‘espanol’) ;

    It created a shortcut link in the root directory, so I’m assuming it worked.

    Then i followed the instructions for setting up the users, adding these:
    $vusers[] = ‘www.mitatlawrence.net’;
    $vusers[] = ‘www.mitatlawrence.net/espanol’;

    and finally dropped the new wp-config.php file in the root, with db info loaded.

    the result is that i visit each blog for the first time, and it runs through the set up. Then I’m taken to the dashboard, which works great. But for some reason, any time i try to go to the site itself after that, the pages turn up completely blank. Have tried a few different approaches, but each results in the same problem.

    Thank you very much for the plugin, I’m confident it will work. Any advice you may have is greatly appreciated.

    jase

  15. #15 | Posted December 10, 2007 at 9:29 pm

    Dan — Actually, I’m forgetting the full ramifications of why this can be problemeatic. (I saw things as I went, but didn’t keep track — I just didn’t pursue subdirectory blogs).

    I think you’ll be okay if you use the full directory $vusers[] (e.g. “www.mysite.com/dog” instead of “dog”). It gets very dicey with people who don’t use the mb-users file (that is “easy setup” could cause problems) or who don’t specify the whole domain/directory structure.

    I suppose i could go back in and add subdirectory ability _only_ if $vusers[] is used AND domain/directory is specified. I might just do this. Let me know if you figure it out, because I don’t think it’s terribly difficult, and you might already be on top of it. ;)

  16. #16 | Posted December 11, 2007 at 4:46 pm

    Jase — fix your markup and see if that fixes your problem. Invalid (X)HTML is a huge source of rendering mischief.

    W3C Validator report for your site

  17. jase
    #17 | Posted December 11, 2007 at 5:20 pm

    Strider thank you – i will look in to the markup. I checked validation of your site – striderweb.com, and the base site passes with flying colors. However, I checked out this particular page, and it has 11 errors -
    http://validator.w3.org/check?uri=http%3A%2F%2Fstriderw...

    Yet it seems that you have great success with the multiblog tool. Would there be any other reasons besides invalid xhtml that I’m getting blank pages from the multiblog tool? Perhaps I’m doing something wrong on the inputs or something.

    Thank you for the quick response and for the multiblog tool. I’m confident that i’ll get it to work for mit at lawrence and it will save the day.

    jase

  18. #18 | Posted December 11, 2007 at 6:28 pm

    Jase — thanks for pointing out a flaw in my markup.

    In answer to your question — there are millions (literally) of potential causes. Validating your HTML will reduce them by an order of magnitude.

    Incidentally, the validation of my own page is a completely moot point, as I am not having any rendering problems of which I know. The fact that you successfully ran the install for both blogs strongly suggests that the multi-blog system is working just fine, and that your problem lies elsewhere. Invalid markup is the most obvious candidate.

  19. jase
    #19 | Posted December 11, 2007 at 6:40 pm

    thanks for the quick response. Will try my best to clean up the code, though i am not a proficient coder like you so fixing all the errors may take awhile. Alternatively, it seems like the tool you developed works wonderfully with fresh installs of wordpress, so perhaps it would be the path of least resistance if i just start afresh with a new install. will give that a shot and report back.

    also regarding the validation of this page – everything here shows up wonderfully and the site is functional and aesthetic. as far as a lay user like me is concerned there are no flaws here.

    Thanks Stephen,

    jase

  20. #20 | Posted December 13, 2007 at 6:18 pm

    Stephen–

    When I said I got multiblog working as advertised, I was mistaken. I was actually back to the first problem that I had posted on December 6. Regardless of which blog I viewed, the first user in the vusers array was selected.

    I traced the problem down and had to make a modification to correct what I believe is an error in the code in order to get it working on a site with a url beginning with www.

    In mb_get_virtual_user you get the server name like so:

    $server = $_SERVER['HTTP_HOST'];
    $shortserver = str_replace(‘www.’, ”, $server );

    Then you get the current user to test against the vuser list like so:

    foreach($vusers as $curruser) {
    $curruser = str_replace(‘www.’, ”, $curruser );
    etc.

    Finally you test like so:

    $server . \’/\’ . $mbroot == $curruser’

    Since you’ve eliminated the www from the user names in the vuser array, I think you should use the $shortserver in your test (as you do in the remainder of the tests in the list).

    When I made that change, the program worked great. It is now up and running on http://www.ayso104.org/coachblog and http://www.ayso104.org/homeblog.

    (It worked fine on my laptop before the change, because the host name was "localhost", but on the ISP’s site, the host name begins with www.)

    So, what do you think? Was changing $server to $shortserver in that function the right thing to do, or does that create other problems that I don’t understand?

    –Dan

    P.S. (I’ve made a change for subdirectory blogs, as we discussed, but I’ve not tested it well enough to put into production yet.)

  21. #21 | Posted December 13, 2007 at 6:35 pm

    Stephen–

    One more thing…if I go into WordPress’s Permalink Options and try to change them, WordPress generates a set of mod_rewrite rules for my .htaccess files. These mod_rewirte rules will try to change a link in one form to the native form.

    The problem is that since all of the blogs on my site are symlinked to the same wordpress directory, they all share a common .htaccess file, which means they all share the same mod_rewrite rules.

    For example, if you change the Permalinks for http://www.mysite.com/dog the .htaccess file says:

    RewriteBase /dog/

    Then if you look at the .htaccess file for http://www.mysite.com/cat … what do you know RewriteBase /dog/ Clearly that won’t work.

    I don’t really know if this is a problem for subdomain blogs like dog.mysite.com and cat.mysite.com.

    I know mod_rewrite is vastly complicated, so there might be a way to craft a .htaccess file that works in this configuration, but I don’t know. For now, I’ll stick with the plain vanilla Permalinks; but if you know a way around the problem, I’d love to hear about it.

    Thanks!

    –Dan

  22. #22 | Posted December 15, 2007 at 4:47 pm

    New version 2.1 is up.

    Dan will like this — it now allows for virtual blogs in subdirectories. A few more under-the-hood changes as well.

    Also to Dan Meigs — Read the readme file regarding your .htaccess problem

  23. Dan Meigs
    #23 | Posted December 16, 2007 at 11:30 am

    Stephen–

    You’re right – I really like it!

    I upgraded to the new version, moved my blogs to subdirectories, and everything works great.

    (www.ayso104.org/home/blog and http://www.ayso104.org/coach/blog)

    Regarding the .htaccess thing – oops…I missed that in the readme.

    Thanks!

    –Dan

  24. #24 | Posted December 16, 2007 at 7:14 pm

    Version 2.1.1 is up. Quick security update — the plugin in 2.1 had a bug that anybody accessing the admin section could see the Multiblog tab. Now you must be an administrator to see it. No other changes.

  25. Kjell
    #25 | Posted December 24, 2007 at 10:54 am

    Swell expansion – makes for much ease of use. A couple of inputs

    1. Symlinks.

    You should know what you do – but if you have ssh access: Unix command to make symlink:

    ln -s [folder where you have your main wordpress] [name of new folder]

    Ie – if you are in your web folder called /home/user/www, have your wordpress installed in /home/user/wordpress and want your new installation in /home/user/www/morris then move to the www folder and type:

    ln -s ../wordpress morris

    2. Symlinks and installation if you want other things under your wordpress folder

    Orson Welles (as Citizen Kane) clapping his hands

    In some cases you’ll want individualised settings in your folder, eg a customised .htaccess file or robots.txt file in the morris folder above – or maybe some other pages or systems installed under the wordpress folder. The multiblog works fine also if you make the symlinks to the individual files. Can be done as follows (expanding on the example :

    First create the morris folder (create the symlink above if you made it) and move into it then give the command:

    ln -s ../../wordpress/* .

    This will create symlinks to the individual files and folders of the wordpress installation.

    My reason for doing this was wanting canonized URLs and a Gallery installation and file storage under some of my wordpresses.

    3. Defaults
    Stephen, not a big thing, but if you’re able to make it so that the individual config files use default values if a value is empty that would be cool. Eg. when I want to specify a different language for one blog, I still want it to keep the same database settings.

  26. #26 | Posted December 24, 2007 at 11:14 am

    “[M]ake it so that the individual config files use default values if a value is empty that would be cool. Eg. when I want to specify a different language for one blog, I still want it to keep the same database settings.”

    I’ve done this to some extent already, but yes, it could use some further functionality.

    This will probably see progress in a future version.

  27. kjell
    #27 | Posted December 29, 2007 at 9:48 am

    What do people do about file uploads? I’d like to have separate uploads per site… but I cannot get it to save those files any other place than under the installation folder.

  28. #28 | Posted December 31, 2007 at 12:51 pm

    kjell –

    You might have some luck with this comment from this system’s original page:

    http://striderweb.com/nerdaphernalia/2006/10/hello-agai...

  29. #29 | Posted January 2, 2008 at 2:52 pm

    Thanks Stephen – that’s a good solve. I went a bit more manual and set to use a different subfolder inside each and every blog. Seemed logical since I’ve already setup separate rewrites for almost each blog – as I wanted to do canonical hostnames.

    That brings me onto another one, since you seem to be quite experienced with rewrites – would I be able to do a joint .htaccess file for the canonical rewrite?

    Say if I want all the subdomain and root domain blogs to rewrite from with www to without www?

    Here’s what I use now:

    RewriteCond %{HTTP_HOST} !^kjell\.langvass\.org [NC]
    RewriteCond %{HTTP_HOST} !^$
    RewriteRule ^/(.*) http://kjell.langvass.org/$1 [L,R=301]

  30. #30 | Posted January 3, 2008 at 10:55 am

    no-www.org suggests:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
    RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
    

    Not sure what you’re asking for precisely, and this is a bit beyond the scope of this page, but if you’re looking to convert http://www.kjell.langvass.org/ to http://kjell.langvass.org/, you might try something like…

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+?)\.domain\.com$ [NC]
    RewriteRule ^(.*)$ http://%1.domain.com/$1 [R=301,L]
    

    (Not tested!)

  31. jhp
    #31 | Posted January 7, 2008 at 1:49 am

    I have the issue originally mentioned by Dan, wherein trying to load the 2nd blog just loads the 1st. I’m using 2.1.1 using the advanced instructions and each blog with its own config file.

    I have two pre-existing blogs, in the form of user1.mysite.us/blog and user2.mysite.us/blog. The two sub-domains map to top-level directories at mysite.us.

    So I uploaded a new WordPress install at /wordpress. Then I created symlinks to that dir from /user1/blog and /user2/blog. In mb-users.php, I added ‘user1.mysite.us/blog’ and ‘user2.mysite.us/blog’. I have the appropriate mb-config-user1_mysite_us_blog.php and mb-config-user2_mysite_us_blog.php files.

    Is this setup not supported, or am I doing something wrong?

  32. #32 | Posted January 7, 2008 at 10:34 am

    JHP–

    I’m sure Stephen will have a complete answer for you. In the meantime, if you are familiar with php, you can look at wordpress/wp-content/multiblog/mb-functions.php. The function vmb_get_virtual_user() is where the magic happens that converts a url to a blog directory.

    A quick look at it suggests that you might be using an unsupported configuration. You are using both subdomains and subdirectories. My site works with subdirectories, but I’m not using subdomains also.

    Anyway, take a look at vmb_get_virtual_user() and you might be able to tell what’s happening.

    Good luck!

    –Dan

  33. #33 | Posted January 7, 2008 at 2:27 pm

    jhp –

    The symlinks might be complicating things — you don’t need them at all. Just make a real /blog/ directory and put the WordPress files in that.

    Try that first and see if it helps. Off the cuff your vusers[] seem correct.

    Dan –

    In theory, the combination of subdomain and directory should work.

  34. jhp
    #34 | Posted January 7, 2008 at 6:25 pm

    Stephen, I don’t follow. Where should I put the "blog" dir with the wordpress files?

  35. jhp
    #35 | Posted January 7, 2008 at 7:24 pm

    OK, here’s what I found when debugging the code in vmb_get_virtual_user(): First, with $vusers set as described in my first comment, all of the tests fail, so it defaults to using $vusers[0] (which is the issue I was having). It seems I really want to go down the ‘else’ case, where the server and directory are concatenated. So I commented out the users in mb-users.php and just set $vusers = ”.

    After this, both blogs won’t load, with an error that it couldn’t access the database. This is because $mbroot comes in as ‘//blog’. When VUSER is set and the code tries to load the config file, it looks for "mb-config-user2_mysite_us__blog.php" (notice the double underscore before ‘blog’). So I changed my two config files accordingly, and now everything seems to be loading fine.

  36. #36 | Posted January 7, 2008 at 11:43 pm

    jhp —

    I was suggesting that you make a “blog” directory in your root folder, and put the WordPress install there. I was trying to eliminate the variable produced by the fact that you were putting the install in a location different than _any_ of the WordPress installs. You have two domains, each with a blog at domain.com/blog …you don’t need _any_ symlinks. Install WordPress in /blog and off you go.

    Be aware that if anybody goes to the _actual_ install directory (/wordpress), it may be possible for them to create a blog there….

    That double-slash thing is weird. I’m curious now. :p

  37. Phil
    #37 | Posted January 8, 2008 at 9:36 pm

    Hi
    It took a lot of searching to arrive here and glad I did. Surprising too that things like MU are overkill while for-sale multiblog scripts might have huge shortcomings.

    Still getting my brain around the simplicity of V.MBl, but can anyone suggest if Windows Live Writer will handle the system?

    I’m wanting to bring a dozen blogs under the same domain and currently use WLW to manage their content, with respective WP logins. Is WLW’s operation by definition incompatible with v.multiblog?

    I’ll take your blank looks as ‘well, try it and see’ which I’ll be doing sometime this week. Just appreciate any guesses/confirmation.

    Phil

  38. #38 | Posted January 9, 2008 at 3:23 pm

    Windows Live Writer probably uses xmlrpc — it has to use _some_ standardized connection to work with so many blog platforms.

    I haven’t tried it (being a Mac guy) but I see no reason why it wouldn’t work. The thing to remember about this system is that WordPress never actively notices that it’s running multiple blogs — it’s like running completely separate, but normal, installs of WordPress.

    In the time I’ve been running this (over a year), I’ve discovered exactly one plugin that does not work perfectly with VMB, and that’s “WP Super-Cache”. That plugin only has issues because it modifies the .htaccess file, which I’m already modifying separately.

  39. #39 | Posted January 10, 2008 at 1:59 pm

    Hey Stephen,

    i tried to upgrade to your new 2.# just out of curiosity
    the symlink was up and all .. setup seemed very similar to your 1.1 version but when i accessed my website i get a blank page on both directories.

    I switched back to 1.1 working again :)
    haha.. what do you think could be the problem :]

    thanks for this great tool btw!

  40. #40 | Posted January 14, 2008 at 2:34 pm
    Orson Welles (as Citizen Kane) clapping his hands

    Hi Stephen

    Your system works brilliantly, truly excellent job.

    THE GREAT NEWS IS:
    It works flawlessly with Windows Live Writer including image uploading between all the blogs :)

    Here is my quick and dirty WordPress CMS or MultiBlog help file for those that are battling with blogs under sub directories. (Please note I am no expert it took me 2 days to get this working plus I am a complete idiot plus it’s my first attempt at WordPress). Lets call this my "Idiot’s Guide to Virtual Multiblog for WordPress"

    The steps I took:
    1. INSTALLED WordPress in the root
    1. CREATED SYMLINKS
    2. EDITED MB-USERS.PHP
    3. EDITED HTACCESS
    4. CREATED BLOGS

    SYMLINK
    1. For Windows Users – Download WINSCP (http://winscp.net/) this utility makes symlinks a snap. For ease of use install if with the "Norton Commander GUI"
    2. In WINSCP create your account and log in.
    3. Goto your public_html folder.
    4. Click on File -> New Link
    5. The top option is the virtual directory you want to create, mine was "alberton"
    6. Second option is the folder you link to (you will see your directory structure right on top of the screen – right hand side, mine was "/home/cento/public_html/", click ok and your link has been created.
    7. Do this for all your zillions of directories

    or

    Create a PHP and upload to your public_html folder, name it anything and paste this in:

    <?php
    symlink ('/home/cento/public_html/','/home/cento/public_html/alberton');
    ?>

    "alberton" needs to be changed to your name you want the symlink to be

    MB-USERS.PHP
    This file confused me a lot as I had a major problem that the default blog on the root that either defaulted to the second blog or kept on saying that the database was already installed.
    It do not know if this is the proper way but trust me it works. To keep it simple I have deleted the comments from the file. What I must mention is this comment from Stephen "//The first blog on the list will be the default"

    That means you must have a name for the default blog on the root but and it must have a symlink!! I called mine ‘cento’, this means the root blog will be assigned to this. The other directories are the names you gave your symlinks shown in point 5 above.

    $vusers[] = 'cento';
    $vusers[] = 'alberton';
    $vusers[] = 'germiston';
    $vusers[] = 'vereeniging';
    
    $mydomain = 'centosport.co.za';
    

    [editor's note: you should only fill in $mydomain if using subdomains, e.g. "alberton.centosport.co.za"]

    It was convenient for me to have my own single domain as above as I am going to create 50 symlinks/blogs as this will be used as a CMS, as was indicated you then do not have to insert the domain everytime in the vuser section.

    HTACCESS
    1. Make sure you edit your .htaccess properly and set the permissions properly (mine is 744) after editing it, I am sure someone here will be able to point the correct setting if this is wrong but it works for me.
    2. IMPORTANT!! The .htacess includes all the directories except the root blog. which is "cento"

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteCond %{REQUEST_URI} (/alberton|/germiston|/vereeniging)?/
    RewriteCond %{REQUEST_URI} !wp-content/docs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . %1/index.php [L]
    
    # END WordPress
    

    Paste the above in your .htacess file and change the symlinks/folder names in line 4.

    Save your .htaccess file and modify the permissions.

    CREATE BLOGS
    Now go to each individual folder "http://www.centosport.co.za/alberton "germiston", vereeniging" including the root blog etc. and install each blog individually. IMPORTANT try and keep your passwords different for each blog if you are planning to change the passwords when logging in as this might confuse your system. I am not 100% sure of this but let’s be safe.

    [editor's note: I have used same username/password on multiple blogs with no problems.]

    IMPORTANT!! You must install each blog asap otherwise someone else can log into that directory and pose a security breach.

    SOME THOUGHTS
    1. Stephen’s multiblog tool allows for a true CMS system with individual sections "blogs" for your users
    2. This tool will be even more amazing if you can copy certain sections ie.widgets, users, categories between blogs from one master blog to the other.

    Lastly thanks again for making my live a little easier

    [You're welcome -- Thanks for the guide! -- ed.]

  41. #41 | Posted January 14, 2008 at 3:47 pm

    Pierre –

    You should blank out the $mydomain variable if you are not using subdomains. Having it may pose a security risk, as somebody could potentially make a new blog at (for example) alberton.centosport.co.za

    To clarify: $mydomain, is simply a shortcut for people making lots of subdomains at the same domain. It allows you to just put the subdomains in the $vusers[] list, and they will be recognized as “$vuser.$mydomain”

  42. #42 | Posted January 14, 2008 at 3:51 pm

    mo –

    Can you be more specific? Please Email me with details about your site — what $vusers are listed, where is WordPress installed, what are the names of your config files, using symlinks/subdomains, etc…

    Let’s see if I can get v2 working for you.

  43. #43 | Posted January 14, 2008 at 4:10 pm

    Stephen

    I tried that eg:

    alberton.centosport.co.za and it just gives me a 404 error

    Could it be because of my hosting platform WHM/CPANEL

    When I remove the $mydomain = ‘centosport.co.za’; my blogs do not want to install.

    Anyway I will leave it like this and just make sure the blogs cannot be re-created going the other way around.

    The good old saying "if it works don’t fix it" comes to mind.

    Thanks for the headsup though, I appreciate it

  44. #44 | Posted January 14, 2008 at 4:43 pm

    Pierre –

    Are your blogs in different directories, or are they in subdomains, or both???

    If they are all at the root directory but different subdomains, you don’t need the symlinks. If they are in directories on a single domain (no subdomains) you don’t need $mydomain.

    That is, if using subdomains, you don’t need the symlinks at all — just point each subdomain to the root directory.

    It sounds as though you are using both methods at once!

  45. #45 | Posted January 14, 2008 at 5:33 pm

    Hi Stephen

    I only use directories on a single domain. The problem is I tried all the scenarios you mention and it did not work, hence this method.

    Please bear in mind my noobness but it’s working great. I have not found one pluggin or post not working except WP Super Cache.

    I am building the site now and will report on any bugs etc. so it might help anyone.

    BTW: I needed a solution like yours to break my ads up using Adserve and letting each branch have it’s own unique account as WP does not allow our weird categories.

    I am now attempting WP-o-Matic to see if the blogs will RSS feed articles to the main blog using a "Featured" category.

    If that works WP-MU can fly and we can go live in a day or so :)

    Thanks again

  46. #46 | Posted January 18, 2008 at 4:03 pm

    Hi Stephen, and thanks Pierre :)
    i just came back to this post

    i think Pierre’s note:
    2. IMPORTANT!! The .htacess includes all the directories except the root blog. which is "cento"

    might have been my problem – i might have felt the need to add both from the v1 install and that probably messed me up xD

    I’ll have to try again the next chance i get :D
    thanks a lot !

  47. #47 | Posted January 20, 2008 at 6:17 pm

    Strider, I am having difficulty following your instructions for the Easy Setup (no doubt due to my inexperience). Please advise me. Here are the stumbling blocks I am facing:

    STEP 1: Install the WordPress files as usual.

    Well, I think I have already done STEP 1. That is, my WordPress site is already up and running. Is that what you mean? Or are you saying that I need to do a fresh reinstall of WordPress in order to make Virtual Multiblog work?

    STEP 2: Place the multiblog folder in the wp-content/directory.

    That’s clear enough. I did it.

    STEP 3: Move the wp-config.php file up to the directory in which you installed WordPress.

    Here I get a little confused. At this point in the installation, there are two wp-config.php files inside my WordPress folder — the old wp-config.php and the new one.

    I assume you are asking me to move the new one (not the old one) into the root directory, where the WordPress folder resides. In other words, I should place it *outside* the WordPress folder, but *inside* the root directory. Correct?

    And what about the old wp-config.php? Should I delete it?

    STEP 3: Open wp-content/multiblog/config/mb-autoconfig.php in a text editor. Input your database login information:

    Clear enough. I have performed this step.

    STEP 4: Set up whatever symbolic links, subdomains, or domains you wish so they all point to the directory with WordPress installed.

    Here I’m not sure what you mean by saying that my symlinks should "point" to the root directory. I interpreted this to mean that I should create folders and give them names corresponding to the directories I wanted them to represent, then put those folders inside the root directory. Is that correct?

    For instance, I created a folder called "blog" to represent a sub-directory and created two folders inside of "blog" to represent sub-sub-directories. Let’s call them sub-blogs.

    Then I tried putting "blog" inside my WordPress directory. Didn’t work. So I tried putting it outside my WordPress directory. Still didn’t work.

    When I placed the "blog" folder *inside* the WordPress folder, and typed in the URL http://www.example.com/blog/sub-blog, I got an error message that I was denied access.

    When I placed the "blog" folder *outside* the WordPress folder, and typed in that same URL, I got an error message saying that the page did not exist.

    Again, please pardon the elementary nature of these questions. Any assistance you could give me would be deeply appreciated.

    [example URI edited by admin]

  48. #48 | Posted January 21, 2008 at 10:41 pm

    Rodrigo –

    1) If you’re already running, step one is done. :)

    2) Ok

    3) Replace the existing wp-config.php. To be on the safe side, you might want to rename the original instead of deleting it.

    3… again) Ok

    4) You need to learn a bit about “symbolic links”. Basically it’s a special kind of file that the computer sees as though it were a particular directory — i.e. a second representation of that same directory. If WordPress is installed in /blog/, you would make a symbolic link, pointed to /blog/ and name it something else (e.g. “blog2″). End result: directory /blog/ with WordPress installed in it, and “directory” /blog2/ with the exact same files as /blog/.

    There are many ways to make symbolic links, and they differ depending on the OS of the server and other factors. Ask your host about making symbolic links. If you’re not a techie type, you’re probably best off if they can make then for you.

  49. John
    #49 | Posted January 29, 2008 at 7:57 pm

    Hi,

    This looks like a great project. I’m going to build a network with 20 blogs on all their own domains.

    I however need all of them to be hosted on unique IPs.

    Will this be a problem or easy to achieve?

    Does this solution also use different databases? Because I use a couple of plugins that might collide. I just want to share stuff like user information and some options.

    Thanks.

  50. #50 | Posted January 30, 2008 at 10:52 am

    John –

    I have no idea about having them all on different IPs. You’re running off of a single install of the WP files, so I assume that’s one server == one IP.

    RE databases: You can set it up to use different databases or the same database.

    RE Plugins and sharing user info: Allow me to quote the first paragraph of the Readme file…

    “Each blog is managed as a complete separate install — separate admin sections, separate users, etc. They will happily co-exist with different themes and plugins activated.”

    A future version may allow for sharing of user info, but it will take a lot of work and testing, so don’t hold your breath waiting for it.

  51. #51 | Posted February 2, 2008 at 9:27 pm

    Add me to the list of grateful people who think the work you’ve done here is exactly what was needed!

    Unfortunately, I’m a noob with regards to a lot of what’s going on with the database stuff, despite a halfhearted half a computer science degree I earned several years back. The only thing I was prepared for in this install was the creation of symbolic links (whew!)

    Anyways, somehow I got a little confused, and somehow my database has two sets of entries in it… the stuff that was there before (since I already had a running blog before I tried to add virtual clones) and the new stuff, which is prefixed slightly differently; for example, I have wp_posts that contains my old posts, and wp_qrystal_name_posts that contains that exciting "Hello World" that comes with all new WordPress installs.

    I think my problem was that I was following the directions really literally, and needed to tweak somewhere to do what I wanted instead of what the default install would be. I’ll post back here when I figure out what to do about it .. :)

    (I think I’m only babbling in your comments here because my own blog is on the fritz and I need an outlet! :P )

  52. alex
    #52 | Posted February 3, 2008 at 9:08 am

    hi there, great job on this!

    I was planning to give away 200 to 300 wp weblogs on subdomains. I would have one or more installations in a subdirectory of my main domain.

    Do you think this is doable with your script ?
    Should I split into more installations?

    thanks

  53. #53 | Posted February 3, 2008 at 10:03 am

    Qrystal — You have tow options to use the previously existing database info:

    1) Use a MySQL program of some sort to change the names of the old tables to the new prefix. Note that you will also have to change a couple entries in the xx_options table where the prefix is on an option name.

    2) Use a custom config file that tells that blog to use the wp_ prefix

  54. #54 | Posted February 3, 2008 at 10:09 am

    Alex —

    As far as I know, the scripts should handle the load. What you might want to do, however, is split it among multiple _databases_. If that is still a problem, you might split it across multiple servers. Splitting it into different installs on _one_ server might actually _increase_ the burden, as you could lose some of the advantages of PHP caching.

  55. alex
    #55 | Posted February 3, 2008 at 2:08 pm

    Thanks Strider, that was exactly the answer I was hoping for.

    I have a small problem though. I cannot seem to make rewrite rules for the subdomains with htaccess, so I decided to add the subdomains with cpanel.

    Then I tried placing a php file inside the subdomain’s directory, which Includes the index file of the WP installation (using a relative path to the wp-directory, located in public_html).

    this is however generating a blank page.
    do you have a tip for me to make this work?
    that would be great!
    thanks again

  56. #56 | Posted February 4, 2008 at 10:13 am

    “I tried placing a php file inside the subdomain’s directory, which Includes the index file of the WP installation (using a relative path to the wp-directory, located in public_html). this is however generating a blank page.”

    I don’t understand what you’re describing here. You’ve made subdomains, and you are pointing them to a directory in public_html. This subdirectory has WordPress installed in it or not? Why are you including from somewhere else?

  57. #57 | Posted February 5, 2008 at 8:33 am

    Alex, it sounds like you’re using actual directories for your subdomains, and you don’t have to. I used cpanel to direct my subdomains to point to symbolic links instead of actual directories, and those symbolic links are like ‘shortcuts’ pointing to the wordpress directory.

    I think the concept of symbolic links is unique to a unix/linux environment, and I only know how to set them up via command line. I did encounter some instructions on how to use php to set them up though, and there are probably other ways to set them up depending on operating system, etc. I can see why Strider doesn’t include instructions on that part of it, because every system is different!

    Anyways, Strider, I did end up just using phpMyAdmin to go through the database and find the things I needed to change. I didn’t realize I could have just changed the prefix in the config file! I was already setting up custom config files for the various domains, so that would’ve been easy.. ah well, the lessons learned in the SQL exploration were worth the effort! :)

  58. #58 | Posted February 5, 2008 at 4:11 pm

    Actually, for subdomains you don’t need symlinks at all.

    Symlinks are used if you want blogs in subdirectories. Then you make fake “directories” that are symlinks pointing back to the main install.

    For subdomains, you install WP, and point your various subdomains to the same install.

  59. #59 | Posted February 5, 2008 at 5:11 pm

    OH — wow, that’s pretty incredible! And I realize now that you have been saying that all along. My mind must’ve just latched onto the symbolic link idea, because those are the search terms I used to find this plugin! :)

  60. #60 | Posted February 14, 2008 at 9:11 am

    I am currently modifying my wordpress to be a multi domain interface blog management system, the problem is however.. the wordpress code itself. It is so messy and all over the place its turning what should be a simple job into a hard job and tiresome job.

    I have basically config’d my httpd.conf file to send all domains to the same documentroot to pull the same wordpress files.

    I have made some db modifications to associate posts, categories and comments with specific domains, and also obviously add / edit / delete domains.

    Still currently going through some MAJOR issues but will notify and post link to download when complete.

    Kind regards,
    Chloe Prams.

  61. #61 | Posted February 14, 2008 at 12:51 pm

    Chloe –

    Are you familiar with WordPress MU? Between that system and this one, I’m not sure what it is you’re attempting that hasn’t been done.

    I’m not knocking your effort! :) If you’re on the track of something different, I’d love to see it. Just no sense in recreating the wheel.

    Check out MU if you haven’t seen it yet. It might already be what you’re trying to create.

  62. #62 | Posted February 17, 2008 at 10:30 am

    Hi, this seems like an interesting plugin, and one I’d very much like to use as I have several WordPress blogs on the same hosting account.

    However, after following the simple install steps I cannot login, but get redirected to install.php and the error "Already Installed". I didn’t have problems completing any of the steps and the install did create tables to the database.

    I tried it with only one blog, so I can’t figure out why it would not work.

    Any ideas?

  63. #63 | Posted February 17, 2008 at 10:51 am

    Feel free to ignore the above!

    After purging the database and going the advanced setup route, the problem disappeared.

  64. #64 | Posted February 19, 2008 at 10:19 am

    Ok, so I got your awesome little hack up and running, but I’m not sure how to take advantage of the VUSER constant for theme mods. Here’s my dilemma..

    I have the same theme on all the domains, but I’d like to change the header logo depending on the site.

    root site –> wp-content/themes/theme/root-site-logo.jpg
    virtual site –> wp-content/themes/theme/virtual-site-logo.jpg

    etc, etc.. How do I achieve this?

  65. #65 | Posted February 19, 2008 at 12:12 pm

    Hello: Grettings for your help.
    I have some questions.
    How many databases do you need for run this plugin?
    about the admin panel…
    Have I one admin panel for each blog?
    Thanks very much.

  66. #66 | Posted February 19, 2008 at 4:48 pm

    Guy — Try something like this (untested off the top o’ me head):

    <img src="logo-< ?php echo(VUSER) ?>.jpg">

  67. #67 | Posted February 19, 2008 at 4:51 pm

    Leonardo — This is all pretty well covered in the readme, but…

    With Easy Setup, it all goes in one database. With Advanced setup you have the choice of same or different databases.

    Each blog will have completely separate admin. They act as separate installs.

  68. #68 | Posted February 20, 2008 at 7:31 pm

    Hello: I am reading your "readme" archive.

    I have a questions, about your website.
    You have 2 blogs
    http://striderweb.com/nerdaphernalia
    http://striderweb.com/blog
    they are created usin "Symbolic Links"???
    I am trying to learn what are "simbolic links"…Is my first time that I know that word.
    Thanks for help me.

  69. #69 | Posted February 21, 2008 at 12:13 am

    Leonardo –

    The bulk of this site is run directly off an install of WordPress at the root directory (striderweb.com/). The /blog/ directory is part of that install.

    Also in the root directory is a symbolic link named “nerdaphernalia” that points back to the root directory. The symlink acts as a directory in its own right, which means that I effectively have a /nerdaphernalia/ directory, that conveniently contains exactly the same stuff as the root directory (minus a “nerdaphernalia” directory — the symlink does not cause an infinite loop! That is, the nerdaphernalia directory does not contain a nerdaphernalia directory….)

    As for what a symbolic link is:
    http://en.wikipedia.org/wiki/Symbolic_links

  70. #70 | Posted February 21, 2008 at 12:50 pm

    Hi,
    I’m using WordPress as CMS to make some different sites. Some of them have more than one domain name (www.mysite.com and http://www.mysite.org). So if I define 2 symlinks I´ll get 2 sites instead just one as I pretend.
    Have you some tip to solve this.
    Tanks,
    PB

  71. #71 | Posted February 21, 2008 at 4:17 pm

    PB — Not sure exactly what you’re describing; but if you want the two domains to point to the same blog, you can use the Advanced Setup. Just give the two domain VUSERs custom config files that each define the same table prefix.

    Note that WordPress knows what domain it’s supposed to be in, so if you access it through the “other” domain, it will forward to the the one defined in WordPress. That’s WordPress code; not mine.

    (though… you _might_ work around that by defining the URL in the config file also, like so:

    define('WP_SITEURL', 'http://www.example.com/');
    define('WP_HOME','http://www.example.com/');

    Good luck!)

  72. #72 | Posted February 23, 2008 at 5:06 pm

    [...] 1 folder to maintain, perfect. So here’s how it’s done. First, download the mod from Stephen’s web-site. Extract the contents of the archive to the base (core) WordPress installation /wp-contents/ [...]

  73. #73 | Posted February 26, 2008 at 5:23 pm

    Hi – awesome plugin here, just awesome. I was able to get this working with a fresh wordpress install in a matter of minutes (using subdomains). However, I tried to connect this to an existing blog and I hit a wall. I was able to create the custom config and it was applied, however when I went to my blog root, I was redirected to /wp-admin/install.php – and there was an error that the tables were already populated and must be cleared in order to install. Interestingly enough, I went to mysite.com/wp-admin and logged into the dashboard of my blog no problem, all of the db info was there. I even tried changing back to the default theme but I got the same install error when going to my blog root.

    Any ideas? I would really love to use this with my existing setup so as to drop my redundant wp-installs on the subdomains.

  74. #74 | Posted February 26, 2008 at 5:31 pm

    Nick,

    I ran into the same problem with one of my sites but eventually managed to work through the problem. I wrote up a little tutorial that might provide some guidance.. Let me know what you think.

    http://www.nullamatix.com/howto-run-multiple-poor-mans-...

  75. #75 | Posted February 26, 2008 at 5:43 pm

    No, your how-to didn’t help. I am still stuck at the same place doing the same thing. This is something that is unique to connecting to an existing set of data tables that does not happen when i create new tables. Could it be something in the config file itself I wonder? I am going to look if there are any differences between my existing wp-config.php and the multiblog one. also wondering if maybe .htaccess is to blame. I will check and report back.

  76. #76 | Posted February 26, 2008 at 5:50 pm

    Nick,

    Sorry about that. I recall experiencing the same error and believe the issue was resolved when explicitly defining the table prefix in the mb-config-some_domain_com.php file. phpmyadmin was showing new table prefixes (some_domain_wp_xxxx or something similar). I then deleted the new tables and defined the default WP prefix (wp_) and the site loaded as expected.

    Hope you figure out what’s going on. Hang in there, believe me, it’s worth it :) I’ve reduced my server’s disk consumption by a significant percentage.

  77. #77 | Posted February 26, 2008 at 5:54 pm

    I do appreciate the response though. I am able to connect to the tables when in the dashboard – but when i go to the site, I get redirected to the install and get the error stating that the tables are in use and I cant install. Its really weird – its like there is a setting somewhere telling it to install again even though it doesnt need to be installed because it can see the data in the tables.

  78. #78 | Posted February 26, 2008 at 6:01 pm

    Man, that is weird… hhmm. You did replace your wordpress wp-config.php with the one provided in the download, right? Have you checked the DB for additional (newly created) tables?

  79. #79 | Posted February 26, 2008 at 6:06 pm

    Yes, I did replace wp-config (after renaming my original of course). Just checked the db and no new tables were created.

  80. #80 | Posted February 26, 2008 at 8:16 pm

    Nick –

    First thing I would try is defining yoru URLs as described at the end of this comment.

    Can you give me the URL of the problematic blog? Maybe having a look-see might give me an idea.

    Could there be a difference of WordPress versions or something?

  81. #81 | Posted February 26, 2008 at 10:24 pm

    Strider –

    Man, you’re good. Two things:

    1) I was using version 2.4-bleeding (from WP SVN) but since have gone back down to 2.3.3. But in that context, there was an additional setting in my original wp-config.php file, so I added that to the mb-config file for that site.

    2) I added the URL definitions to that config file, and was still able to get to my dashboard, but the actual blog was erroring out (Firefox error) because the page was not redirecting properly (the firefox error message I got). That’s when I noticed that in the working dashboard, my URL structure was http://www.mysite.com//wp-admin (double slash). I went back to the URL definitions in the config file and changed them from http://www.mysite.com/ to http://www.mysite.com (no leading slash). I reloaded the site and everything worked perfectly, and the double slash was gone in the URL structure.

    Thank you both for your help, and strider thanks for this amazing plugin. I have been looking for this for about 6 months now and just want to reiterate my gratitude for your hard work on this.

  82. #82 | Posted February 26, 2008 at 10:39 pm

    I wonder if that is related to the problem this user (JHP) had regarding the double-understroke. (That is, his username appeared to be coming up with a double-slash, and thus the config file needed a double-understroke in order to work.)

  83. #83 | Posted February 26, 2008 at 10:52 pm

    I could not get my blog to load with that URL structure. My assumption is that WordPress automatically inserts the leading slash into the URL when using Clean Permalinks. Not sure if JHP was defining the site URL or not, but may be prudent since JHP appears to be using directories.

  84. #84 | Posted February 26, 2008 at 11:32 pm

    Eh. Should be easy enough to add a line that strips trailing slashes off vusers[]es. Something for 2.1.2.

  85. #85 | Posted February 28, 2008 at 2:27 pm
    D'OH!

    Long story short — The “donate” links on this page were messed up, and short of a couple donations on Feb 27, 2008, I have never received, nor even known about, any of the money people may have donated to this site previous to that date.

    (PayPal says all donations were returned to the payors.)

    Long story long — You can read the details here.

  86. #86 | Posted February 29, 2008 at 3:52 pm

    search “use symlink for plugin on multi blog” on google.
    find your blog.
    i want to find how to make just one plugin folder..
    but i got much greater sollution here..
    great job..
    i will try.

  87. #87 | Posted March 1, 2008 at 12:46 pm

    This looks great! Being an intermediate newbie to this all, I have a question:

    Would this allow different themes (or plugins) for each blog?

    Thanks so much in advance.

  88. #88 | Posted March 1, 2008 at 1:40 pm

    Kenny —

    Each blog has a completely separate admin section and settings. They act as separate installs.

    So, yes, each blog can run on different themes with different plugins.

  89. Mura
    #89 | Posted March 2, 2008 at 11:47 am

    Hi. I’m thinking of trying out your plugin (it sounds great!), and I have a few questions. If I set up a symbolic link from root/blog back to root, it would mean that if there was a directory in root that contained a separate site (root/othersite), it would mean that a mirror of that site would appear at root/blog/othersite, right? So in my case it would be better to install WP in a directory (root/wp) and have the first blog simple exist on root, and then just create symbolic links as usual for additional blogs, right? (root/blog, root/blog2), correct?

  90. #90 | Posted March 6, 2008 at 7:33 am

    Got it working finally!

    I believe that note by Pierre

    That means you must have a name for the default blog on the root but and it must have a symlink!! I called mine ‘cento’

    was what got me through this setup,
    Strider, this is beautiful work, saves everyone a huge amount of time. Thank You!

  91. #91 | Posted March 6, 2008 at 8:38 pm

    Mura –

    If I set up a symbolic link from root/blog back to root, it would mean that if there was a directory in root that contained a separate site (root/othersite), it would mean that a mirror of that site would appear at root/blog/othersite, right?

    Very good question. The answer is “I don’t think so.”

    I can tell you what happens on my system. I just made a second symlink on my Mac (running OS 10.5). So I have the striderweb root, /nerdaphernalia/, and /linktest/. The OS, surprisingly, did the infinite loop thing — /nerdaphernalia/ not only contained “linktest”, but another “nerdaphernalia”…. (I say “surprisingly because it did not loop on OS 10.4 — must be from the changes Apple made to accommodate Time Machine….)

    Viewing it via web server, it did not loop. When I went to striderweb.local/nerdaphernalia/linktest/, it came up with a “Not Found” page.

    So… It works okay on my test system, but different systems may trat them differently. I would be curious to hear how this is working out for people, as this is an issue that should be watched.

    I myself run the type of setup where this can be an issue (a root level blog with symlinks back to root), but on my live site (that is, the one you’re reading right now) I only have one secondary blog. http://striderweb.com/nerdaphernalia/nerdaphernalia/, you will note, does not work.

    So in my case it would be better to install WP in a directory (root/wp) and have the first blog simple exist on root, and then just create symbolic links as usual for additional blogs, right? (root/blog, root/blog2), correct?

    Try it. I think it will work fine, but you should test it and make sure. Please let me know! :)

    (BTW, this site runs on Apache on Linux. I’ve never tested a Windows hosted system….)

  92. Andy
    #92 | Posted March 12, 2008 at 10:57 am

    Hi

    First of all thank you so much for this great plugin / hack – it works great for it’s intended purpose :)

    However I am wanting something very lsightly different – The aim is to have 1 master blog that is highly configured for SEO with lots of fancy plugins and lots of other blogs using the same database in terms of posts, users and categories etc BUT not using all my fancy SEO and plugins.

    I have tried sharing the same master full master database via the mb-config-othernonseoblogs_com.php custom config file but this is obviously picking up ALL the tables including the nice master customisations.

    Does anyone have any code so I can just share certain parts of the master blog’s database?

    Thanks in advance!

  93. #93 | Posted March 12, 2008 at 2:17 pm

    Andy — you might have some luck working with Constants in the WordPress config file. This page might get you started, but note that there are a lot more constants in WP than listed in that page.

    http://codex.wordpress.org/Editing_wp-config.php

  94. Andy
    #94 | Posted March 13, 2008 at 2:50 am

    Thanks for the quick reply Strider.

    I have made use of the WP_SITEURL and WP_HOME constants so far but trying to set the right constants tables for posts, categories and users is proving hard for someone with my limited php skills!

    I also thought about approaching this via synchronising the MySQL tables that I need to share directly but this again is proving difficult to only get the bits I want.

  95. jorge
    #95 | Posted March 14, 2008 at 11:53 pm

    hello strider
    i am installing multiblog.
    i tried several times and read almost everything including posts, and cant make it work.
    on the last step of the readme file :”Go to each site and create your blogs through the famous WordPress Five Minute Install”
    So I created a folder inside the main blog (example.com/blogA), for my other blog (example.com/blogA/blogB)and installed the whole wordpress files inside.
    is this necessary? or the folder can be empty and the word press files will be virually there? then it is not necessary to follow the five minute install just run the install.php for each folder and set them up.

    maybe my mistake is somewhere else but i want to make this clear first.

    thanks

  96. #96 | Posted March 15, 2008 at 7:38 am

    Jorge –

    By “create your blogs through the famous WordPress Five Minute Install”, I really just mean run install.php. The whole point of this is that you don’t have to install the files separately for each blog.

    For example.com/blogA and example.com/blogA/blogB, blogA is a real folder with WordPress installed in it. The blogB “folder” is not actually a folder — it is a symbolic link pointing back to blogA.

    You can also do example.com/blogA and example.com/blogB; or as I do it on this site, just plain blogA.com and blogA.com/blogB. In each of those examples, blogB is a symbolic link pointing to blogA.

    You can also do blogA.com and blogB.com, or blogA.example.com and blogB.example.com. Those two choices don’t require symbolic links at all — just point the various (sub)domains to the same place.

  97. John
    #97 | Posted March 16, 2008 at 12:12 am

    Hello,

    I have been having trouble setting up multiple domains.
    In part 5 of the easy instructions it says, “set up …domains so that they all point to the directory with WordPress installed.

    I am not sure what the pointing means. I have redirected, new domain to the original domain with the WordPress installed.

    This did not work. When I edited the mb-users.php file to add in the two domains, I was able to access each site, but the second site just points to the first site.

    According to the easy set-up, it is not necessary to edit any files other than the mb-autoconfig.php. However, I think there is another step missing.

    Any help would be appreciated.
    Thanks,
    John

  98. #98 | Posted March 17, 2008 at 11:12 am

    John –

    A redirect won’t work. The domains must all point to the same server, and the server must be set up so they all point to the same directory on the server. In Apache it’s probably done with “Virtual Hosts”.

    If you’re on shared hosting, you’ll have to get your host to set that up.

  99. #99 | Posted March 19, 2008 at 4:40 pm

    Hi Strider.
    I followed all the instructions but cannot run my config :
    2 blogs (cat, dog) on localhost. Here’s the diag output :
    ********************
    I can’t find a configuration file for this blog. I can use either mb-config-localhost__cat.php or mb-autoconfig.php

    Virtual Multiblog v2.1.1 — Diagnostics
    ABSPATH = /home/www/
    VUSER = localhost//cat
    vmb_get_bloginfo( ‘vuser’ ) = localhost//cat
    $_SERVER['SERVER_NAME'] = localhost
    $_SERVER['PHP_SELF'] = /cat/wp-admin/install.php
    $_SERVER['HTTP_HOST'] = localhost
    $_SERVER['SCRIPT_NAME'] = /cat/wp-admin/install.php
    $_SERVER['DOCUMENT_ROOT'] = /home/www/
    End Diagnostics
    **********************
    First, why does it display “mb-config-localhost__cat.php” ?
    Should be “mb-config-localhost_cat.php” (one underscore between localhost and cat).
    Then, why “VUSER = localhost//cat” ? Shoud be “locahost/cat”…
    Any help ?
    Thanks
    Dan

  100. LB
    #100 | Posted March 25, 2008 at 10:39 am

    Strider,
    I’ve been trying to get the virtual multiblog to work for a few days now but I keep running into problems. Currently I’m at the point where I can get the main blog to work on the root folder: http://www.example.com but I can’t get the two sub-directory blogs to work: http://www.example.com/blog1 & http://www.example.com/blog2. When I go to those I get the “already installed” error message.

    I’m trying to set it up so that the sub-blogs each run on their own databases. I’ve followed the advanced instructions and I have my symlinks in the root folder where the main wordpress installation is: home/user/example.com.

    BTW I created my symlinks using a SSH connection to my host via my Mac running OS X 10.5. I noticed an earlier post where you mentioned a possible issue with the symlinks created using OS X 10.5, do you think this could be the problem? Or perhaps I did something else wrong.

    I admit that I am new to wordpress and programming in general… but I feel like I’m doing everything you mentioned in the Read Me file, and I even tried a few variations based on what I’ve read in the posts, but I’m yet to make this work!

  101. #101 | Posted March 25, 2008 at 11:06 am

    Strider –

    Just wanted to pick your brain for a moment on this. When I was originally setting this up I was trying to use http://www.nprignano.com for my main blog, then use some additional subdomains (tumble.nprignano.com, logic.nprignano.com) to power other blogs. No matter what I tried I couldn’t get it to work. Every subdomain would redirect back to the main domain.

    I ended up ditching the idea of using http://www.nprignano.com and decided to use blog.nprignano.com – once I removed the definition for nprignano.com from the mb-users and removed the config file for nprignano_com, all of my subdomains just worked as intended.

    Have you dealt with this before and do you have any ideas how to make http://www.domain.com and subdomain.domain.com work with this setup? I plan to use that setup in the near future and am hoping to power it off of the same wp install (I am too spoiled to go back to separate installs now).

    I did not try to define http://www.domain.com – i used domain.com – do you think that could be the issue?

  102. #102 | Posted March 26, 2008 at 10:45 pm

    Nick — sounds like a bug in the system. I’ll check it out. (New version coming out anyway, why not one more bugfix?)

    FYI — the system regards http://www.example.com and example.com as the same thing. It actually strips off any leading www. before running the comparisons….

    [Update: Stoopid auto-formatting. Ignore any http:// in the above. WordPress is adding that....]

  103. #103 | Posted March 27, 2008 at 9:23 am

    Nick –

    Something for you to check: In the $vusers[] list, domain.com must come before sub.domain.com

  104. #104 | Posted March 27, 2008 at 11:58 am

    LB — There is a new version coming out soon that might fix your problem — it contains more than one bug fix.

    RE: the OS X thing. I was simply making the distinction between a Mac OS “alias” and a “symbolic link”. They are very similar, but they are not the same thing. A Mac alias will not work (nor will a Windows “shortcut”). If you created them in the command line using the ln command, you made symbolic links :) .

  105. LB
    #105 | Posted March 27, 2008 at 1:37 pm

    Great! I’ll wait for the update to try it again. Thanks for clearing up the OS X thing, I did make my symlinks using the ln command in Terminal. Glad to hear that I didn’t mess that part up.

    Do you have an estimated release date for the update?

  106. #106 | Posted March 28, 2008 at 11:28 am

    THANK YOU! I’ve been managing multiple WP databases and you’ve just greatly simplified my life! I looked at WPMU and Lyceum but your tweak did everything I needed with much less headache.

  107. #107 | Posted March 29, 2008 at 10:01 am

    Dan –

    Sorry for the delay in getting back to you. The entry in $vusers[] should not have a slash at the end. Check that and let me know if it fixes it.

    [Update: actually, that might be wrong. Are you using the mb-users.php file? If so, what do you have in the $vusers[] list?]

  108. #108 | Posted March 30, 2008 at 1:59 am

    New version is up!

    Version 2.2 has a number of under the hood changes and bug fixes.

    NOTE TO UPGRADERS: If you have used a previous version of Virtual Multiblog, be aware that the wp-config.php file has changed and must be replaced with the new version (included).

  109. #109 | Posted March 30, 2008 at 7:22 pm

    I’ve got WordPress already installed at my domain (http://indigo.seventh-star.net), but I’d like to run a “virtual” blog without c&p’ing all the wordpress files into another folder. Hence this plugin… I hope. I have another subdomain, chixflix.seventh-star.net, where I’d like to have another, completely separate blog.

    Up above, I read something about subdomain blogs NOT needing symlinks, but I don’t know how else the chixflix folder would know anything about the indigo folder where the WP files are.

    I can go to http://indigo.seventh-star.net/wp-admin/install.php and see the Installation steps, but if I go to http://chixflix.seventh-star.net/wp-admin/install.php, I get a 404.

    My host seems to think a SymLink wouldn’t do what I want, anyway. I tried doing it myself in Terminal (I’m on a Mac), but -s isn’t a proper command, apparently.

    So, I’m a bit lost. I don’t know if my hosts are just airheads or if I’m more confused than they are… but is it possible to use VMB to do what I’m hoping?

  110. #110 | Posted March 30, 2008 at 8:21 pm

    Azurite — Are you using the brand new version 2.2 that I put up very earlu this morning? It fixes many install issues.

    You don’t need symlinks — you need both subdomains pointing to the same place on the server. To my knowledge, a redirect or “parked” domain will not work — the domain or subdomain must be set up directly on the server.

    There shouldn’t be a chixflix folder anywhere — that subdomain should simply be pointing to the same web root as indigo.

  111. LB
    #111 | Posted March 30, 2008 at 8:26 pm

    Strider…
    I gave your virtual multiblog another try after the v2.2 update and I’m still having problems. I continue to run into the “already installed” message when I try and run install.php on my sub-directory. Borrowing the format I saw in an earlier post, here are the steps I took… hopefully you can point out where I went wrong:

    STEP 1: Ran a clean install (using the one-step install offered by my host) of WordPress v2.5

    STEP 2: Placed the multiblog folder in the wp-content/directory.

    STEP 3: Moved the wp-config.php file up to the directory in which I installed WordPress.

    STEP 4: Opened wp-content/multiblog/config/mb-autoconfig.php in a text editor and input my database login information

    STEP 5: Set up my symbolic links: To do this I used terminal on my Mac and using the “ln -s” command I created a link in the directory I installed wordpress into: /home/user/example.com and I named it: blog1

    STEP 6: With my web browser, I then tried to go to each blog and set things up as normal through WordPress. So when I went to http://www.example.com it opened install.php, so that went as planned… however when I went to: http://www.example.com/blog1/wp-admin/install.php it told me that WordPress was already installed and at: http://www.example.com/blog1 I saw the default wordpress theme.

    So, can you help me figure out where I went wrong? BTW, I want to eventually have 3 or so blogs all on their own sub-directories (with no sub-domains) and I’m hoping to run each blog on it’s own database as well… but I haven’t tried the advanced set up yet because I still can’t get the basic one working (this is basically a test run till I get it right).

    Thanks
    -LB

  112. #112 | Posted March 30, 2008 at 9:26 pm

    LB –

    That sounds right. You’re trying to set up the same way I run Striderweb. Root site from the “real’ install, and subsidiary blog (/nerdaphernalia/) running via symbolic link.

    “Duh Ralph” question — where does the blog1 symlink point?

    One other thing: Don’t go straight to the install.php. Try accessing example.com/blog1/

  113. LB
    #113 | Posted March 30, 2008 at 10:35 pm

    The symlink is pointing here: /home/user/example.com -the root directory where I installed WP.

  114. LB
    #114 | Posted March 31, 2008 at 7:40 am

    that’s where I out them as well. So the symlink is located at: /home/user/example.com and it’s pointing at: /home/user/example.com and I named it Blog1. Does that sound right? This is how I wrote the command in terminal to make the symlink:

    ln -s /home/user/example.com Blog1

  115. #115 | Posted March 31, 2008 at 9:12 am

    LB — Your process is correct.

    I’m not seeing anything wrong with your setup, but I would like you to try something for me.

    Delete the symbolic link and recreate it in lower case, that is “blog1″ instead of “Blog1″.

  116. LB
    #116 | Posted March 31, 2008 at 12:38 pm

    I’m pretty sure I did it in lowercase (don’t know why i did it in caps here)… I’ll double check when I get home though. Any other thoughts on why I may be having problems?

  117. #117 | Posted March 31, 2008 at 3:46 pm

    mb-users.php should be named mb-users-sample.php so as not to replace user configuration when upgrading.

  118. #118 | Posted March 31, 2008 at 3:59 pm

    LB — Look in your database and see what tables have been created. The prefixes will give you clue how the VMB system is interpreting your setup. I would expect there to be tables starting with wp_example_com_ and wp_example_com_blog1_, but the latter appears to be failing for some reason.

    Again, try looking at blog1 without going straight to the install script. Do you see the root blog or something else?

  119. #119 | Posted March 31, 2008 at 4:13 pm

    Kjell –

    You’re right. I thought of that at one point, and I guess it slipped my mind. The autoconfig should also be a -sample file, for the same reason.

    Also, look at the readme regarding custom config locations. That way you can bypass that folder altogether and make your files even safer! ;-)

    [Update: Default config files have been renamed in the download]

  120. #120 | Posted March 31, 2008 at 6:29 pm

    In attempting to upgrade from 2.1 to 2.2, when I replace the wp-config.php file and multiblog directory with the new versions, the server returns a ’500′ error. Any thoughts on changes that would cause this to happen? I didn’t change any of the other files and didn’t see any upgrade instructions.

  121. #121 | Posted March 31, 2008 at 7:51 pm

    Randall — I’ve never gotten a 500, so nothing obvious jumps out at me.

    ..except the possibility pointed out in the comments just above yours. Did you overwrite your config files when you uploaded the new version?

    (Still not sure how that would cause a 500 code, but worth checking….)

  122. #122 | Posted March 31, 2008 at 10:23 pm

    Randall — the best way to diagnose your problem would probably be to look at your PHP logs. Maybe they’re showing some specific error somewhere.

    Not sure though. 500 = “Server Error”, which suggests something wrong with the server configuration. Look at PHP logs and Apache logs. More information needed by a long shot….

  123. #123 | Posted March 31, 2008 at 11:33 pm

    Stephen – good with quick updating :)

    It took me a nights sleep to figure out why half of my vmb sites were down after the upgrade. And that autoconfig had also been overwritten :-)
    (I should remember not to do upgrades just before going to bed … when I’m too tired to go back to backups)

    not sure what my benefits are from the upgrade, but it sounds good. Will have a look at placing the config files in a safer place too.

  124. #124 | Posted April 1, 2008 at 3:58 am

    [...] das Blog läuft jetzt mit WordPress 2.5 und dem MultiBlog Plugin. Damit kann man mehrere Blogs mit einer WordPress Instanz [...]

  125. #125 | Posted April 1, 2008 at 9:08 am

    “good with quick updating”

    A stitch in time and all that. Since the update had just gone out, I figured I could spare a lot of other people your pain. Almost made it a silent update, since there’s no real change to the software from 2.2 to 2.2.1

  126. #126 | Posted April 1, 2008 at 11:11 am

    [...] Nerdaphernalia » Virtual Multiblog for WordPress Uncategorized [...]

  127. LB
    #127 | Posted April 1, 2008 at 4:37 pm

    Strider,
    OK I checked my tables and I don’t see any that say wp_example_com_blog1_ I see a few starting with wp_example_com_ but no wp_example_com_blog1_

    This is where my lack of knowledge will become apparent… but what does that mean, and how do I correct it? I’m assuming it means that I did something wrong which caused the failure to create a table for blog1. Any ideas on what that might be?

    Thanks
    LB

  128. Pin
    #128 | Posted April 2, 2008 at 3:35 am

    Yes, I tried WordPress Mu and one major problem is the handling is even more complicated and the version is way behind WordPress…

  129. #129 | Posted April 2, 2008 at 9:30 am

    LB — In the PHP language there is a variable called $_SERVER['SCRIPT_NAME']. It equals what PHP sees as the URL of a particular file.

    For example, right now on this page $_SERVER['SCRIPT_NAME'] is returning /nerdaphernalia/index.php. This is part of what my system uses to figure out what the current VUSER is. Add the host (“striderweb.com”) to the beginning, convert slashes to underscores, and ditch the filename on the end, prepend “wp_”, and we have the auto-generated VUSER.

    So… When you go into the /blog1/ folder, $_SERVER['SCRIPT_NAME'] should return “/blog1/index.php” or something similar.

    The reason you are only seeing the main blog is that (apparently) even in the subdirectory that variable is telling PHP that the URL is at the web root. Instead of a new VUSER of wp_example_com_blog1_ you are getting the same one as the root URL.

    One last thing we can check….

    Try filling in the $vusers[] list in mb-users.php:

    $vusers[] = 'example.com';
    $vusers[] = 'blog1';
    

    (Note, when $vusers[] is filled out, the system falls back the the first on the list if it can’t figure out which one to use….)

  130. #130 | Posted April 2, 2008 at 4:36 pm

    [...] após perguntar ao Oráculo eu encontrei um hack chamada multiblog. Basicamente este hack transforma o WP em uma instalação multiblog virtual utilizando somente uma [...]

  131. LB
    #131 | Posted April 2, 2008 at 4:42 pm

    Strider,
    Thank You, I finally got it to work! I’m not sure what I kept doing wrong before, but I finally got it working this time. Next I’m going to try adding blog2 and I’m also going to try setting things up so each blog is running on it’s own database using your advanced instructions.

    Question, will I have to do a clean re-install to get the different databases set up, or should I be able to set it up without starting over?

    p.s. I’m sending you a donation now. Thanks for this mod and thanks for your help getting it running!

  132. LB
    #132 | Posted April 2, 2008 at 5:15 pm

    Also, if I have 3 blogs – the main blog at example.com then two sub blogs at example.com/blog1 & example.com/blog2 do I need to do separate mb-config.php files for all 3, or do I just make one for each of the 2 sub blogs?

  133. LB
    #133 | Posted April 2, 2008 at 6:17 pm

    Strider,
    Sorry to bug you again… I got the database question figured out. I have each blog running on it’s own database, and I didn’t have to re-install… However the problem I’m having now is the infinite loop issue. http://www.example.com/blog1/blog1/blog1 … and on and on and on all work (they all bring up blog1). So does http://www.example.com/blog1/blog2, etc.

    I remember you mentioning this before, do you know how to fix this?

  134. #134 | Posted April 2, 2008 at 7:43 pm

    LB — probably something can be done in .htaccess, but I’m not sure exactly what.

    I do _not_ get the loop on either my live site or on my OS X test server running MAMP, so I don’t know what the difference is in servers that do it and those that don’t.

    You might ask you host if they know how to stop it. Beyond that try playing with .htaccess and mod_rewrite — something along the lines of rewriting any blog1/blog1/ URLs to /blog1/

    In the meantime, just be careful that nothing in blog1 calls a URL beginning with “blog1/”. Therein lies the true infinite loop!

  135. #135 | Posted April 2, 2008 at 8:39 pm

    I finally was able to make the upgrade work by remembering the bug that I had to work around in the previous version. Due to my setup, in the vusers array all of the slashes had to become double slashes so that the matching code would work. To keep the code matching this time, all of these changes had to be undone. Luckily, I didn’t use the auto-generated table names (except for one blog), because the address for the blog effectively changed.

    The 500 error is something I should have noticed before (as I had to deal with it the first time). I was going to i.cdp.com/blog which was not matching, so somehow, I was getting redirected to pcs.net/blog , which is the default domain from the vusers but the path of the site I was trying to visit. Since pcs.net/blog doesn’t exist, the 500 error is generated.

    Note: All domains are made up and the “email me” when comments are updated doesn’t seem to be working.

  136. #136 | Posted April 2, 2008 at 9:19 pm

    Randall –

    Due to my setup, in the vusers array all of the slashes had to become double slashes so that the matching code would work. To keep the code matching this time, all of these changes had to be undone.

    You mean you need to put something like example.com//blog into $vusers[], and then modify the code to change it back? I’m not sure i’m following you.

    Since pcs.net/blog doesn’t exist, the 500 error is generated.

    Also sounds odd. A “Not Found” should return a 404. What the heck setup are you running on? What server software and what version of PHP?

    All domains are made up and the “email me” when comments are updated doesn’t seem to be working.

    Oops. Turned off the “Subscribe to Comments” plugin when I upgraded to WP 2.5. For got to reactivate it. It’s back now. :)

  137. LB
    #137 | Posted April 2, 2008 at 10:48 pm

    Strider,
    The solution I went with was using redirects as opposed to mod_rewrites. I’m not sure if it’s the most elegant solution, but it works and I was able to do it pretty easily given my limited programming knowledge.

    So if you (or one of your mod users) ever runs into this same problem here’s what I did: in my .htaccess file I wrote the following: “Redirect /blog1/blog1 http://example.com/blog1/” That’s it! It seems to redirect anything where /blog1 appears twice or more back to example.com/blog1. You can see it redirecting, but it works (i.e. I typed in example.com/blog1/blog1 x10 and watched it “count down” all the way back to /blog1). I looks weird, but I’m assuming that most visitors to my blog(s) will never end up typing blog1 10 times (or even 2 times for that matter)…

    Because I also have multiple blogs that I created using your mod, I also did redirects for: example.com/blog2/blog2 and blog2/blog1 and blog1/blog2. Everything seems to work as I need it.

    Again thanks for your help and if you happen to stumble on a more elegant solution than the one I’m using please let me know.

    -LB

  138. #138 | Posted April 3, 2008 at 5:25 pm

    When I used version 2.1, I put example.com//blog in the vusers so the vmb plugin would match up when I visted my blog at example.com/blog. The config file also had to have a double underscore in it. The bug I was working around was fixed in 2.2, so example.com//blog in the vusers no longer works.

    A 404 would be returned if the initial file didn’t exist. It did–and started parsing, but the server wasn’t making it to a point where it could output a valid page (or the php was crashing) and hence a 500 error.

    The software is whatever is on Dreamhost now.

  139. #139 | Posted April 3, 2008 at 8:46 pm

    I think I updated successfully … I’m just not sure what to check so I can BE sure. I just copied the new stuff over the old stuff in the multiblog directory, which I’d imagine should replace anything that needs replacing while keeping my existing config in place (since I did separate config files for each blog anyways). Is there anything I might’ve forgotten?

  140. #140 | Posted April 3, 2008 at 10:40 pm

    [...] can try the Multiblogs solution to work this out. This single WP installation works for everyone by loading a different config file. [...]

  141. #141 | Posted April 4, 2008 at 6:25 am

    Qrystal — Just that you also need the new wp-config.php in the root WP directory. If things are working at all. I can only assume you did that too…. :)

  142. #142 | Posted April 4, 2008 at 11:52 am

    Oh yes, right, I did do that too. Okay, so all is good then I guess!

    Even though it was easy, I was a little timid about it all … are you considering putting an upgrade guide in your readme or FAQ? (The FAQ link on this page doesn’t seem to be working, currently, btw..)

    Thanks again for this wonderful way to manage multiple blogs!!!

  143. #143 | Posted April 5, 2008 at 12:55 am

    [...] Does Virtual MultiBlog for WordPress [...]

  144. #144 | Posted April 7, 2008 at 4:04 pm

    2.2.2 is an important security update; please update.

    A bug snuck in while I was working on version 2.2. This fix is the only change in this newest version.

    If you’re already using 2.2 or higher, you only need to replace the mb-functions.php file.

    Sorry for any inconvenience.

  145. #145 | Posted April 8, 2008 at 3:14 pm

    [...] ???????. ????? | ????? ?????. ?? ?????? ???? ?????? ???: Virtual Multiblog ???????: ????? ????? ???? ????? ???? ?? ????? ???? [...]

  146. #146 | Posted April 8, 2008 at 5:50 pm

    Hi Strider its me again

    at last i could install several blogs inside one directory
    my objective is to make a site like: http://www.mertner.com/
    in which each user can write in a “separate blog” but that it looks like the main blog. here is my project: http://anonimocolectivo.org/blog/
    as you see there are some pages at the top and each page is a separate blog install. but what i wish to do is that each time i create a new wp install, the theme, blogroll etc. remains the same as the main blog. i wish to save some time so that when i change something in the main blog it changes on the rest of the blogs. is this possible???

    thank you very much.

  147. #147 | Posted April 8, 2008 at 9:59 pm

    Jorge — You might have some luck with customizing the WordPress setup process. Take a look at this article:

    http://wpbits.wordpress.com/2007/08/10/automating-wordp...

    As for maintaining common settings across blogs, there is nothing in this system that will do that. (Perhaps down the road, but not any time soon….)

  148. Rod
    #148 | Posted April 9, 2008 at 3:10 pm

    Hi — this is a great plug-in. I set it up using the simple configuration for half a dozen directory-based blogs. The only thing not working as far as I can see is TinyMCE. It gets confused and tries to access ….”wp-includes/js/tinymce/wp-admin” when I try to edit a post or create a new one.

    The Javascript console in Firefox gives:
    Error: tinyMCE is not defined
    Source File: http://…../wp-admin/js/editor.js?ver=20080325

    Anyone else see something like this? I’ve tried tweaking the TinyMCE paths but have not gotten it to work.

  149. #149 | Posted April 10, 2008 at 7:23 am

    Hi
    thanks for great plugin
    unfortunately it doesn’t work with alinks plugin correctly, as described here -> http://forums.headzoo.com/viewtopic.php?f=5&t=8&...
    :/

  150. #150 | Posted April 10, 2008 at 8:11 am

    Ok, I found the problem. It lies in function get_virtual_user .
    If a file located below /wp-content (and other special directories probably too) tries to access wp-config.php, then VUSER is wrong…

  151. #151 | Posted April 10, 2008 at 8:22 am

    Pozmu — I saw your solution on the forum you linked.

    Please note that if you change to using $_SERVER['HTTP_HOST'], you must use $vusers[] in mb-users.php. I’m pretty sure that if you use easy with your hack it is a huge security hole. Anybody can redirect a domain to your server and if $_SERVER['HTTP_HOST'] comes up as their domain, they can set up a new blog on your server!

    I’ve not come across plugins that call wp-config.php directly before. I’ll have to look into allowing for that.

  152. #152 | Posted April 10, 2008 at 10:15 am

    Thanks for the answer, but… sorry, I don’t get it.
    ————————————————————–
    $server = $_SERVER['HTTP_HOST'];
    if ($rootpath == ”) { // if root directory
    $vuser = $server;
    } else {
    $vuser = $server . ‘/’ . $rootpath;
    }
    —————————————————————
    This is from the mb-functions.php itself… So you’re using $_SERVER['HTTP_HOST'] yourself. So if it’s possible to map domain to that vhost there is no security…

  153. #153 | Posted April 10, 2008 at 10:30 am

    That was a bug. See this comment, and then upgrade!

    (Also posted here and here.)

  154. #154 | Posted April 10, 2008 at 10:52 am

    Ok, I see… Anyway, this variable isn’t secure too (http://shiflett.org/blog/2006/mar/server-name-versus-ht... ). But for this use, it probably use… Sorry, I just copied your mistake.

    I think this fix should work for all users:
    *************************
    Find first occurence of:
    $rootpath = dirname( $rootpath );
    Add after it:
    $rootpath = substr( $rootpath, 1 );
    $roothpath_dirs = explode ( “/”, $rootpath);
    unset($rootpath);
    foreach ($roothpath_dirs as $dir)
    {
    $rootpath .= “/” . $dir;
    if ( $dir == ‘wp-admin’ || $dir == ‘wp-content’ || $dir == ‘wp-includes’ ) break;
    }
    *************************

  155. #155 | Posted April 10, 2008 at 6:36 pm

    Strider,
    First of all thank you very much for your great plug-in. One question – does MultiBlog work fine with WordPress 2.5?
    Thanks

  156. #156 | Posted April 11, 2008 at 4:58 am

    Virt, I’m not Strider, but I can confirm it works very well with 2.5

  157. #157 | Posted April 11, 2008 at 9:44 am

    Virt — There is an extended answer to your question in the FAQ. In brief: Yes.

  158. #158 | Posted April 14, 2008 at 9:41 am

    Thanx a lot for this plugin!!
    I’m having problem with this: I want to have both blog1.example.com & example.com/blog1 been redirected to the same installation… the redirection goes to the main domain in m hosting account (main.com not to example.com) and if I set the WP_SITEURL and WP_HOME vars, try to go to blog1.example.com/blog1

    So… there are any directions to catch the problem? any ideas?

    Thanx again!

  159. #159 | Posted April 14, 2008 at 11:44 am

    Konus — I have no idea why example.com would redirect to main.com — _especially_ because you have set WP_SITEURL and WP_HOME.

    Is main.com in the $vusers[] list? That might cause such a thing if there is a different problem also, as the system defaults to whatever vuser is first on that list if it can’t figure out which to use.

  160. #160 | Posted April 14, 2008 at 8:50 pm

    This rocks literally. New blog in 30 seconds flat in any folder or domain. I was able to add the Google web masters’ tools verification file to the main install and verify all blogs at once.

    Also added stats tracking code via wp-hacks

    Thanks much for the tip

  161. #161 | Posted April 15, 2008 at 7:45 am

    Thanx a lot Strider. I solve the problem by adding singles .htaccess like KJell says in 908 (create symlinks to the individual files).

    I finally use this config to my single .htaccess on every symlink (virtual blog):

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^blog1.example.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.blog1.example.com$
    RewriteRule ^/?$ http://www.example.com/blog1 [R=301,L]

  162. #162 | Posted April 15, 2008 at 4:05 pm

    [...] Virtual Multiblog Stephen Rider’s system that uses a modified config file to call different blogs based on directory or domain. [...]

  163. #163 | Posted April 16, 2008 at 3:19 pm

    just want to say… the process of installing and configuring wordpress 2.5 w/ ‘virtual multiblog’, compared to wordpress mu, is simply WONDERFUL. seriously. you are awesome. where’s that donate button? ah yes, there it is.

  164. laura
    #164 | Posted April 16, 2008 at 8:15 pm

    Sorry if this is a dumb question, but is it possible to use this with a bbpress forum for each blog?

  165. #165 | Posted April 17, 2008 at 10:34 am

    Laura — as dumb questions go, that one ain’t bad. :p

    The short answer is “No, but….”

    Longer answer:It appears that BBPress uses a very similar system to WordPress — the database info in this case is entered in a file called bb-config.php (as opposed to wp-config.php). Thus, while it doesn’t work as is, this system is probably easy to adapt to it.

    As these comments are getting awfully long, I’ve been thinking about putting a forum on this site to handle VMB support. So maybe I will look into this.

  166. #166 | Posted April 24, 2008 at 12:04 pm

    Will try on wp 2.5

  167. #167 | Posted April 29, 2008 at 3:27 pm

    [...] ???? ?????? ??????? – ????????????? ????????? ? ???????? ? ???? ??????. ? ??????? ??????? ??? ????? ??????????? ?????????? [...]

  168. #168 | Posted May 3, 2008 at 10:54 am

    VMB might be the tool I’m looking for, but maybe you can tell me if this will work:

    I’ve created a simple blog, Backstory Media, that will be the home to several different media projects (downloadable e-books for example). The idea is to have a separate blog for each project, but each blog would be accessible from the front page of Backstory Media, preferably appearing as different “pages” all with the same theme (but their own archives).

    For example: There’s a primary blog at the front page containing news about Backstory Media. From there, visitors could easily click on a page-link with the title of the e-book they downloaded and join in a blog-discussion about it.

    VMB seems like the best/simplest way to handle this. What do you think?

    Thanks for the help.

  169. #169 | Posted May 5, 2008 at 2:30 pm

    Hello Strider, I’ve been trying all afternoon to make VM work without reinstalling WP 2.5, which I’ve had up and running for several weeks now.

    The problem I get is that once I add the VM wp-config and try to open my original blog, I can run upgrade.php or install.php (both come up redundant), but once those are run then Firefox tells me it’s caught in an infinite redirect loop and can’t load the page for my domain.

    As for my one experimental subdomain, I can open the WP dashboard, but once I change the settings to the directory where WP is installed, every button in Tiny MCE takes me to the new blog with “Hello World”.

    I was using WP Super Cache but have deactivated it and the redirect problem continues. The subdomain is pointed to the directory where WP is installed, and my .htaccess has the following modifications which I assume come from WP permalinks and not VM:

    BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Any help would be much appreciated.

  170. #170 | Posted May 5, 2008 at 6:05 pm

    Osha — might be overkill, actually. Do you really need an entire blog for each individual e-book? Remember, each will have a totally separate admin and such.

    Casey — This system is currently semi- to non- compatible with wp-supercache. (I’m working on it….)

    To run your previously existing blog, create a config file for it per Advanced setup, and set the table-prefix to whatever it was in the original blog (“wp_” by default).

  171. #171 | Posted May 6, 2008 at 6:07 am

    Thanks for the info Strider–I found that the main problem was a table prefix issue, and I’ve fixed it. My blog is finally running normally!

    The problem now is that my subdomain is still calling the original blog. When I try to run install.php on the subdomain.domain.com, it calls up http://domain.com and says that I’ve already installed WP. I’m looking back (and back) in the comments for a similar issue, but any advice you may have in the meantime would be much appreciated.

  172. #172 | Posted May 6, 2008 at 6:08 am

    More info: currently have 2 VUSERs, the subdomain and the domain, and 2 mb-config files, one for each, with the domain on top. So I can’t figure out what I’m doing wrong…

  173. bobby_drk
    #173 | Posted May 7, 2008 at 12:29 pm

    Thank you for your work.

    This is almost exactly what I’ve been looking for. I would really like to set this up so that if a person logged into one blog they would be logged into all of them. Have you ever done this or heard of anyone who has?

  174. #174 | Posted May 7, 2008 at 3:27 pm

    Bobby — I would like this myself. I’ve looked into it, but I believe it would be quite a bit of work to implement.

    There is a method built-in to WordPress that allows you to share user tables between blogs, but it doesn’t automatically give a user of one blog a “role” in the other blogs. That part would have to be coded into a plugin.

    I’m checking into it.

    [Update: I think you put the following in your config file:

    define('CUSTOM_USER_TABLE', 'wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

    Again, I believe this will show users in the various blogs, but they will have no rights.]

  175. bobby_drk
    #175 | Posted May 7, 2008 at 5:41 pm

    I’ve defined user and the usermeta table’s before. It’s doesn’t work as smooth as I was hopping because just like you said they don’t have a role.

    I started working on list of code that I needed to change to get this functionality, but it involves hacking wp code which means every time I upgrade I have to go in and make all these changes. I decided that wasn’t the correct way.

    Thank you for your help. I’ll continue in my search for ultimate happiness or in other words single login.

  176. #176 | Posted May 7, 2008 at 5:51 pm

    Bobby — it’s incomplete, but this might prove useful:

    http://www.lyonesse.info/WPP/

    Let me know what you figure out!

  177. #177 | Posted May 7, 2008 at 6:11 pm

    [...] der zugrundeliegenden WordPress-Variante mit sich bringt. Relativ gut umsetzbar wirkt hingegen der Virtual Multiblog-Ansatz von Strider. Aber auch das erschien mir auf einen ersten schnellen Blick hin mit dem zu [...]

  178. #178 | Posted May 8, 2008 at 2:15 pm

    If you can get multiblog working with bbpress, that would be great! I’ve started creating so many of these wp/bbpress installations for clients that I’m getting a headache thinking about having to maintain and upgrade them for everyone. I’m going to tinker with it a bit and report back if I have any success.

  179. Lyle
    #179 | Posted May 12, 2008 at 3:09 pm

    Hi Strider,
    Does Multiblog work with WP 2.5.X?
    Thanks for the work.
    Lyle

  180. Aaron
    #180 | Posted May 21, 2008 at 11:01 am

    Hi,

    is it possible to change the table prefix to not include the hostname. currently it names the tables ‘wp_hostname_blogname_tablename. Could you tell me where I can remove the addition of the hostname? please.

  181. #181 | Posted May 21, 2008 at 12:16 pm

    Aaron –

    Create individual config files and you can set table prefix. See Advanced Setup in the readme.

    (In Easy Setup, it uses the hostname because that was the best way I could think of to ensure unique and identifiable prefixes.)

  182. Aaron
    #182 | Posted May 21, 2008 at 2:14 pm

    Thanks Strider. Great Plugin!

  183. Aaron
    #183 | Posted May 21, 2008 at 3:42 pm

    Hi Stider,

    I’ve setup the two seperate config files which are located in the multiblog dir below wp-content, but I’m now getting the “OH NO!” error.

    Here is my current setup:

    host: localhost
    virtual host: localhost/subdirname/
    second blog: localhost/subdirname/blog/
    symlink: second blog -> virtual host
    first congif file: wp-config-localhost_subdirname
    second config file: wp-config-localhost_subdirname_blog

    Any idea what might be happening?

    Thanks for any input.

  184. #184 | Posted May 21, 2008 at 4:08 pm

    Aaron –

    edit wp-config.php and turn on the diagnostics. This should modify the “Oh No” page to show info that may prove helpful (and write it to your PHP logs as well). Look at the VUSER especially.

  185. #185 | Posted May 24, 2008 at 1:01 pm

    [...] I introduce you to Stephen Rider’s Virtual Multiblog based on Allan Mertner’s original [...]

  186. #186 | Posted May 26, 2008 at 10:37 pm

    Was searching around for this exact same thing and had a question. May be am missing something obvious.

    One solution I’ve seen is to modify the $table_prefix line in wp-config and put the code below

    //Get host name
    $hostname = $_SERVER['HTTP_HOST'];
    $hostname = str_replace(‘www.’, ”, $hostname);

    // Clean up hostname and generate a unique prefix
    $table_prefix = ereg_replace(‘\.’, ”, $hostname);
    $table_prefix = ereg_replace(‘\-’, ”, $table_prefix);
    $table_prefix = $table_prefix . ‘_’;

    //Exceptions and consolidations
    if ($table_prefix == ‘sajin_’ || $table_prefix == ‘somethingcom_’) $table_prefix = ‘def_’;

    This seems to be fairly straight forward and simple, with the limitation (or advantage) of having the exact same code/theme/plugin base (but can activate as preferred per blog).

    Apart from this, is there any other problem this sort of a solution could lead to?

  187. #187 | Posted May 29, 2008 at 11:29 am

    Sajin — What you’re doing is very similar to what this sytem does. However, I believe you’re better off using $_SERVER['SERVER_NAME'] instead of $_SERVER['HTTP_HOST']

    See the comments on this post

  188. #188 | Posted June 11, 2008 at 7:36 am

    Hi, I’m finding this rather difficult to set up (sorry!).

    What I’ve done is I have one site (a linux server) with its main name blogsbykristarella.nfshost.com (I don’t really want to use this, I just have to give the site a name). Then it has two aliases (haiku.kristarella.com and schizography.kristarella.com), which is where I want my blogs.

    The WP files are in the root directory, I’ve got 3 databases for each of the above addresses and I’ve set up VUSERS and made separate wp-config files for them all.

    WP is installed at the main site with the plugin activated (when I activated the plugin it took me back to the install page and it reinstalled WP – that seemed weird).

    WP appears to be installed on schizography (even though I didn’t try to install that one yet) and it won’t connect to the database on haiku.

    I hope it’s obvious what I’ve done wrong; I just don’t know enough about Apache etc to know what it is.

  189. #189 | Posted June 11, 2008 at 3:00 pm

    I also had a problem with TinyMCE, after some investigation, I found that my problem was the javascript could not be loaded, this was confirmed by trying to view the javascript for TinyMCE (in my case: http://terrential.com/wp-includes/js/tinymce/tiny_mce_c..., try changing it to suit your domain)

    There was no javascript, turns out that when loading wp-config.php, wp-settings.php is called and code starting on line 229 gets called:

    if ( !is_blog_installed() && ……

    I commented out this block of code and TinyMCE started working again. Magic.

    Only thing is, when I need a new blog setup, I have to uncomment the block of code, setup new blog, re-comment it to use TinyMCE. Having said that it’s still a wonderfully simple system to use.

  190. #190 | Posted June 12, 2008 at 2:56 pm

    [...] much searching I found Stephen Rider’s Virtual Multiblog, which was recommended by Alex Tran. It didn’t seem like too much trouble, perhaps a bit more [...]

  191. #191 | Posted June 13, 2008 at 11:49 pm

    How do I configure this to have the data placed in one set of tables instead of a complete set of tables for each blog?

  192. #192 | Posted June 14, 2008 at 7:16 am

    Terry — thanks for the detailed information. I’ll check into it.

    Matthew — If you use the same exact set of tables, it will be the same blog, by definition. If you mean using the same database, you simply need to set a different $table_prefix for each.

  193. #193 | Posted June 14, 2008 at 7:22 am

    Terry — Actually, try out the new version 2.3 — I suspect it might fix this problem. Please let me know.

  194. #194 | Posted June 16, 2008 at 11:28 am

    Great system, Stephen! I’ve got a tricky problem … complicated by the fact that I am also switching hosts as I set-up your system.

    Last night, I had everything working/resolving properly under the new Media Temple host site: http://willowglenextra.com.s42928.gridserver.com URL, with symlinks and a few redirects all working properly.

    So, I updated the DNS files on my old host. Now the main http://willowglenextra.com file renders a blank page. But the subdomains (elva.willowglenextra.com, etc…) all work fine. So do the entirely different domain URLs that run off this system. Email works just fine, too.

    Thoughts?

  195. #195 | Posted June 16, 2008 at 10:16 pm

    Hi, Stephen … I left a comment earlier (got into your anti-spam queue I think [fixed --ed.]), but now I have more info.

    I have set-up your VMB system, and it works great, except that I cannot get the URL http://www.WillowGlenExtra.com to render anything other than this error message:

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/c02/h06/mnt/42928/domains/willowglenextra.com/html/wp-content/themes/wgx-illacrimo/functions.php:24) in /nfs/c02/h06/mnt/42928/domains/willowglenextra.com/html/wp-includes/pluggable.php on line 694

    WillowGlenExtra.com (w/o the www) works fine, as do all of the Admin pages now.

    So, I have isolated the problem to the functions.php file in my theme:
    http://www.lifespy.com/2007/wordpress-theme-illacrimo-w...

    When the functions.php file from the theme folder, everything renders fine (except I then don’t have sidebar widgets, which I’d obviously like to have back).

    I’ve stripped out everything from the file except for this, and I get the same message:

    ‘Sidebar_left’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));

    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(
    ‘name’ => ‘Sidebar_right’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));
    ?>

    Any help is APPRECIATED! Thanks!

  196. #196 | Posted June 17, 2008 at 3:43 pm

    David — Version 2.3 came out a couple days ago. Are you using that, or the previous version? There is some code cleanup that might help with this issue.

    I don’t know what’s causing it, but I suspect it may be something obscure on my end, as people using my pull-quotes plugin also have header load issues. I can’t imagine what either piece of software might be doing to cause such a thing, so I’m a bit flummoxed by it all.

    When I get to my dev computer I’ll try out your theme and see if I have the same proble,.

  197. #197 | Posted June 17, 2008 at 3:51 pm

    Hi Strider

    It does seem like v2.3 seems to fix the prob, job well done.

  198. #198 | Posted June 17, 2008 at 7:32 pm

    Thanks for checking …. but alas, I am running v2.3

    I’ll keep sleuthing, but I am certain it’s part of that functions.php file versus pluggable.php. Other sites running other themes have no issues, in fact run beautifully.

  199. #199 | Posted June 17, 2008 at 10:15 pm

    Solved! … it’s always the simplest thing, right ….

    apparently there were spaces or some such gibberish in the Illacrimo functions.php file. I cleaned it up, deleted and retyped some stuff here and there … and now it works.

    Your VMB system is great! and now seems to work perfectly for me.

  200. #200 | Posted June 18, 2008 at 1:10 pm

    Hi Strider

    It seems I spoke too soon when I thought that the upgrade to v2.3 fixed the TinyMCE issue, it still stands :(

    I don’t think I emptied my cache yesterday before replying!

    commenting out the offending code does solve the problem though.

  201. Jeff
    #201 | Posted June 18, 2008 at 2:39 pm

    Strider,

    LOVE this system! It’s exactly what I have been searching for. I have one question concerning themes.

    Let’s say I have a multi-blog setup with two domains. Domain1.com uses a custom theme that I don’t want the admin from Domain2.com to see and vice-versa. Is there a way to make themes visible in the admin interface only to certain VUSERS?

    Any help you could provide would be appreciated, thanks.

  202. #202 | Posted June 18, 2008 at 10:15 pm

    Jeff — Not that I know of. You might check into some way of giving WordPress a custon theme folder. If that’s possible I suppose you could set that differently for different blogs. Don’t ask me how though….

  203. #203 | Posted June 19, 2008 at 7:45 pm

    I love the idea of this multi-blog. I will use it for website hosting instead of blogging. Thanks for the comment and temp fix of the tinymce error above. I was getting the error. If anyone knows a good fix — please post.

  204. David Mohr
    #204 | Posted June 25, 2008 at 3:38 pm

    Nice script, but version 2.3 had some bugs for me, as the vuser was not determined correctly. See the patch below which fixed the problem for me.

    — /nfs/home/home1/dmohr/src/wordpress-multiblog/vmb-functions.php 2008-06-13 07:54:10.000000000 -0600
    +++ vmb-functions.php 2008-06-25 14:36:29.000000000 -0600
    @@ -124,7 +124,7 @@
    if ($rootpath == null ) {
    if ( defined( ‘VUSER’ ) ) return VUSER; // No need to repeat work!
    } else {
    - $rootpath = dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ); // should never happen, but never say never….
    + $rootpath = dirname( $_SERVER['SCRIPT_NAME'] ); // should never happen, but never say never….
    }

    if ( substr( $rootpath, -4 ) == ‘.php’ ) {
    @@ -135,11 +135,11 @@
    $roothpath_dirs = explode ( “/”, $rootpath);
    $rootpath = ”;
    foreach ($roothpath_dirs as $dir) {
    - $rootpath .= ‘/’ . $dir;
    if ( $dir == ‘wp-admin’ ||
    $dir == ‘wp-content’ ||
    $dir == ‘wp-includes’
    ) break;
    + $rootpath .= ‘/’ . $dir;
    }
    $rootpath = substr( $rootpath, 1 ); // again, remove leading slash

  205. LB
    #205 | Posted June 25, 2008 at 4:19 pm

    Strider,
    LB here, back with another question… I’ve had 3 blogs up and running for a bit now using your system and they’re working great. there’s set up as such:
    http://www.example.com
    http://www.example.com/blog1
    http://www.example.com/blog2

    My question for you now is – do you know of any way to allow one of the blogs (www.example.com) to display the posts of the other blogs (blog1 & blog2)? I’ve played around with RSS to do it and that works to some extent but with less flexibility than I’d like.

    I’m wondering if it’s possible to play with the PHP to allow one blog to directly access the tables and/or databases of the other blogs… Again my understanding of PHP is very limited, so if this is a stupid question I apologize.

  206. #206 | Posted June 25, 2008 at 4:43 pm

    David — Thanks for the info.

    LB — There is no way at present. I’ve been planning something like this for a while now (Actually, I was looking at listing _pages_ from other blogs). You’ll notice that I use RSS myself in the sidebar of this site to list “geek” posts from my main blog.

  207. #207 | Posted July 2, 2008 at 9:34 am

    Strider,

    [edited by admin to clean up typos in URLs]

    Was trying to implement your MB on my existing WP blog to facilitate those that would like to add a blog to compliment mine.

    As an experiment to see if I could understand how to set this up, I went about following the readme.

    Now what I’m looking at doing is having blogs in sub-directories of my blog, located at http://trials.stelth2000inc.com .

    Now, if I’m understanding the readme correctly all I have to do is create a symbolic link in the wp install directory to house the new blog.

    current blog installed in /var/www/trials
    symbolic link: ln -s . ineyeri done inside of /var/www/trials
    (FYI: I am on a linux machine running latest PHP and Apache2 versions)

    I have the mb-autoconfig.php file with all of my db info, mb-users.php with the following info inside:

    $vusers[] = ‘trials.stelth2000inc.com’;
    $vusers[] = ‘trials.stelth2000inc.com/ineyeri’;

    and individual conf files for each:

    mb-config-trials_stelth2000inc_com.php
    mb-config-trials_stelth2000inc_com_ineyeri.php

    in each, I have the necessary db info (which are the same since I’m going to use the same db for any additional blogs) with the $table_prefix specified as needed:

    trials.stelth2000inc.com = wp_
    trials.stelth2000inc.com = ine_

    as I didn’t already have an .htaccess file, I created one an put the following information inside:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} (/ineyeri)?/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . %1/index.php [L]

    Problem I am having is when I go to http://trials.stelth2000inc.com/ineyeri it brings up my main blog. I don’t get no install or anything. By going to http://trials.stelth2000inc.com/ineyeri/wp-admin/instal... I get the install and will install the additional tables with the ine_ prefix. Just when it is done, I get the infinite loop indicated by my Firefox browser.

    Here is the MB diagnostics output from http://trials.stelth2000inc.com

    Virtual Multiblog Diagnostics
    WordPress version: 2.5.1
    Multiblog version: 2.3
    Multiblog Plugin version: 2.3
    PHP version: 5.2.6-1
    MySQL version: 5.0.51a-3-log
    ABSPATH: /var/www/trials/
    VUSER: trials.stelth2000inc.com
    $_SERVER['SERVER_NAME']: trials.stelth2000inc.com
    $_SERVER['PHP_SELF']: /wp-admin/index.php
    $_SERVER['HTTP_HOST']: trials.stelth2000inc.com
    $_SERVER['SCRIPT_NAME']: /wp-admin/index.php
    $_SERVER['DOCUMENT_ROOT']: /var/www/trials
    End Diagnostics

    If you could help me figure out where I’m going wrong in trying to set this up, it is greatly appreciated. I thank you in advance for the assistance and coming up with a streamlined way to keep one install for multiple blogs.

    -Dustin

  208. #208 | Posted July 2, 2008 at 11:28 am

    If you use Virtual Multiblog, please read this important note regarding WordPress 2.6.

  209. LB
    #209 | Posted July 3, 2008 at 7:08 pm

    Strider,
    I noticed that the secret_key field is missing from the wp-config file after installing VMB. I see that it’s also not in any of the mb-config files either. Did you take it out because it causes a problem with your system?

    I’m trying to add bbPress to run a forum with my blog and integration requires that secret key. So will it cause issues with VMB if I add that field back into the wp-config file or any of the mb-config files? If i can add with no problems, which file would you suggest adding it to? I’m guessing one (or all) of the mb-config files or in the mb-autoconfig…

    Please advise. Thanks.

  210. #210 | Posted July 3, 2008 at 9:35 pm

    LB — They’re in the Config files. You can put it in the Autoconfig or the individual files.

  211. #211 | Posted July 3, 2008 at 9:49 pm

    Dustin –

    I looked at your site. The first thing I noticed is that if I go to the ineyeri directory, it’s the same site, but I’m _not_ redirected to the root. Are you setting a DEFINE for the URL in your config? Normally if you access the same database info you would be sent back to the root.

    If I had to guess, I would think that 1) You are using the same table prefix, so both “installs” are looking at the same set of tables, BUT… 2) You’ve defined WP_SITEURL which is why it’s showing that same blog in two different places rather than redirecting to one or the other.

  212. #212 | Posted July 4, 2008 at 1:26 am

    Ok, right now the only thing on my database is my main blog. To my knowledge I don’t have WP_SITEURL defined anywhere. The wp-config file that I am using is what is in with your zip file. I renamed my own with a .bak extension.

    Contents of wp-config.php:

    
    get_sysinfo('configpath') . 'mb-users.php' );
    
    require_once( $vmb->get_bloginfo( 'config', true, $_SERVER['SCRIPT_NAME'] ) );
    
    if( empty( $table_prefix ) ) $table_prefix  = 'wp_' . $vmb->clean_vuser() . '_';
    
    if ( $vmb->get_sysinfo('diagnostics') == true ) error_log( $vmb->diagnostics( false ) );
    
    require_once( ABSPATH . 'wp-settings.php' );
    
    ?>
    

    The contents of mb-autoconfig.php:

    Contents of mb-config-trials_stelth2000inc_com.php

    Contents of mb-config-trials_stelth2000inc_com_ineyeri.php

    Contents of mb-users.php:

    I hope that providing you with this information will help you help me.

    -Dustin

  213. #213 | Posted July 4, 2008 at 1:29 am

    Heh, typo in my url when you hover over my name in the comment box. I missed typing one of my 0 (zeros) and it doesn’t seem like comments take too kindly to code. If you need me to email directly let me know.

    -Dustin

  214. #214 | Posted July 4, 2008 at 11:53 am

    Dustin — try it again.

    Wrap all code in the following:

    <pre><code lang="html">
     ...
    </code></pre>

    You should not need to escape your <>s within code tags if the lang attribute is set to “html”.

  215. #215 | Posted July 4, 2008 at 12:00 pm

    Dustin –

    Use autoconfig or the individual config files. Using both doesn’t make sense in your context. If you want to choose your own table prefixes, use the individual configs.

    The system does _not_ take some info from auto and then more from the specifics. Maybe the problem lies there?

  216. #216 | Posted July 4, 2008 at 4:23 pm

    Ok, I will try this again.

    Contents of wp-config.php:

    get_sysinfo('configpath') . 'mb-users.php' );

    require_once( $vmb->get_bloginfo( 'config', true, $_SERVER['SCRIPT_NAME'] ) );

    if( empty( $table_prefix ) ) $table_prefix = 'wp_' . $vmb->clean_vuser() . '_';

    if ( $vmb->get_sysinfo('diagnostics') == true ) error_log( $vmb->diagnostics( false ) );

    require_once( ABSPATH . 'wp-settings.php' );

    ?>

    The contents of mb-autoconfig.php (after reviewing your last comment renamed to mb-autoconfig-sample.php):

    Contents of mb-config-trials_stelth2000inc_com.php:

    Contents of mb-config-trials_stelth2000inc_com_ineyeri.php:

    Contents of mb-users.php:

  217. #217 | Posted July 4, 2008 at 4:24 pm

    wrapped those up in the tags you said… and i phailed :\

  218. #218 | Posted July 4, 2008 at 4:33 pm

    I have just retyped everything into a text document that can be viewed here: http://trials.stelth2000inc.com/temp/configs.txt

  219. #219 | Posted July 4, 2008 at 7:29 pm

    Just testing folks…

    
    <?php some_ugly_code() {
    with "quotes" and
    \slashes\ and
    <brackets> and
    \"slashed quotes\"
    ?>
    
  220. #220 | Posted July 7, 2008 at 2:17 pm

    Hi
    I am excited with this software, BUT, am confused where to start.

    I want to have a professional blog and then a personal blof, both hosted by me. However, so I upload the zip file into plugins or where as there’s no readmefirst file in there.

  221. #221 | Posted July 9, 2008 at 11:51 pm

    Gerry — there is indeed a readme file in the download: multiblog-readme.htm

  222. #222 | Posted July 10, 2008 at 12:09 am

    Version 2.4 is up. This fixes some important bugs that might have prevented things from working; so if you’re having trouble, give 2.4 a go.

    Details are here. Recommended reading — especially the bit about the plugin, or lack thereof.

  223. pixelgecko
    #223 | Posted July 10, 2008 at 3:52 am

    2.4 seems to be missing the plugins folder. is this no longer necessary?

  224. pixelgecko
    #224 | Posted July 10, 2008 at 3:53 am

    never mind – sorry, i missed the “recommended reading.”

  225. pixelgecko
    #225 | Posted July 10, 2008 at 4:25 am

    my problem might not be related to the update. i’ve successfully set up my blog (www.domain.com). however, my symlinks don’t seem to be working properly. i have http://www.domain.com/blog2, http://www.domain.com/blog3, etc. and when i’m ready to set things up in wordpress, i get the 403 forbidden error. might the symlinks need their permissions setting changed? if so, what’s the right permissions for the symlinks? i get this message:

    Forbidden
    You don’t have permission to access /blog2 on this server.

    any ideas?

  226. pixelgecko
    #226 | Posted July 10, 2008 at 4:36 am

    I asked my hosting customer support about this, and this is what they told me:

    “The reason for the 403 error in this case is that the owner of your “www” folder is not the same as the owner of the symlink. The owner of the “www” folder is “root”, and the owner of the symlink is your own user. There are two ways to resolve this problem:
    1) Change the document root folder of your main domain to a subfolder in your /www/www/ folder. This can be set up from the Subdomains section in your CP. Once you set the document root folder to another folder, it will be owned by you, so the issue will be resolved.
    2) Disable the “SymLinksIfOwnerMatch” option, which is the actual cause of the “Forbidden” error. This can be done by placing the following line in a .htaccess file:
    Options -SymLinksIfOwnerMatch +FollowSymLinks
    Please note that disabling this option may bring potential security risks to your account, depending on the software you are using. That is why it is turned on by default.

    does this help shed any light on what the problem might be?

  227. #227 | Posted July 10, 2008 at 7:14 am

    I can confirm that the patch mentioned in comment 204 by David Mohr was required for getting my WordPress 2.5 to recognize blogs hosted in separate subdirectories (done using linux symlinks).

  228. #228 | Posted July 10, 2008 at 7:34 am

    Tarmo — I recommend the regular v2.4 over David’s patch. He identified two trouble spots, but one of his fixes is more of a kludge than a true fix. (That comment in the code that says “this should never happen” is telling the truth….) Then again, ID-ing the trouble is the hard part, innit?

  229. #229 | Posted July 10, 2008 at 7:36 am

    Pixelgecko — I think your hosts know their own system better than I possibly can. Listen to them. :) Either of those fixes will probably help.

  230. #230 | Posted July 16, 2008 at 9:25 am

    Stephen – I upgraded one of my wordpress blogs to 2.6 yesterday and decided it was a good time to try out your Virtual Multiblog. Once I gave up trying to locate the main blog at the domain name and gave it its own virtual subdirectory (named ‘main’ of course), I got it working just fine. I did replace the ‘secret key’ in the individual config files with wp2.6′s 3 auth keys and set the HOME and SITEURL in each config file. Since the main.notmymothersblog.com subdirectory is first, anything that’s not defined in the mb-users.php file automatically defaults to that, including http://www.notmymothersblog.com, which is exactly the behavior that I wanted.

    Since all the blogs share a common set of themes (and I use a heavily modified theme), getting a common look across all the blogs was as easy as activating the right theme – but I can change the sidebars by rearranging widgets in each blog without affecting any of the other blogs. This totally rocks!

  231. #231 | Posted July 16, 2008 at 12:23 pm

    Well Deb, I’m glad its worked for you as somehow it didn;t for me. this is what I got:

    Warning: require_once(/home/users/uks40463/html/bojac.co.uk/blog/wp-content/multiblog/vmb-functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/users/uks40463/html/bojac.co.uk/blog/wp-config.php on line 25

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/users/uks40463/html/bojac.co.uk/blog/wp-content/multiblog/vmb-functions.php’ (include_path=’/usr/local/lib/php:./’) in /home/users/uks40463/html/bojac.co.uk/blog/wp-config.php on line 25

    Any advice would be appreciated.

    I am trying to run 2 blogs:
    http://www.bojac.co.uk/blog (where all the WP files are in the /blog folder) and
    http://www.bojac.co.uk/rcnblog

    I’m doing something wrong, HELP!!!!!!!!

  232. Mark
    #232 | Posted July 16, 2008 at 12:59 pm

    Hi Strider,
    I installed V2.3 last month & despite reading every post & FAQ, each new blog directory was a replica of the original & the WP install page just told me that WP was already installed.

    Today I thought I’d have another crack at it & installed V2.4. Also installed separate config files using same DB & removed mb-autoconfig file. These were installed in main blog-multiblog-config directory.
    Individual blog tables now show up in single DB in phpmyadmin.

    Now each blog still looks like the original but I can install WP. So after install/login I see a new default dashboard with a multiblog tab. So far so good!
    The problem is, that after creating a test post, the visit site button shows me the original blog but at the correct VUSER address.
    I’m using a standard WP .htaccess file located in the root directory (myecovideo) as the blog has own directory.

    Virtual Multiblog Diagnostics
    Version………………. 2.4
    VUSER………………… myecovideo.com/espana
    Config File…………… mb-config-myecovideo_com_espana.php
    WordPress version……… 2.5.1
    ABSPATH………………. /home/coralbne/myecovideo.com/blog/
    PHP version…………… 5.2.6
    MySQL version…………. 5.0.51a-community
    $_SERVER['SERVER_NAME']… myecovideo.com
    $_SERVER['PHP_SELF']…… /espana/wp-admin/index.php
    $_SERVER['HTTP_HOST']….. myecovideo.com
    $_SERVER['SCRIPT_NAME']… /espana/wp-admin/index.php
    $_SERVER['DOCUMENT_ROOT']. /home/coralbne/myecovideo.com
    End Diagnostics

    Ideally, I would like to keep the original blog’s theme, layout, plugins, widgets etc & just replace the posts with new posts for that specific blog.
    My aim is to have 4 blogs that are clones of the original, but with their own posts.

    Any help to clear this final hurdle would be greatly appreciated.

    Thanks, Mark

  233. #233 | Posted July 16, 2008 at 1:30 pm

    @Gerry — The file /blog/wp-content/multiblog/vmb-functions.php is missing. Maybe you put the /multiblog/ folder in plugins by mistake? It should be in /wp-content/.

  234. #234 | Posted July 16, 2008 at 1:40 pm

    @Mark — Are you using “pretty permalinks”? If you are, you need to change the .htaccess.

    Turn off permalinks and see what happens. Also, see the section on permalinks in the readme.

  235. #235 | Posted July 16, 2008 at 3:11 pm

    @ Stephen
    h! Its not in the 2.4 download! Might be the problem! Can I get an earlier version somewhere?

  236. #236 | Posted July 16, 2008 at 3:22 pm

    Gerry — It is the 2.4 download. Unzip the file and you have the multiblog folder.

    When I visit your URL I see the VMB “can’t find the config” screen, so VMB is running. Have you set up the config file at bojac.co.uk/blog/wp-content/multiblog/config/ ?

  237. #237 | Posted July 16, 2008 at 3:27 pm

    @ Stephen
    Have downloaded a fresh version and viola – have success:

    Virtual Multiblog

    Virtual Multiblog Diagnostics
    Version………………. 2.4
    VUSER………………… bojac.co.uk/blog
    Config File…………… mb-autoconfig.php
    WordPress version……… 2.5.1
    ABSPATH………………. /home/users/uks40463/html/bojac.co.uk/blog/
    PHP version…………… 5.2.0
    MySQL version…………. 4.0.21-log
    $_SERVER['SERVER_NAME']… bojac.co.uk
    $_SERVER['PHP_SELF']…… /blog/wp-admin/index.php
    $_SERVER['HTTP_HOST']….. bojac.co.uk
    $_SERVER['SCRIPT_NAME']… /blog/wp-admin/index.php
    $_SERVER['DOCUMENT_ROOT']. /home/users/uks40463/html/bojac.co.uk
    End Diagnostics

    Now I want to get http://www.bojac.co.uk/rcnblog going do I do the same again? Thanks, sorry if I’m being basic, but its a tad more complicated than I originally thought.

  238. #238 | Posted July 16, 2008 at 4:42 pm

    @Gerry — In your root directory, make a symbolic link named “rcnblog” that points to the folder where you have WordPress installed. There will be no actual folder with that name — the symlink will act as a folder with all the same files in it.

    That should be it. Browse to /rcnblog/ and run the WP setup.

  239. #239 | Posted July 16, 2008 at 9:00 pm

    @Mark

    I used a subdomain setup (blogname.notmymothersblog.com) rather than folders, but had the same problem until I uncommented and defined the $HOME and $SITEURL variables in the individual mb-config files as blogname.notmymothersblog.com.

  240. Mark
    #240 | Posted July 17, 2008 at 3:55 pm

    I’m going around in circles here. I can install new blogs, & access new dashboard but when I access the site I keep getting the original blog at the new address.

    @Stephen – thanks, but I’m using default permalinks & am using your version of htaccess with new blogs added.

    @Deb – thanks for that tip, I have done as you suggested, but with no luck.

    I did discover a mistake I’d made in the mb-users file, I’d changed the examples to my blog addresses, but had failed to uncomment them by removing the //marks in front of them. So my individual config files were not working. Now fixed!

    Where does the new dashboard come from after the install & where are the default files & themes hiding?

    Am I missing something basic? All my individual config files are in the main blog/wp-content/mb/config folder together with the mb-user file. I’ve replaced the wp-config file & htaccess file. I’m not using an mb-autoconfig file.

    If you have any ideas, please let me know.

    Thanks, Mark

  241. #241 | Posted July 17, 2008 at 7:01 pm

    @mark

    Orson Welles (as Citizen Kane) clapping his hands

    First, a question. Do you actually have a folder set up for rcnblog? There should be NO FOLDER for it. When I browse to either http://www.bojac.co.uk/rcnblog/ or rcnblog.bojac.co.uk I get a Index of Directory page. I did the same thing – it took me a while to wrap my head around the fact that I could create a subdomain without creating a folder for it.

    Meanwhile, here is what I did with the config and users files – see if it helps at all to have a direct example:

    In the mb-users.php file:
    $vusers[] = ‘main.notmymothersblog.com’;
    $vusers[] = ‘moms.notmymothersblog.com’;

    // OPTIONAL: If using subdomain (“dog.example.com”) addresses with
    // one domain, set $mydomain to the domain name —
    // e.g. ‘example.com’ — and then you only need set the subdomain
    // (‘dog’) in $vusers[];

    // You may only set one $mydomain.

    $mydomain = ”;

    In the mb-config-moms_notmymothersblog_com.php file:

    // Optional. Try setting these if you’re having trouble with redirects
    define(‘WP_SITEURL’, ‘http://moms.notmymothersblog.com’);
    define(‘WP_HOME’, ‘http://moms.notmymothersblog.com’);

    Finally, to answer “where are the files hiding?”, there is only one set of files, no matter how many virtual blogs you set up. You upload those files to a directory and create a virtual host for each blog that you want to run and point the virtual host at the folder where you uploaded the blog files. There are no other files needed, and no other folders. All the installation does is create and set up the database tables for a new blog. As long as your config file points to the right database (and/or the right table prefix) you should be fine. I suspect having a folder with the name of the directory or folder may confuse the code, and when it can’t decide what it should do, it defaults to the first blog.

    I’ll post a quick troubleshooting checklist in a separate comment.

  242. #242 | Posted July 17, 2008 at 7:20 pm

    Troubleshooting Checklist:

    1. Do you have folders set up for subdomains or directories? If so, remove them.

    2. Are the tables for your new blog created on the right database (or with the right table prefix if you’re using a single table)? If not, check the connection information and table prefix in the individual config files.

    3. Does your mb-config-subdomain_yourdomain_com.php file have the right database connection information if you’re using separate databases?

    4. Does your mb-config-subdomain_yourdomain_com.php file point to the right table prefix for each blog?

    5. CHECK THE TABLE PREFIXES CAREFULLY. Are they the same as the ones in your config file? I had problems with extra underscores.

  243. #243 | Posted July 18, 2008 at 12:32 pm

    Mark –

    Okay, it looks like you’re trying to do the main domain, plus /espana/. I have to say that it’s weird that the exact content is repeating at the two addresses. Normally I would expect espana to be redirecting to the root domain. I suggest you un-set WP_SITEURL and WP_HOME if you have them set. That could be obscuring something else.

    Here’s why: WordPress stores its own base URL in the database, so if a second install accesses a different blog’s tables, it will usually read the URL out of the DB and redirect to the blog that “owns” those tables. Setting those two constants can override that, which could result in the strangeness we’re seeing on your site.

  244. Mark
    #244 | Posted July 19, 2008 at 7:13 am

    Stephen –
    I’v tried to include below, as much info as possible to help locate the source of the problem.
    I have un-set WP_SITEURL and WP_HOME, there is no noticable difference.
    // Optional. Try setting these if you’re having trouble with redirects
    // define(‘WP_SITEURL’, ‘http://www.myecovideo.com/espana’);
    // define(‘WP_HOME’, ‘http://www.myecovideo.com/espana’);

    All four additional blogs are installed, but I’m focussing on espana, as what works for one should work for all.

    I have my main blog in a directory (named blog) of myecovideo.com. The symlinks (created by my host) are directories within myecovideo.com & point to directory blog. Each symlink replicates the contents of the directory blog including plugins etc.
    See tree image here: http://www.myecovideo.com/File-tree.png

    If I remove myecovideo.com/blog from mb-users.php & remove mb-config-myecovideo_com_blog.php from main blog mb-config file, then both main blog & espana open as new ‘Hello World’ blog pages for australia which is now top of VUSERS list.
    $vusers[] = ‘myecovideo.com/blog’;
    $vusers[] = ‘myecovideo.com/australia’;
    $vusers[] = ‘myecovideo.com/deutschland’;
    $vusers[] = ‘myecovideo.com/espana’;
    $vusers[] = ‘myecovideo.com/norge’;

    I can log into new dashboard of each new blog, which I think shows that DB table prefixes are set correctly. If (as a test) I change the table prefix in the config file, I’m asked to make a new install.
    When I click the ‘visit site’ button, each blog loads the main blog.

    Virtual Multiblog Diagnostics – Main blog
    Version………………. 2.4
    VUSER………………… myecovideo.com/blog
    Config File…………… mb-config-myecovideo_com_blog.php
    WordPress version……… 2.5.1
    ABSPATH………………. /home/coralbne/myecovideo.com/blog/
    PHP version…………… 5.2.6
    MySQL version…………. 5.0.51a-community
    $_SERVER['SERVER_NAME']… http://www.myecovideo.com
    $_SERVER['PHP_SELF']…… /blog/wp-admin/index.php
    $_SERVER['HTTP_HOST']….. http://www.myecovideo.com
    $_SERVER['SCRIPT_NAME']… /blog/wp-admin/index.php
    $_SERVER['DOCUMENT_ROOT']. /home/coralbne/myecovideo.com
    End Diagnostics
    Virtual Multiblog Diagnostics – Symlink blog /espana
    Version………………. 2.4
    VUSER………………… myecovideo.com/espana
    Config File…………… mb-config-myecovideo_com_espana.php
    WordPress version……… 2.5.1
    ABSPATH………………. /home/coralbne/myecovideo.com/blog/
    PHP version…………… 5.2.6
    MySQL version…………. 5.0.51a-community
    $_SERVER['SERVER_NAME']… http://www.myecovideo.com
    $_SERVER['PHP_SELF']…… /espana/wp-admin/index.php
    $_SERVER['HTTP_HOST']….. http://www.myecovideo.com
    $_SERVER['SCRIPT_NAME']… /espana/wp-admin/index.php
    $_SERVER['DOCUMENT_ROOT']. /home/coralbne/myecovideo.com
    End Diagnostics

    Thanks, Mark

  245. #245 | Posted July 21, 2008 at 4:10 am

    The folder multiblog/plugin/ does not exist in the current .zip file offered for download?

  246. #246 | Posted July 21, 2008 at 4:40 am

    Nevermind… ;)

  247. #247 | Posted July 22, 2008 at 11:33 pm

    Hi

    I’m using WP 2.6 on my self administered WAMP server. Using folders (ie not sub-domains) for each blog.

    Everything works great until I try to set up the permalinks. They just return 404.

    Blogs are at:

    http://rose2/craigsmaths/
    http://rose2/craigswebs/blog/
    

    Here’s my .htaccess in the wordpress folder. It is read only and set up just as in the readme.

    RewriteEngine On
    RewriteCond %{REQUEST_URI} (/craigsmaths|/craigswebs/blog)?/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . %1/index.php [L]
    
    # BEGIN WordPress
    # END WordPress
    

    Having never used multiblog before perhaps this is a 2.6 thing?

  248. #248 | Posted July 23, 2008 at 12:32 pm

    Craig — That looks as though it should work. As a test:

    1. Remove your custom stuff from .htaccess

    2. Go into WordPress admin for one of the blogs and set up permalinks. Allow WordPress to put what it wants into your .htaccess

    3. Confirm that permalinks are working properly for that blog with default WordPress .htaccess

    [Update: When you've done this, only the one blog will work....]

  249. #249 | Posted July 25, 2008 at 5:55 am

    can I delete mb-users.php?

  250. #250 | Posted July 25, 2008 at 11:01 am

    Nick — Yes you can. VUSERs and table prefixes will be auto-generated; and it will look for config file names based on VUSER, or use autoconfig.

    See the readme if you haven’t already. :)

  251. Matthew Weaver
    #251 | Posted July 27, 2008 at 4:44 pm

    [Rec'd via email --- manually posted by admin due to comments bug]

    I may be missing this in your readme, FAQ, your content on the pages here, and the associated comment Q&As on your website, so I apologize in advance if this is a repetitive question, but how do I set up multiple virtual/aliased domains to use the same set of database tables–same posts, comments, users, etc.?

    primarydomain.com
    seconddomain.com
    thirddomain.com
    fourthdomain.com

    Wherein all share the same install, the same db tables (users, posts, comments), have different logos based on domain name (found a note on one comment about this), and then based on domain/categories (which is plugin/code I will have to write/adapt), display appropriate posts and comments. Thus, based on the domain entered, the user is given the blog with appropriate domain/category content.

    At this point I have multiblog working but unclear how to set or override the wp_ naming for each domain instance because I do not want the users, posts, and comments to be in separate tables.

  252. #252 | Posted July 27, 2008 at 4:56 pm

    Matthew — So basically what you’re describing is you want the same website at different URLs (plus some extra hacks of your own…).

    You should set the different virtual blogs to have the same table prefix. The only problem beyond that is that the database stores the blog’s URL in it, but you want the same blog different places. To overcome that, go into each blog’s config file and define WP_SITEURL and WP_HOME, e.g.:

    
    // Optional.  Try setting these if you're having trouble with redirects
    define('WP_SITEURL', 'http://primarydomain.com');
    define('WP_HOME', 'http://primarydomain.com');
    

    You should be all set.

  253. Mark
    #253 | Posted July 28, 2008 at 3:31 am

    Hi Stephen,
    Can you help me with my post #244 please?
    I’m stuck for what to try next.

    Thanks, Mark

    [site owner responded via private email]

  254. #254 | Posted July 28, 2008 at 6:09 am

    Firstly thanks for all your hard work on this project, it’s exactly what I’ve been looking for. At the moment I’m one step away from having my setup work perfectly. I have 4 blogs installed in subdomains, my users file looks like this:

    $vusers[] = ‘records’;
    $vusers[] = ‘films’;
    $vusers[] = ‘syncronisation’;
    $vusers[] = ‘streetangels’;

    $mydomain = ‘rootsydev.co.uk’;

    Each subdomain works correctly, however, if I go to http://www.rootsydev.co.uk, I get taken to records.rootsydev.co.uk, I understand that this is because records is the default installation. How can I make a separate page for the root domain? I do not need a blog here, just a single page with links to each sub-site.

    Any advice would be most greatly appreciated!

  255. #255 | Posted July 28, 2008 at 9:30 am

    Huw —

    Add $vusers[] = ‘default’; to the beginning of your vusers list.

    (Actually, because it’s the default it can be anything — “root”, or “www” or “supercalifragilisticexpialadocious”.)

  256. #256 | Posted August 1, 2008 at 1:46 am

    I wonder if this could be ported for bbpress? I could see this being just as useful there, perhaps more-so as there is no multi-site option for bbpress as of yet (like mu is to wordpress). Just an idea.

  257. pixelgecko
    #257 | Posted August 1, 2008 at 9:02 am

    I’m trying to use the VUSER constant to customize the header for each of my blogs

    domain.com/default
    domain.com/blog1
    domain.com/blog2
    domain.com/blog3

    i’m not all that familiar with php, and would like guidance on where and what to insert the appropriate code to achieve this. you mentioned something in a post above about doing this:

    <img src=”logo-.jpg”>

    do you have any idea if this worked? what i’d like to do instead is specify a different to use, based on the vuser:

    blog1 =
    blog2 =

    is this possible? i googled “multiblog vuser header” and wasn’t able to find anything that really helped. if it’s possible (and i’m sure it is), could you give me some guidance as to how to do this?

  258. #258 | Posted August 1, 2008 at 6:06 pm

    AWESOME Plugin! … Nice touch on the anti-spam quiz ;-)

    any thoughts on how to set-up different individual Favicons for each multiblog?

  259. #259 | Posted August 1, 2008 at 6:54 pm

    pixelgecko and dhkeller — You’ve basically asked the same question, and since people ask about this fairly regularly, I’ll be working up a page for it.

    Short answer: VUSER is a read-only variable, so you can use it as part of a filename to link different files for each different blog…. (You may have to clean up slashes and such… stay tuned!)

  260. #260 | Posted August 1, 2008 at 6:56 pm

    Nick — Probably pretty easily, actually.

    I don’t use bbpress though. You wanna be my tester?

  261. #261 | Posted August 4, 2008 at 8:09 pm

    Thanks for the reply. Another quick question, I’m trying to use VUSER in an if/then statement and I keep getting errors. I’m guessing this is a PHP issue:

    Neither work…

    <?php if ($vuser(‘domain.com’)) { wp_list_categories(‘include=1,3,4,5,6,7&title_li=Test Categories’) } ?>

    or

    <?php if ($vuser = ‘domain.com’) { wp_list_categories(‘include=1,3,4,5,6,7&title_li=Test Categories’) } ?>

    what is correct use of VUSER?

    Thanks!

  262. #262 | Posted August 5, 2008 at 12:05 am

    Matthew — VUSER is neither a function nor a variable. It is a constant. Try:

    if (VUSER == 'domain.com')

    (Note the double equal sign ‘==’)

  263. #263 | Posted August 11, 2008 at 3:12 pm

    HI am having problems with logging in as my password won;t reset. I understand this is due to a bug in 2.5.1 – is is possible to upgrade to 2.6?

    If not doesn anyone know how I can login and rest my password?

  264. #264 | Posted August 19, 2008 at 10:24 am

    I’m having trouble getting this working due to 403 forbidden issues. I have a directory ‘wordpress’ in /var/httpd/vhosts which MB is set up in, and which I’m symlinking to.

    What works:
    example.com/blog/ example.com/foo/ (since I can override with ‘Options -SymLinksIfOwnerMatch +FollowSymLinks

    What doesn’t:
    example.com domain.org (ie domains with the blog installed in the root)

    For these I have added (in /etc/httpd/conf/httpd.conf):

    <Directory /var/www/vhosts/wordpress>
    Options -SymLinksIfOwnerMatch +FollowSymLinks
    </Directory>
    

    and also tried

    <Directory /var/www/vhosts/example.com>
    Options -SymLinksIfOwnerMatch +FollowSymLinks
    </Directory>
    

    but I’m still getting “Symbolic link not allowed: /var/www/vhosts/example.com” errors, with a 403 Forbidden returned when I try to access the blog via http://example.com. Now I may have messed up the Apache directive or something similar, but some searching of the web has revealed nothing.

    Any help? Thanks in advance :-)

  265. #265 | Posted August 19, 2008 at 9:45 pm

    Robert — Am I understanding correctly that you’re doing two blogs in the root directory of two different domains?

    If so, you don’t need symlinks. Give both domains the same document root and you’re good to go.

  266. #266 | Posted August 19, 2008 at 9:47 pm

    Gerry — Not that this has anything to do with this system, but your best bet is to find some way to access the database directly (PHPadmin perhaps) and delete the password from that user.

    Log back in (no password) and set the password to whatever you want.

  267. #267 | Posted August 19, 2008 at 11:02 pm

    Still *love* the plugin …

    I am really struggling with Permalink issues … I don’t know if it is Multiblog, but I find that I have to “reset” the permalinks almost everyday. They work for a while, then break. Real drag for RSS feeds, not to mention all navigability.

    I have about five blogs running on Multiblog … ONLY 1 has custom links, the rest use the default. I’ve read the Permalinks section in the Readme, and tried its recommendations to no avail ….

    thoughts?

  268. #268 | Posted August 19, 2008 at 11:20 pm

    dhkeller —

    WordPress is resetting the rewrites. Set permissions on .htaccess — turn off “write” permission and then WordPress can’t change it.

    New version of VMB may fix this — I have a test version (very alpha) that alters the WP rewrites….

  269. #269 | Posted August 20, 2008 at 9:57 am

    Stephen:

    Ah, clever. Should have thought of that but I didn’t; my mind was fixated on symlinks.

    I’m actually going to be using it in three different ways – domain, subdomain and directory. The first two should work fine by pointing the DocumentRoot at the root of MB, and I’ve already tested subdirectories.

    Fantastic. If (once) I get it working, I’ll send a donation your way.

  270. #270 | Posted August 23, 2008 at 12:52 pm

    I have installed your multi blog contribution. It’s great! I’m using it at http://www.savemoney.com/tblog right now. I’m having a little trouble though. The http://www.savemoney.com/tblog throws up a multiblog error.

    Warning: stristr() [function.stristr]: Empty delimiter. in …

    The directories http://www.savemoney.com/tblog/main and http://www.savemoney.com/tblog/realestate both work correctly. Can you help me figure this out? My mb-users file looks like:

    $vusers[] = ‘main’;
    $vusers[] = ‘realestate’;
    $mydomain = ‘savemoney.com’;

  271. dndco
    #271 | Posted August 25, 2008 at 12:27 pm

    Initially I went the symlink route and ended up with the 403 error. Then I came here and read that in a similar situation to mine i.e. two domains you are to share the document root instead. So i tried that and I just get a white page. With this code underneath;

    
    < ?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */
    
    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ? >
    

    It appears as though PHP is not running but PHP and WP are working on the other domain that is in the same doc root.

    I tried the simeple and advanced with vuser setup both have the same result.

    Any ideas?

  272. #272 | Posted August 25, 2008 at 12:51 pm

    dndco — The code didn’t go through. email it to me.

  273. #273 | Posted August 25, 2008 at 7:12 pm

    dndco

    The space in the first and last lines is probably preventing the PHP from running. Other than that, you’re looking at the standard WordPress index.php

  274. dndco
    #274 | Posted August 26, 2008 at 1:27 am

    I put the space in the code because I wasn’t sure if it would be stripped out or not.

    Yes, that is the WP index.php but the server is not recognizing the PHP on the second domain which is pointing at the new shared root. The primary domain works fine. I had my host look at it an now they have basically gone backwards and made it into an alias. One domain is just pointing to the other.

    What can I have them try next? Has anyone gotten a two domain version to work? Was Robert above successful? I would LOVE to get this working!

  275. #275 | Posted August 26, 2008 at 7:17 am

    I’m wondering if VMB still has issues with WP-Cache or Super Cache? If so, do you have an idea of what is wrong? If you point me in the right direction, perhaps I can help.

  276. #276 | Posted August 26, 2008 at 7:46 am

    dndco — I have no idea why one domain would run the PHP and another would not. Probably a server setup issue. YES, plenty of people (including myself) have set this up with multiple domains pointing to a common root.

    Lan — The issue is that both blogs share a common .htaccess file. The caching plugins both change the .htaccess specifically for a particular blog, and then it doesn’t work for the other blogs. It could probably be made to work with a sufficiently clever modification of the stock WP-SuperCache rewrites, but I haven’t had time to try it much.

    If you’re looking at getting it going, you might also see about making it work with a plugin called batcache. That might be easier than the others.

  277. jz
    #277 | Posted August 26, 2008 at 12:35 pm

    Stephen:
    You asked if the information is worth 1 dollar. Yes,it is worth even more So! once I figure this out I am going to rewrite the installation directions and give you part of the proceeds from the small amount I charge. I will be better than the hours it takes to tey an figure this out and I am a programmer.

    Your answers will be grealty appreciated and anyone who wants to contribute information for different setups i.e. use of directories with sym links, subdomains or domains add to this message. Thanks jz

    I set up WordPress in a subdomain called
    news.mycarfs.com

    I also created subdomains called
    cfs.mycarfs.com
    maxima.mycarfs.com
    pwtc.mycarfs.com

    With your web browser, go to each blog and set things up as normal through WordPress. What does this mean ?

    How do I setup each subdomain for wordpress?
    How do I point the subdomain back to news.mycarfs.com

    Do I use mb_config.php if I want to use prefixes in 1 database instead of mb_auto_cinfig.php?

    When I want to go to the different blogs do I just type in the sub-domain name of the blog?

    You’re done! Told you it was easy! NO IT IS NOT THAT EASY

  278. #278 | Posted August 26, 2008 at 3:01 pm

    Lost noob needing advice. Hi — I need to have four separate blogs operating on our presbytery website (executive, associate executive, Rwanda partnership, and Disaster Assistance Teams). Virutal multiblog would be ideal for our purposes, but I am lost in the references to symlinks. If each of these blogs will be a subdomain, it looks to me from the FAQ like I don’t need symlinks, but I am not clear what I need to do after I follow the first six steps in easy set-up, which I’ve done. Do I then modify the mb-users file, or what? thanks for your help, Erin Cox-Holmes

  279. #279 | Posted August 26, 2008 at 3:30 pm

    JZ —

    Am I understanding correctly that you intend to write instructions for this system and directly charge people for them? Good luck with that.

    Writing clearly, especially on technical issues, is not an easy task. Judging from your comment, your writing needs work. Your reading comprehension is also in need of practice. To whit:

    With your web browser, go to each blog and set things up as normal through WordPress. What does this mean?

    It means open a web browser (e.g. Firefox) and go to news.mycarfs.com. WordPress will run a setup routine. Then do the same for your other subdomains.

    But in your case, you clearly don’t have the subdomains pointed to the same document root as news.mycarfs.com, because when I visit those addresses I get a HostMonster parking page. If they were pointed to the same place, I would get the WordPress setup page.

    Also, in answer to your question regarding config files, I suggest you reread the readme, especially the first sentence of Easy Setup, and around step 4 of Easy Setup.

  280. #280 | Posted August 26, 2008 at 3:41 pm

    Erin –

    1) All of your subdomains should be pointed to the directory in which you’ve installed WordPress. That is, the “document root” of each subdomain should all be the same folder, and that folder should have the WordPress files directly in it. You do not need symlinks.

    2) The “multiblog” folder should be inside the “wp-content” folder. Take the wp-config.php file out of the multiblog folder and move it up to the root folder. (If you already have a wp-config.php there, rename it wp-config-old.php.)

    3) In /wp-content/multiblog/config/, set up your mb-autoconfig.php.

    That should be it. Each address should give you the WordPress setup screen.

  281. #281 | Posted August 26, 2008 at 3:56 pm

    Just so Y’all know…

    I have a couple other pots on the fire at the moment, but I’m working on a new version of the system, and soon thereafter I intend to do a rewrite of the instructions. As I stated above, technical writing is difficult at best, and clearly there are parts of the setup that could be made more clear.

    Specifically, I think it was a mistake to try and combine subdomains and subdirectory/symlink into one example, as it clearly has many people thinking that you always use symlinks (among other confusion). To be clear: domains and subdomains don’t need symlinks; just point the different (sub)domains to the same “document root”. Symlinks are for when you want different directories with blogs in them, (e.g. “nerdaphernalia” on this site is not actually a directory, it is a symlink pointing back to the domain root.)

    Also, one issue that has messed up a lot of attempts to install this is trying to make it work alongside the WordPress method of having your blog in one place and the WordPress files in another place. It can be done, but my current instructions do NOT cover how to do it. That will be fixed as well.

    If you just want it working now, you can hire me to do it for you. Just drop me an email. Usually takes me about an hour, as I am (obviously) very familiar with the system.

    Stay tuned.

  282. jz
    #282 | Posted August 26, 2008 at 6:22 pm

    Stephen:
    I have written a lot of exact keystroke instructions fo rinstallation processes in my time and they seem to work because nobody ever said they misunderstood the directions or they did not work.
    I am trying to help not hinder so please don’t take what I said as an insult. My questions were to try and get clarity of the process that is all.
    If people DO NOT wnat to pay a small fee for easy installation instructions they do not have to. They can spend a few hours trying to figure it out. Which is worth more?

    In addiiton when I do get it figured out my intention was to send you part of the proceeds. So what is wrong with that?

    Thank you for your reply.
    JZ

  283. Erin Cox-Holmes
    #283 | Posted August 26, 2008 at 8:13 pm

    Stephen: Thanks for your previous response. It helped a lot. If I ever get this working, I’ll make a donation, and help with the install directions for subdomains.

    This is the error I am currently getting. I was having troubles getting it to see the DB, so I did a regular wp install to see if a vanilla install would work. After a couple of errors, it then told me that wp was installed and I should clear my db table. I don’t know if that has anything to do with it. (There are no contents in the db, so I could delete and put a fresh db in if it would help.)

    Error message:

    Warning: require_once() [function.require-once]: Unable to access /imedia/users/erinchlnx2/htdocs/wp-content/multiblog/vmb-functions.php in /imedia/users/erinchlnx2/htdocs/wp-config.php on line 25

    Warning: require_once(/imedia/users/erinchlnx2/htdocs/wp-content/multiblog/vmb-functions.php) [function.require-once]: failed to open stream: No such file or directory in /imedia/users/erinchlnx2/htdocs/wp-config.php on line 25

    Fatal error: require_once() [function.require]: Failed opening required ‘/imedia/users/erinchlnx2/htdocs/wp-content/multiblog/vmb-functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php:/usr/local/lib/php’) in /imedia/users/erinchlnx2/htdocs/wp-config.php on line 25

  284. #284 | Posted August 26, 2008 at 11:14 pm

    Erin –

    Quite simply, PHP is looking for a file at /imedia/users/erinchlnx2/htdocs/wp-content/multiblog/vmb-functions.php and not finding it.

    Is the multiblog folder in the wp-content folder?

  285. #285 | Posted August 26, 2008 at 11:26 pm

    JZ — it was more the attitude than the content. “NO IT IS NOT THAT EASY” after having (apparently) completely skipped a step. Talking about how good you are at writing instructions, when your comment itself was difficult to read. (Among other things, you make no distinction between a quote and your own text….)

    As for selling the instructions — the “good luck with that” wasn’t entirely snark. I don’t think you will get a lot of customers trying to sell the directions outright, but I may be mistaken. People who deal with open-source have often become accustomed to getting things for free. See what happens.

  286. #286 | Posted August 27, 2008 at 11:01 am

    This might interest you all — how to call a different header file for each blog while using the same theme: read the article.

  287. #287 | Posted August 27, 2008 at 2:39 pm

    Stephen:
    I did successfully complete the install–I put in a fresh copy of the file, then it went without a hitch.

    New question: I now have 4 blogs set up. Kiskiblog.kiskipby.org will be the main blog. There will be 4 “sub” blogs: rwanda (rwanda.kiskipby.org), and Wayne, Erin and disasterteams with the same subdomain pattern.

    I thought I saw a multiblog install with a navbar across the top with links to the other blogs. Is there a way to activate this in the install which I’m not seeing, or do you know how to manage this?

    again, thanks for this product! I’m almost there.
    erin Cox-Holmes

  288. #288 | Posted August 27, 2008 at 2:49 pm

    Erin –

    Not automatically, though you could certainly hard-code the links into your theme.

    This is something I may support in future, but it’s not there yet. I’m currently working on code where the various blogs register themselves in the database; if I get that working, it could allow for such a system in the future — essentially a whole-blog equivalent of listing pages in your sidebar.

  289. #289 | Posted August 27, 2008 at 3:09 pm

    Stephen, if you get that working, it would be a welcome addition. The reason I need to go the multiple blog route is that we have lots of readers who are not familiar with blogs and cannot get the idea of categories in their heads.So I’m hoping to get this configured so they click a navbar similar to the page tabs in wordpress, but each tab evokes an actual blog, since the pages are static in WP.

  290. Bob Johnson
    #290 | Posted August 27, 2008 at 3:34 pm

    Hi Stephen, this sounds like a great thing. Is it know if this works with Godaddy’s multiple site hosting?

    I have WP 2.6 installed in the root of domain1.com. domain2.com has the dns for my Godaddy hosting and on Godaddy, I have set it up to point at the same root directory of domain1.com, where WP is installed. I did the advanced setup and put in the VUsers, yet domain2.com shows the domain1.com blog.

    Thanks for any help

  291. #291 | Posted August 27, 2008 at 4:19 pm

    Bob — I believe your setup is basically domain forwarding, which will not work.

    You would have to get GoDaddy to set up domain2, and they would have to point the “document root” to the same folder as domain1. Ask GoDaddy — they may be willing to do this, but they would consider it unusual (which it is!)

    [Updated: The ability to work with domain forwarding is another feature to be added. Basically I could do it right now, but as the system works it's a huge security risk. So some work is needed in the system to lock down security issues with domain forwarding]

  292. dndco
    #292 | Posted August 27, 2008 at 5:33 pm

    I am still in a trial and error cycle. I am thinking the problem is Plesk which I manage my VPS with.

    Has anyone gotten a domain1.com, domain2.com version working on Plesk?

    If so what was the procedure you followed?

    Thanks.

  293. Bob Johnson
    #293 | Posted August 27, 2008 at 5:33 pm

    Stephen, thanks for replying. Here is how it works when I host multiple domains without WP. My primary domain for the hosting account is domain1.com. It can be registered anywhere and it points to Godaddy’s dns. domain2.com is registered elsewhere also and points to the same dns. When I go into my hosting account for domain1.com, I add domain2.com and give it a path into another directory (non root) of the primary hosted domain, such as /d2. When I add my content it goes into domain1.com/d2 but when typing domain2.com into the browser, domain1.com/d2 is masked and everything looks like its all separate. If I had domain3.com, I would add a path /d3 for the root and put my content into domain1.com/d3. I don’t know if that helps or makes any difference with your product. Thanks again.

  294. #294 | Posted August 27, 2008 at 6:46 pm

    Bob –

    When I go into my hosting account for domain1.com, I add domain2.com and give it a path into another directory (non root) of the primary hosted domain, such as /d2

    NO. Point domain2 to the same root directory as domain1. Point domain3 to the same root directory as domain1.

    Get rid of the /d2 folder. It’ll just confuse things.

  295. Bob Johnson
    #295 | Posted August 27, 2008 at 9:32 pm

    Stephen,
    I did do as you say for your product. I was describing how Godaddy handles multiple domains on one hosting account for other things.

    When I set this up with your product, I pointed domain2.com at the root folder of domain1.com which is where I installed WP, like you say. When domain2.com is typed in a browser, it resolved back to domain1.com.

  296. #296 | Posted August 27, 2008 at 11:34 pm

    Bob — it’s time for some stupid questions:

    1) What, exactly, do you have in your $vusers[] list?

    2) What, exactly, did you name your config files?

    3) Did you put a different table-prefix in each config file? If using autocofig, you should not have any table prefix at all.

    Basically it sounds as though the system can’t properly determine VUSERs. If it can’t figure out what the right VUSER is, it falls back to the default — domain1.

  297. Bob Johnson
    #297 | Posted August 28, 2008 at 11:17 am

    In the mp-users.php file, I have:
    $vusers[] = ‘domain1.com’;
    $vusers[] = ‘domain2.com’;

    In wp-content/multiblog/config, I have:
    mb-autoconfig.php
    mb-config-sample.php (no changes made to this)
    mb-users.php

    Nothing done for table prefix, I am using autoconfig.

  298. #298 | Posted August 30, 2008 at 1:46 pm

    Stephen, YOU are my Personal Jesus.

    To everyone that’s asking how to implement “per-user” folders, that’s the trick I used:
    I followed the guide of Stephen making work perfectly 2-3 blogs.

    After that, I created a symbolic link in the “multi”-wordpress installation directory called “files”.
    The symbolic link links to “/home/”

    So in every blog-website, if I have galleries of pictures to use with nextgen-gallery, or sitemap.xml files to create with “Google XML Sitemaps”, I can use the public folder:
    http://www.whateverdomain.com/files/whateverdomain/site...
    or galleries/
    or wathever you need.

    That’s is wanderful also because I can jail the ftp users in their home directory and they will just see the galleries/xml files without seeing WordPress.

    That’s awesome, thank you again Stephen.
    I’ll donate some money for sure.

  299. #299 | Posted September 2, 2008 at 1:58 pm

    Hi :)

    Multiblog is really COOL!

    Still, there is a problem when using it with Windows Live Writer (and admit it, this program is really helpful when writing a blog :) ).

    When trying to get category list from a blog using Multiblog you get an error message, here are the log details.

    
    Parse error:  syntax error, unexpected ':' in /home/content/---/html/xmlrpc.php on line 2
    ",""
    WindowsLiveWriter,1.484,Fail,00049,02-Rgs-2008 21:30:01.420,"WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response - The response to the blogger.getUsersBlogs method received from the weblog server was invalid:
    
    Invalid response document returned from XmlRpc server
       at WindowsLive.Writer.BlogClient.BlogClientBase.CreateAuthenticatedCredential()
       at WindowsLive.Writer.BlogClient.BlogClientBase.Login()
       at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CreateCredentialsFilter(String requestUri)
       at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.SendAuthenticatedHttpRequest(String requestUri, Int32 timeoutMs, HttpRequestFilter filter)
       at WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.ExecuteHttpRequest(String requestUri, Int32 timeoutMs, HttpRequestFilter filter)
       at WindowsLive.Writer.BlogClient.Detection.LazyHomepageDownloader.get_HtmlDocument()","   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
       at System.Diagnostics.TraceInternal.Fail(String message)
       at System.Diagnostics.Trace.Fail(String message)
       at WindowsLive.Writer.BlogClient.Detection.LazyHomepageDownloader.get_HtmlDocument()
       at WindowsLive.Writer.BlogClient.Detection.WriterEditingManifest.ScanHomepageContentsForManifestLink(Uri homepageUri, LazyHomepageDownloader homepageDownloader)
       at WindowsLive.Writer.BlogClient.Detection.WriterEditingManifest.FromHomepage(LazyHomepageDownloader homepageDownloader, Uri homepageUri, IBlogClient blogClient, IBlogCredentialsAccessor credentials)
       at WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.SafeDownloadEditingManifest()
       at WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.DetectSettings(IProgressHost progressHost)
       at WindowsLive.Writer.PostEditor.ServiceUpdateChecker.Main()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()"
    WindowsLiveWriter,1.484,None,00050,02-Rgs-2008 21:30:02.207,"Exception parsing XML-RPC response:
    
    WindowsLive.Writer.CoreServices.XmlRpcClientInvalidResponseException: Invalid response document returned from XmlRpc server ---> System.Xml.XmlException: There are multiple root elements. Line 2, position 2.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at System.Xml.XmlDocument.LoadXml(String xml)
       at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
       --- End of inner exception stack trace ---
       at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
       at WindowsLive.Writer.CoreServices.XmlRpcClient.CallMethod(String methodName, XmlRpcValue[] parameters)

    Problem appeared only after installing Multiblog. Any suggestions? :)

  300. #300 | Posted September 2, 2008 at 3:19 pm

    I can’t imagine how VMB could cause this. Try reinstalling WordPress; maybe you have a corrupted file.

    I use TextMate for some of my blogging, which uses the same XmlRpc client interface.

    To my other readers:
    Has anyone else experiences this problem?

    Although…

    Invalid response document returned from XmlRpc server ---> System.Xml.XmlException: There are multiple root elements. Line 2, position 2.

    This might suggest that when you try to connect it’s finding multiple blogs with the same call…? I don’t really know why such a thing might happen, but maybe some conflict involving .htaccess. That’s just a stab in the dark — again, I’ve never had (nor heard of) any problem with XmlRpc. Try reinstalling the WordPress files first.

  301. Steve Elliott
    #301 | Posted September 2, 2008 at 7:03 pm

    Stephen: I’m new to this and seeking some advice. I’m not a programmer…actually far from it…and also not seeking to become one. My goal is to create a blog that will be published to a regional audience. The objective is to have multiple pages (or blogs?) and further separated by categories. My question is, is this best done through multiblogs and if so, can the same user database be accessible to all blogs?

  302. #302 | Posted September 3, 2008 at 1:40 pm

    So I want to see if this is what I need.

    I have server space so I host my WP blog as well as some for my friends. In total I have 9 different installs. Basically I administer them all, themes, plugins, etc, and try to keep them updated. What ends up happening is I don’t keep it updated, so I probably am running 5 different versions of WP among the different installs.

    Is this what I am looking for?

  303. #303 | Posted September 3, 2008 at 1:58 pm

    Steve
    You might be able to do what you want with categories and sub-categories. That is, categories can be in a hierarchy. If going with that though, you may end up needing a customized theme to get it the way you want. So… it can be done either way.

    Keep in mind that this system really does make separate blogs — if you use it for sections of one site, each section has a separate admin section and settings. That may or may not be what you want.

    Christopher
    It sounds as though Virtual Multiblog would be perfect for your situation. Use Advanced Setup, creating a config file for each blog, and that way you can link directly to the existing data — just set up the same DB login and table prefixes for each one.

    [Update: This is the 666th comment to appear on this blog. The Comment of the Beast! Run!]

  304. Bob Johnson
    #304 | Posted September 4, 2008 at 1:01 pm

    Hey Stephen,
    Just checking back in. I put the information you requested in comment #297. Thanks for your help.

  305. #305 | Posted September 4, 2008 at 4:14 pm

    Bob — I would think it’s almost certainly a redirect problem. That is, they’re not truly pointing the domain at the web root — it’s a redirect.

    Possible fix:
    in vmb-functions.php, find this line (around line 115 or so):

    $server = $_SERVER['SERVER_NAME'];

    replace it with:

    $server = $_SERVER['HTTP_HOST'];

    This may fix it.

    IMPORTANT Note to anyone else reading this: This is a BAD idea unless you are using the $vusers[] list. Without $vusers[] changing that line opens you up to hackers or spammers. The next release of Virtual Multiblog will offer a more “official” (and better protected) way of doing this.

  306. jz
    #306 | Posted September 11, 2008 at 12:12 pm

    I am using different subdoamins with MultiBlog

    I created the subdomains
    blog.mydomain.com // this is where WP is installed
    blog1.mydomain.com // this subdomain points to /public.html/blog
    blog2.mydomain.com // this subdomain points to /public.html/blog
    blog3.mydomain.com // this subdomain points to /public.html/blog

    I have created a seperate configuration file for each in the
    wp-content/multiblog/config/ directory

    mb-config-blog_mydomain_com.php
    mb-config-blog1_mydoman_com.php
    mb-config-blog2_mydoamin_com.php
    mb-config-blog3_mydomain_com.php

    // I created unique prefix for each blog

    $table_prefix = ‘blog_’;
    $table_prefix = ‘blog1_’;
    $table_prefix = ‘blog2_’;
    $table_prefix = ‘blog3_’;

    The database BLOGS has been created as well as the prefixes blog1_ and blog2_

    How come when I goto blog1.mydomain.com or blog2.mydomain.com

    I get the wordpress installed screen instead of being asked for a
    username and password?

    Were is my installation error?

    Thank you
    JZ

  307. #307 | Posted September 11, 2008 at 1:15 pm

    JZ — Your setup appears correct. Why not try running the WP install at blog1.mydomain.com and see what is created in the database?

  308. Chris
    #308 | Posted September 23, 2008 at 6:32 am

    The online readme mentions v2.5, fully compatilbe with WordPress 2.6, but I can only find a download link for v2.4.

  309. #309 | Posted September 23, 2008 at 4:47 pm

    “Note: Sometimes the readme will list a higher version than the download. That happens if I have a development version installed.”

    2.4 is the current public release.

  310. #310 | Posted September 24, 2008 at 9:02 am

    A few things…

    Clarification for Chris: WordPress 2.6 added the ability to change the location of the wp-content folder. If you don’t do this, Virtual Multiblog 2.4 works just fine.

    To Everyone:
    I should be releasing 2.5 very soon, which will include compatibility with moving wp-content, and the ability to move the multiblog folder, or just the multiblog config files. This will allow you to have different wp-content folders for different blogs. Other goodies on the way.

    Question: I’ve had at least three people (in comments or email) in the past month say they were making donations, but have not received them. I have received exactly _one_ donation in past month and a half. My question is simply this: did you folks make donations and they failed to go through for some reason, or did you not make them?

    No, this isn’t a nag for more donations (though that would be nice…); I’m asking those who specifically said they were going to make them.

  311. jz
    #311 | Posted September 26, 2008 at 7:12 am

    MultiBlog Easy Install instructions have been completed by jz. The install instructions are for the installaiton of MultiBlog 2.4 and WP 2.6.1 using subdomains.
    The instructions cover everthing from creating subdomains using CPANEL to creating a database and username. Then on to installing Multiblog 2.4 with what I call EXACT KEYSTROKES. Following the instructions you should be able to set-up 6 blogs in 30 minutes.
    There is a $25 charge for these instructions with a portion that I am going to forward to Stephen for his hard work.
    Stephen actually thinks I am nuts for trying to charge for easy install instructions. I think 4 days of my time to figure out how to do this is worth it. If you are interested in these instructions payment can be made through pay pal. email jz@mycarfs.com

  312. #312 | Posted September 26, 2008 at 10:20 am

    JZ — I added a note to the page above, just before the download.

  313. #313 | Posted September 30, 2008 at 5:17 pm

    I’m very interested in this, but before I download it I need a little more clarity on where to install it on my server. Is it uploaded into plugins or another folder?

  314. #314 | Posted September 30, 2008 at 9:19 pm

    Lea –

    Installation instructions are in the readme.

  315. #315 | Posted October 1, 2008 at 3:32 am

    Hi, Stephen.

    I’m a wp new user and far from to be a programmer. I was checking the read me file and I think your pluggin will fit my needs but I’m not sure.

    I bought a domain and now i was thinking to concentrate my blogs on it and even increase it.

    I was figuring something like :

    http://www.blogxxxxxxxx.com/cars
    http://www.blogxxxxxxxx.com/br
    http://www.blogxxxxxxxx.com/blogs
    http://www.blogxxxxxxxx.com/blogs/2bo2ba
    http://www.blogxxxxxxxx.com/blogs/1000things

    In the above cenario, would I be able to use diferent themes?
    Or it only works for subdomains?
    And, can I use diferent languages to each one?

    Last question: if I use subdomains can I create “fake urls” like :
    http://www.sos.blogxxxxx.com = http://www.blogxxxx.com/sos ?

    Sorry for all dumb questions!

    PS: The site is not ready yet – at this stage I’m trying to find wich theme works better and how to use the site both for profit and for pleasure rssrrs

  316. Friso
    #316 | Posted October 3, 2008 at 4:28 pm

    Nice, gonna try this out thnx

  317. Friso
    #317 | Posted October 3, 2008 at 4:38 pm

    Nevermind, you need to create symlinks… Not going to use this. Thanks though

  318. #318 | Posted October 7, 2008 at 8:53 am

    I`m stucked in the installation process coz I don’t know how to do the symlink. How could I possibly do that? thanks.

  319. jz
    #319 | Posted October 8, 2008 at 2:39 pm

    Stephen:
    “JZ — I added a note to the page above, just before the download”

    The instructions I created for installing Multiblog 2.4 using sub domains in under 1 hour certainly is not going to make either one of us rich. I have not had one inquiry.

    All of my instructions are guaranteed to work or you get your money back.

    If you want to see how MultiBlog 2.4 works using subdomains you can go here [Note: These subdomains are not quite fully setup yet]
    http://cfs.mycarfs.com/
    http://pwtc.mycarfs.com/
    http://maxima.mycarfs.com/

  320. NewUser
    #320 | Posted October 8, 2008 at 4:27 pm

    I have question about wordpress plugins updates when using Virtual Multiblog plugin… is it safe to use automatic updates from admin panel? I’m afraid that some plugins may only check file versions and not check database version – so when I update one blog, and then check plugin list on another one, it will look current, but in fact database schema for that plugin on the 2nd blog can be outdated… can it happen?

  321. #321 | Posted October 8, 2008 at 4:41 pm

    NewUser — Good question.

    I have been using auto plugin update just fine for quite a while. Really, all that happens is the plugin files are deleted and replaced with the new version; so as I understand it, running the auto-update is not any different than if you were to upload the new plugin via F T P.

    Note: There are “hooks” that plugin authors can use to run code when their plugin is activated or deactivated, which some may use to include update functions; but these do NOT run during auto update — so even there it’s really no different than using F T P. It’s just more convenient. :)

    [Update: WordPress is doing weird things to the term F T P -- namely, turning it into a link. That's why I added the spaces between the letters....]

  322. jk
    #322 | Posted October 8, 2008 at 7:58 pm

    i’m missing something in the readme file it says for step 4
    - Move the multiblog-support folder from multiblog/plugin/ to you plugins folder (probably wp-content/plugins/).

    im not seeing either the multiblog/plugin or multiblog-support folders in the zip file

  323. #323 | Posted October 8, 2008 at 10:00 pm

    JK — I need to correct that! The plugin no longer exists — it was rolled into the base system files. You can ignore that step.

  324. #324 | Posted October 11, 2008 at 1:19 pm

    My warm congratulations for this excellent code! Elegant, easy and efficient!

    I have only two remarks for the the installation instructions (multiblog-readme.htm) and a question:

    1. Usual installation of WP is not needed. If I am not wrong, only the WP files should be uploaded.

    2. I spent some time searching and thinking, till I read here that the multiblog-support folder from multiblog/plugin/ does not exist any more. This should be deleted from the instructions.

    I have copied WP in a subdirectory and created some symbolic links in the root dir that point to it; they work perfectly for Virtual MultiBlog. Then I pointed some subdomains to the directory where WP is in, and they do not open the 5min installation, the root directory opens instead. However, subdomain pointing works for folders that do not contain WP files, so I assume, that WP does not accept it. Do you have any idea about this?

    Thank you again and keep on doing the good work!

    Alexandros

  325. NewUser
    #325 | Posted October 12, 2008 at 8:03 am

    Stephen: ok, but when I update plugin, it’s deactivated only on one blog… So on other blogs hooks won’t run, is that right? Or am I missing something?

  326. #326 | Posted October 12, 2008 at 7:44 pm

    NewUser — I repeat: during auto update, the deactivate/reactivate hooks do NOT run. That is standard WordPress behavior. They did it that way because many plugins are programmed to delete their own preferences on deactivate.

    Thus, with or without Virtual Multiblog, those hooks do not run during auto update.

  327. tom
    #327 | Posted October 17, 2008 at 10:57 am

    Hi there,

    I’m wondering if you can provide any insight into a problem I’ve encountered–

    I’ve set up Virtual Multiblog to great success on my site. I set up three blogs using VM and everything is working fine (two are in subdirectories, one is the root install). However, as I add subsequent blogs (all in root subdirectories), they install fine and I’m able to go into wp-admin and admin the blog as usual, but when I visit the blog, I only get a blank page. And the original three blogs are all functioning fine. I’ve followed the same, precise install process for all of them, but I still can’t get additional blogs to display. The DB also seems fine (the necessary tables exist for all blogs, including expected fields/values–even for those blogs that aren’t displaying.)

    The only issue I could find on my own was that PHP memory allocation may be set too low, but I checked php.ini and it’s set at 90M which should be fine.

    Any ideas?

  328. TOM
    #328 | Posted October 17, 2008 at 12:18 pm

    Problem solved! It seemed for some reason, with the later blogs I created, the theme didn’t “take”. By changing themes, and then reactivating the original theme, everything was again displayed. Odd! I don’t know why this didn’t happen when creating the first blogs… All’s well that ends well.

  329. #329 | Posted October 17, 2008 at 2:54 pm

    I have been trying to install this great program without success. After I follow all of the steps I get a cannot connect to database error. The WP installed worked until I added the VMB program.

  330. #330 | Posted October 17, 2008 at 3:09 pm

    Paul — That error says that there’s something wrong with the config. Try putting your database info into the autoconfig file and see what happens. (Also, you removed the “-sample” from the filename, right?)

    Heh. I had that exact issue installing the latest development version the other night… Didn’t update my config files.

  331. #331 | Posted October 17, 2008 at 3:13 pm

    Alexandros –

    It may be a problem with _how_ you are pointing the subdomains. Redirects will not work — they have to be set up at the server level. The next release of VMB will have a workaround for that (experimental though!).

  332. #332 | Posted October 18, 2008 at 2:52 pm

    Is there a way to import blogs into this system?
    Also if I am hosting blogs 1-14 all with different URI how does this effect stats?
    Thanks

  333. #333 | Posted October 18, 2008 at 3:09 pm

    Also, is there a way to only show the “multiblog” link in one of the admin panels?

  334. #334 | Posted October 18, 2008 at 3:38 pm

    Paul — To “import” an existing WordPress blog, just create a custom config file for that vuser, and put the existing blog’s database info and table-prefix in the config file.

    Stats? Depends on how your collecting stats, I guess…

    The next version of VMB will allow you to turn off the admin stuff. Hopefully I’ll be releasing it soon — I’m polishing up backward compatibility in the wake of some changes to the way config files work.

  335. Ximena Eduarda
    #335 | Posted October 19, 2008 at 5:24 pm

    I used VIrtual Blog as local host and worked just fine, as I am doing this for someone else I need to upload without it, how do I go back to original. Sorry if question is dumb, in fact I am so new to all this that I can ask the most incredible things to those that know about it.

  336. johnny_n
    #336 | Posted October 28, 2008 at 11:54 am

    Hi Stephen — anxious to try this, what a fantastic concept. I have one quick question:

    How easy is it to change a virtual blog from a subdomain to a real domain once it’s been created?

    In other words, I want to test using a subdomain (domain2.domain1.com), but when the site is ready, I want to move it to domain2.com, with the subdomain removed completely.

    If I understand things correctly, wouldn’t I just change the appropriate $VUSERS line to reflect the change within Virtual Multiblog?

    Then, on the server side, I would create a new symbolic link that pointed domain2.com to domain1.com.

    Is it this simple?

  337. #337 | Posted October 28, 2008 at 12:35 pm

    Ximena — to go from VMB to standard WordPress, simply restore the standard wp-config.php file. You will have to fill in the appropriate info of course (including table-prefix).

    johnny_n — If you are using “easy setup” the system determines your table-prefix based on your domain, so you will have a table-prefix based on the test domain. If you use Advanced setup you can specify the table-prefix, and this is then not a problem. Other than that, your method (plus maybe changing the name of the config file) is correct as far as Virtual Multiblog goes.

    There are, however, issues with changing domains in WordPress — things that have nothing to do with my system. Here’s an article with more info on that: Move your WordPress blog to a new domain in 10 steps

  338. johnny_n
    #338 | Posted October 28, 2008 at 1:12 pm

    Thanks very much for your quick response and passing along that link — very good to know indeed. Some of it doesn’t apply since it’s all remaining on a single server, but much of it does.

    I did install using the advanced setup — can’t quite get things working properly yet (whether I go to domain2.domain1.com or domain1.com I get the same blog) but should have it worked out shortly… I did want custom table-prefixes which is why I used the Advanced.

    best–
    john.

  339. johnny_n
    #339 | Posted October 29, 2008 at 1:51 pm

    I’ve read the last several pages of comments, I’ve read the readme probably 15 times, I’ve read the FAQ. Still the same problem as above (whether I go to domain2.domain1.com or domain1.com I get the same blog — domain1.com).

    My host set up a symlink for me and I can even see it works in my FTP software. The install for domain1 went fine, with the custom table prefixes used.

    The only clue I have is when I go to domain2.domain1.com/wp-admin/, I get this:

    http://domain1.com/wp-login.php?redirect_to=http%3A%2F%...

    There is nothing in my .htaccess file except for a password protect and custom permalink redirect from WP (doesn’t matter whether that is there or not, same result, I’ve tried both ways).

    Does this mean there is a hidden redirect somewhere that I can’t find, overwriting the symlink?

    I’m really at a loss…

    One other thing — my db isn’t @ localhost. Would this have anything to do with it?

    john.

  340. #340 | Posted October 29, 2008 at 4:59 pm

    Generally, if it’s defaulting to the first $vuser[], that means it can’t figure out which one to use — the system uses the first on the list as the fallback. You can test this by reversing the order of your $vusers[] list — probably both addresses will be blog #2 then.

    Other things to try:

    WordPress rewrites .htaccess, so that still could be the problem. When you remove the WP stuff, save it, then lock the file so it can’t be written by anyone.

    In the config for the second blog, set WP_HOME and WP_SITEURL.

  341. johnny_n
    #341 | Posted October 30, 2008 at 9:36 am

    Stephen, thanks again. I do think this will help others — this “plug-in” is easy enough to configure, but incredibly difficult to troubleshoot if it doesn’t work. I still think it’s brilliant though! ; )

    I hadn’t thought of switching the $vusers[] list — I had read (many times) that the first was the default, but didn’t consider doing this. Amazingly, it now works. domain1.com serves domain1.com, and domain2.domain1.com now serves domain2.domain1.com. Installation went fine and the tables are correct with the appropriate prefixes.

    I guess my follow-up would be, something is still obviously not right (since both should be serving domain1.com). Should I continue to troubleshoot now while the blog isn’t completely setup with the hopes of saving myself headaches later, or should I push on with the build?

    Also, I had previously tried setting the WP_HOME and WP_SITEURL in blog2 (and both blogs as well) as part of the troubleshooting and it didn’t work… forgot to mention that.

    Thanks!!

  342. #342 | Posted October 30, 2008 at 10:39 am

    johnny_n — You mean that reversing the order of $vusers[], on its own, fixed the problem? Hmm.

    Would you please email me your $vusers[] list? I’m curious now.

    This may just require a documentation fix rather than a code fix….

  343. johnny_n
    #343 | Posted October 30, 2008 at 11:27 am

    Yes, that alone fixed it.

    I’ve emailed you the config folder, as it is on the site.

    Again, many thanks!

    john.

  344. mj
    #344 | Posted November 2, 2008 at 3:19 am

    Is it possible to share admin and user accounts across all blogs?

    I have 2 people who will work on many domains, and it seems to be high maintenance to have to create the same user accounts for every domain.

  345. #345 | Posted November 5, 2008 at 12:13 pm

    In your instructions on line 4 it reads “Move the multiblog-support folder from multiblog/plugin/ to you plugins folder (probably wp-content/plugins/). ” after downloading your zip file twice I still am unable to find this folder. is there something I am missing.

    I am trying to see if i can use this for one of our local churches website

    Thank you very much
    Shirley Esteo

  346. Rob Mc
    #346 | Posted November 5, 2008 at 12:48 pm

    First, great software!

    I’m trying to move a “set” of sites that use VMB from one hosting provider to another. As part of that move, I’m going from mysql 4.1 to 5.

    I’m running into an issue where the index page for each blog will simple never load though you can type /wp-admin and get to the login page. Once there, the blog appears completely empty and users are gone (themes and wp settings remain unique for each blog however).

    Is there something about how vmb handles the database that I should take into consideration when exporting, upgrading and then restoring into a new db?

    Any insight is much appreciated.

  347. #347 | Posted November 5, 2008 at 2:00 pm

    New version 2.5 is up! Please see the upgrade instructions.

    Improvements to the code that determines VUSER, and also a nice update to the way it handles configuration.

    [Update: Oh, and thanks to johnny_n for helping identify a bad bug. It's fixed now!]

  348. #348 | Posted November 5, 2008 at 2:04 pm

    Rob Mc — No problems that I’m aware of. I bounce back and forth between my test server (PHP 4) and my live server (PHP 5) without issues.

    Double-check your config files for anything specific to the server-path.

  349. #349 | Posted November 5, 2008 at 2:07 pm

    MJ — No, but perhaps somewhere down the road. You might consider WordPress MU. My system specifically has separate admin areas.

    Shirley — The plugin no longer exists. That was an error in the VMB 2.4 readme. (Fixed in new 2.5 readme! ;) )

  350. Shirley Estep
    #350 | Posted November 5, 2008 at 3:24 pm

    Thanks!

  351. albert day
    #351 | Posted November 8, 2008 at 11:35 am

    hi

    awesome idea

    i would like to try to install for 3 different blogs each with a different style sheet and each with a different language with different alphabets (like english, chineese and farsi) and text alignments (left right/right left/up down)and the ability for the author to post from one admin panel into all 3 blogs and for the end user to click on a different language version of each post (lie in wiki peadia)

    please share with us if it will work before we start playing with it

  352. Ron
    #352 | Posted November 8, 2008 at 1:50 pm

    I’ve been looking for a plugin like this.

    I have two questions:

    1. I am using a Windows server, not Apache. Will this create any problems?

    2. Does the WordPress install have to be in my root directory, or can it be in another directory?

    Thanks.

  353. #353 | Posted November 8, 2008 at 6:31 pm

    Albert — You can do blogs with different language and text direction, but the admin areas will not be linked in any way. It will be like three completely separate installs of WordPress.

    Ron — This should work on Windows, though if you need symlinks it might be a bit more difficult (as they are not native to Windows — though I’m pretty sure they _can_ be done.) WordPress does not have to be in the root directory.

  354. #354 | Posted November 9, 2008 at 12:46 am

    Stephen, this is awesome and truly elegant. Installed successfully on my test blogs and I am very happy.

    I have a question though. I wanted to use one common theme but customized for each site especially the header. How?

  355. #355 | Posted November 9, 2008 at 4:14 am

    Hello,

    This is what I’am looking for.

    But….

    do I have to make symlinks if I want to use:
    blog.24-7israel.com
    blog2.24-7israel.com
    ect.

    And do I only have to change tthe mb-autoconfig.php.

    Mayby stupid questions but I’am a newby

    Harro

  356. #356 | Posted November 9, 2008 at 6:20 am

    @Harro,
    Symlink is not difficult. In my case I went to ask my Bluehost hosting and the solution was easy enough to follow.

    In my cPanel V.11 I created an add-on domain say domainB.com and assign it to the folder that contain my WP installation within say domainA.com. It’s a sort of redirection and that’s it. It was much simpler than I would have thought.

  357. #357 | Posted November 9, 2008 at 6:49 am

    Hello all,

    trying trying and trying but it will not work.

    This is my blog installed in the root. (www.24-7israel.com)
    now I want to run 3 (at the end 25)more blogs on subdomains:
    example1.24-7israel.com
    example2.24-7israel.com
    example3.24-7israel.com

    so I:

    1. place the multiblog folder in the allready excisting wp-content folder

    2. move the config files from multiblog to the root and remove the old file wp-config.php

    3. I renamed the mb-autoconfig.php

    and than I go to example1.24-7israel.com?

    who is willing to help me out?

  358. #358 | Posted November 10, 2008 at 8:58 am

    Harro –

    1) You do not need symlinks in your case.

    2) Your setup from your last comment looks right. You still need to set up the server to point those subdomains to the same web root as the main site. Also, I assume you set up the DB info in mb-autoconfig.php?

  359. #359 | Posted November 10, 2008 at 11:44 am

    Awesome upgrades Stephen!

    I’ve had those problems with subdomains that you fixed in last version – but never really figured out how I solved it everytime.

    Custom wp-content and plugins folder has been a desire for a while. An even greater desire though is custom themes folder. That’s what I most recently need – so would be great to have that as a separate config rather than setting up a custom wp-content with symlinks to everything but themes.

    thanks for great work!

    -kjell

  360. #360 | Posted November 10, 2008 at 12:04 pm

    kjell –

    The custom wp-content and plugins locations are standard WordPress capabilities, so I wouldn’t expect custom theme folders until/unless it becomes part of WordPress. You might try going the other route, though — give each blog its own wp-content folder, but only really use that folder for themes. Everything else can go in a common “other” folder…?

  361. Ron
    #361 | Posted November 10, 2008 at 1:12 pm

    Stephen, my host said the only way to have multiple urls point to one site of files is to use domain aliases/domain pointers.

    My host has Windows IIS servers. I explained what I am trying to do, i.e. have one installation of WordPress with several different blogs pointing back to that one installation.

    Does what he proposed sound logical or should I do it a different way?

    Thanks,
    Ron

  362. #362 | Posted November 10, 2008 at 2:56 pm

    Ron — There is a new experimental(!) feature in VMB 2.5. Open up the wp-config.php file and find the line:

    // define( ‘VMB_ACCEPT_REDIRECTS’, true );

    Remove the slashes from the beginning. Read the note above that line — important info there.

    The system should then work with redirects. Use at your own risk (as always ;) )

  363. Ron
    #363 | Posted November 10, 2008 at 6:47 pm

    Thanks Stephen.

    I was wondering if I could use virtual directories? I know I can point them back to the WordPress installation.

  364. #364 | Posted November 10, 2008 at 7:37 pm

    Ron –

    I dunno — it’s experimental. Give it a try and let me know. I think it should work. If you turn that option on in wp-config.php, the VUSER keys off what the browsers sees as the URL.

  365. Ron
    #365 | Posted November 11, 2008 at 7:52 am

    Stephen. I have been discussing this with my Windows host. He keeps thinking in terms of domains and I don’t want to buy any more domains. I just want to use directories for the whole thing, i.e. the WordPress install and all the “sites” will be in separate directories on the same domain. I think using virtual directories pointed to the WordPress install should work, right?

    I have another host for testing. This is a Linux site. I think I’ll just set it up there also, according to your instructions. That way I’ll know how to set it up on a Windows server and a Linux server. Plus, if I do the Linux server first, I’ll be familiar with how the plugin works.

    Ron

  366. #366 | Posted November 11, 2008 at 9:22 am

    Ah, yes. I thought you were doing multiple domains. I’m not sure what “virtual directories” are. In Linux, you should use symbolic links. I am told that symbolic links can also be done on Windows, though it is not as much a standard.

    The standard VMB system keys off what directory the _server_ thinks it’s in. For symlinks the server sees its location as whatever the symlink is. For most types of redirect the server sees its location as that of the _target_ of the redirect.

    So if virtual directories don’t work as is, try them with VMB_ACCEPT_REDIRECTS turned on as suggested above.

  367. Ron
    #367 | Posted November 11, 2008 at 9:29 am

    Thanks Stephen. I have unlimited sub-domains with my Linux host so maybe I should just set up the sub-domains all pointing to the WordPress install, right?

    I’ll have to do the virtual directories with my Windows host I guess.

    Ron

  368. Ron
    #368 | Posted November 11, 2008 at 3:57 pm

    Stephen, my Linux host says that they can’t point sub-domains to any folder other the one named for the sub-domain. They also said that symlinks get messy real fast. So I guess all I can do is redirects through a .htaccess file.

    Looks like I’ll have to use your redirects function for my Linux host too. It looks like my Windows host may be easier to set up than my Linux host.

    What a bummer!

    Ron

  369. Ron
    #369 | Posted November 12, 2008 at 5:49 pm

    Stephen, I installed the plugin and went through the setup several times. I tried the virtual directories with and without the ACCEPTS REDIRECTS function. (The virtual directory actually does point to the directory.)

    It didn’t work. I used an installed version of WordPress.

    I did check out the database and data was written in there for the three blogs I set up.

    I’ll try it again and see if I can get it working.

    Ron

  370. Scott Granneman
    #370 | Posted November 12, 2008 at 9:29 pm

    Sorry if this is somewhere on this page, but I don’t see it. I already have a free-standing WordPress blog at http://www.granneman.com/blog, and I’d like to put it under the aegis of MultiBlog. How do I do so? I followed all the steps, but I’m told WordPress is already installed. However, my blog never appears.

    Thanks, and you have a wonderful thing with MultiBlog!

    Scott

  371. #371 | Posted November 12, 2008 at 11:59 pm

    I don’t seem to understand how to do this correctly.
    I manage 12 wordpress blogs all on sub directories, for 12 different users.

    Is the admin panel unique for each installed blog?

    Could you give me laymen instructions fr how to do this?

    How much for you to do it for me?

  372. #372 | Posted November 13, 2008 at 8:49 am

    Scott — More info? What _does_ appear in your second blog? Don’t go straight to the install.php, just go to the second blog address. What’s the address of the second blog?

    My first suggestion is to double check that you’ve replaced wp-config.php with the VMB version.

  373. Scott Granneman
    #373 | Posted November 13, 2008 at 3:48 pm

    I wasn’t clear.

    http://www.granneman.com/blog is a currently running blog that I set up as a standalone WP site years ago. In the interim, we’ve started using VMB for our clients. I’d like to move http://www.granneman.com/blog from a standalone WP install to VMB, with our other clients.

    I did these steps:

    1. Backed up the “blog” directory in the root folder of http://www.granneman.com.

    2. Added the following to my Apache conf file for http://www.granneman.com:

    Alias “/blog/” “/var/www/multiblog/”

    3. Added the following to mb-users.php:

    $vusers[] = ‘granneman.com/blog’;

    4. Created the following file in /var/www/multiblog/wp-content/multiblog/config:

    mb-config-granneman_com_blog.php

    5. I then opened that file & entered the relevant info.

    6. Restarted Apache.

    7. Go to http://www.granneman.com/blog to see … a blank page. View Source contains nothing, and there are no errors in the Apache error logs.

    Your aid in my migration is much appreciated!

    Scott

  374. #374 | Posted November 13, 2008 at 4:46 pm

    Stephen,
    Sorry for this silly question.
    How do you compare Multiblog vs WP mu?

    Also, how do you install MB on a live blog i.e. not a new installation. In my case, I was forced to do fresh install when I typed my existing URL. I then need to import the database for the contents. Is there a better way? Thanks!

  375. #375 | Posted November 14, 2008 at 10:27 am

    Hilmy –

    MU has an integrated admin for controlling all blogs. Virtual Multiblog creates each blog as a completely separate install, with separate users, separate admin, etc.

    A big advantage to VMB is that it is much more compatible with plugins because each blog runs as a normal install of WP.

    The only plugins I’ve found that don’t work with VMB is certain caching plugins that monkey with mod_rewrite in the .htaccess file; though I’m sure even that could be fixed somehow with a little custom mod_rewrite work.

  376. #376 | Posted November 14, 2008 at 10:32 am

    Regarding moving an existing blog to VMB —

    Beyond the regular procedure for VMB, you should set up a config file specific to the existing blog, and set it to the same table-prefix as the original. This way, it will look in the database and find the existing tables for that blog, and use them.

  377. Scott Granneman
    #377 | Posted November 14, 2008 at 2:03 pm

    Stephen, that’s what I did. No dice. I created mb-config-granneman_com_blog.php and configured it. Double- and triple-checked. Still a white page. View Source contains nothing, and there are no errors in the Apache error logs.

    Any other ideas?

  378. #378 | Posted November 14, 2008 at 2:41 pm

    Scott — Do you mean this is an existing setup that works for other sites, but setting it up the same way doesn’t work for this one blog?

    Personally I’ve never tried it with a server alias, so I don’t know what issues that might present. I assume that was done because these sites have other parts that are not under the aegis of WordPress?

    Still, if the setup worked for other blogs, I’m not sure why it wouldn’t have worked for your existing one.

    Here’s what to do:

    1) Set up your blog with autonconfig, if that works.

    2) Look in the database and see what new set of tables was just created. This will tell you what VUSER the system is coming up with for that URL.

    3) Create a config file according to that VUSER. Set the table-prefix to that of your existing blog (which should still exist in the database)

  379. Ron
    #379 | Posted November 14, 2008 at 10:14 pm

    Stephen, I finally got it working! This was under Windows.
    There were several things which were not in the readme or any of the comments, but I have it working. I have created four logs, each with a different theme and plugins.

    Thanks,

  380. #380 | Posted November 15, 2008 at 6:57 am

    Scott,

    My guess is that your step 2 and 4 are interfering. You shouldn’t need those. Here’s what I did:

    1. Installed WP on domain.com/blog (no var stuff on FreeBSD)
    2. Followed steps 1-6, but did not create domain.com/blog config file in the multiblog config directory, as it was not stated in the readme.
    3. When going to domain.com/blog it redirected me to the WP install file.
    4. Read this page and found out about “set up a config file specific to the existing blog”
    5. Copied the specific config file to the multiblog config directory.

    Then it worked.

    Hope this helps. Stephen I urge you to add that one instruction to the readme file as it will save people a bunch of time.

  381. #381 | Posted November 15, 2008 at 5:53 pm

    Ralph — Info on creating custom config files is in the readme.

  382. #382 | Posted November 19, 2008 at 5:37 pm

    I’m confused on the setup and think some step-by-step detail might describe my problem and maybe help with the answer. I notice a lot of your replies are “read the docs’. Well I’ve tried and I’m still lost. Can you see my mistake?

    1. original- verio hosted with apache server
    domain name a.com
    dir struc

    /www/htdocs/wp-content/plugins etc
    /www/htdocs/wp-config.php

    2.ask server to “point” an unused domain name b.com to root dir of a.com –not sure if that

    will be @www or www/htdocs but I figure I’ll be able to figure that out when the dns resolves.

    3. download multiblog. sounds perfect – don’t like redundancy and don’t want to mess with wp mu.
    took these steps;
    a.
    www/htdocs/wp-content/multiblog

    b.
    www/htdocs/wp-config.php (from multiblog)
    www/htdocs/wp-config-vmb.php (from multiblog)

    c.
    www/htdocs/wp-content/multiblog/config/mb-config.php (just renamed it0
    www/htdocs/wp-content/multiblog/config/mb-autoconfig.php (renamed it but did not edit it

    because which db info did it want?)

    d. on to advanced instructions!
    www/htdocs/wp-content/multiblog/config/mb-users.php (renamed file)
    edited file (vital parts) which now looks like this;

    $vusers[] = ‘b.com’;
    $vusers[]=’a.com’;
    $vusers[]=’b.com/b’;
    $vusers[] = ”;

    e. gone this far, might as well give them their own config file

    www/htdocs/wp-content/multiblog/config/…

    mp-config-a_com.php (load a’ db info)

    mp-config-b_com.php (load b.db info)

    NOW my status;

    server did find a’s info in multiblog/config because i got syntax errors from the mb-users.php

    file. fixed errors get this message:

    Error establishing a database connection…

    So Where did I fail.?

    Thanking you in advance for your advice.
    Jean

    PS – I would be very unhappy if someone tried to monetize me.I think I got lost between the easy and the advanced instructions. Perhaps if you created a flow chart with decision branches you’d have more successes with novices who, I think, are more likely to respond with a donation.

  383. #383 | Posted November 20, 2008 at 12:16 pm

    Jean — First off, this is a mistake: mb-config.php

    mb-config-sample.php is the sample for making the VUSER-named files. I don’t _think_ that would cause problems, but it might. Put the “-sample” back.

    You also should not have the blank at the end of the $vusers[] list. However, I don’t think that’s the problem either (but you should clean it up anyway just in case it is).

    The error you’re getting suggests that you simply have a mistake in the DB information you entered into the config files. It’s identifying the config file, and loading it, but throwing an error when it tries to access the DB.

    For the documentation, I’m considering a few options. It does need improvement. (“As time allows” as always!)

  384. #384 | Posted November 21, 2008 at 3:47 pm

    Wow! that semed too easy!, I have to check that I have not done anything wrong, really

    I followed step 1 to 4 in the Easy Setup
    then I created a folder, loaded the url in the browser and up popped the WP Admin login form, everything working perfect.

    I was under the impression I would have to create subdomains in cpanel but all I have to do is create folders and load a url into the browser and I have another blog.

    JZ please confirm I have not missed anything, just seemed too darn easy :-)

    Lee

  385. #385 | Posted November 21, 2008 at 4:50 pm

    Glad it worked easily for you. That’s what’s supposed to happen! ;)

    The biggest thing I need to clarify in the instructions overhaul is that subdomains vs. directories are *optional*. Most people do subdomains OR directories, but not both. (But you *can* do both if you want to.)

    Thus, people using subdomains don’t need symbolic links. People doing directories don’t need subdomains.

  386. #386 | Posted November 23, 2008 at 8:03 am

    That’s great!. Have you tested how these virtual blogs are doing in the search engines?

    Lee

  387. #387 | Posted November 24, 2008 at 3:05 pm

    [...] ?????????? ???????????? ??????????? (?? ????????!) Virtual Multiblog. ??????? ????????, ??????? ??????????? ?????? WP ?? [...]

  388. #388 | Posted November 28, 2008 at 6:47 pm

    I had a go as per your answer:
    “Beyond the regular procedure for VMB, you should set up a config file specific to the existing blog, and set it to the same table-prefix as the original. This way, it will look in the database and find the existing tables for that blog, and use them.”

    …but still failed to activate a blog using existing db instead of a fresh install.

    Could you please elaborate a little more :)

  389. #389 | Posted November 30, 2008 at 8:48 pm

    Hi Stephen–

    I have been successfully testing multiblog for a couple of months and it has been working well. Just two problems that I hope you can help me with:

    1) I built our test blog deep within the site but now would like it to become the home page. I changed BLOG_ADDRESS on the sites WP Setting page and followed the directions on http://codex.wordpress.org/Giving_WordPress_Its_Own_Dir... but all I get is a message about an infinite loop. I tried switching on your new variable: VMB_ACCEPT_REDIRECTS but it didn’t help. Any ideas?

    2) My second problem is just one of my blogs acts weird–
    http://bioquest.org/oakwood_2008
    If you click on either the Malaria or Cassava tab it takes you to a completely different blog… The only fix I have found is to go in daily and create a new page, then delete it and suddenly everything works for awhile. Have you ever seen anything like this?

    Thank you much for a great product and your support of it!

    Stephen

  390. Jerm
    #390 | Posted December 2, 2008 at 11:03 pm

    I didn’t see this in the docs, feel free to RTFM me if I missed it, but what’s the story with WP updates? I’m guess you’d have to go through each site and click the update button to get the DB updates into each site’s DB, yes? Is there any shortcut to this?

    thanks

    Jerm

  391. #391 | Posted December 3, 2008 at 8:27 am

    Jerm — that is indeed the case. I understand that some people write PHP or command-line scripts of some sort to call the update.php file for each domain. I haven’t done that though, and can’t help much with the “how”.

    Another one for the “maybe in the future” pile.

  392. #392 | Posted December 3, 2008 at 1:12 pm

    Stephen,

    I setup several blogs using separate config files so that I can define separate database for each blog.

    What I observed is that only the default db defined in mb-autoconfig.php get used i.e. the db is still shared between blogs. Dbs defined in mb-config-VUSER.php didn’t get used. What did I do wrong here?

  393. #393 | Posted December 3, 2008 at 2:11 pm

    Karrut — You should not actually use define() in config files. You set an element of $vmb_const[], e.g.:

    $vmb_const['DB_HOST'] = 'localhost';

    See the Virtual Multiblog 2.5 announcement for more info.

  394. #394 | Posted December 3, 2008 at 6:43 pm

    Stephen,

    All my agony was due to one thing that I didn’t do.
    I did not remove “//” that precedes $vmb_const[]!
    So now I have all my blogs to their individual db’s.
    Thanks Stephen.

  395. #395 | Posted December 4, 2008 at 12:41 am

    Hello Stephen,
    your solution would be the perfect, tailored solution for my needs.
    What’s missing from taking advantage of it, is that I have to install it :-)
    I have some experiences on Apache but I’m not a “Platinum Geek”. And in my case, I have to handle the install on a shared hosting (Bluehost) with all its obvious limitations.
    I will record any problem I possibly encounter, and report them to you…

    Stefania Castelli

  396. Scott Granneman
    #396 | Posted December 7, 2008 at 12:13 am

    With WordPress 2.7 coming out soon, does anyone know if upgrading VMB from 2.6.x to 2.7 looks problem-free? Anything we should know?

    Thanks!

  397. #397 | Posted December 7, 2008 at 10:26 am

    I’ve been running 2.7 on a test server for a while with no problems. I’ve just updated this site (the one you’re looking at) to 2.7 RC1.

    I have no reason to believe any of the 2.7 changes will adversely affect VMB.

  398. #398 | Posted December 8, 2008 at 9:11 pm

    Hi Stephen,

    I’ve been using multiblog successfully for a couple of months, but have come across an issue that I have not been able to solve. I would like to use the same users table for both blogs, and have users log in and out of both sites simultaneously.

    Here is the post I’ve followed to have the second blog use the same users table:
    http://justintadlock.com/archives/2008/09/20/installing...

    Here is the post I’ve followed in an attempt to have users log in and out of both blogs simultaneously:
    http://engine.taffel.se/2008/11/18/multiblog-single-log...

    I happened to notice that one of the “to dos” in vmb-core.php is “Universal login!!!” – it looks to me as though you’ve had the same idea. Does this mean that a future version of VMB will give us the option of sharing a users table across several blogs?

  399. #399 | Posted December 8, 2008 at 11:37 pm

    David — Thanks for the links; they may be useful.

    Yes, somewhere down the road I would like to implement that. Sharing the same tables is simple — but that’s only half of it, as users created in one blog will show up in the other blog, but not have any rights. The table-sharing is somehow connected to WP MU, and not really meant for use in WP standard, if I understand correctly. Still, I trust there is a way to do this.

  400. #400 | Posted December 11, 2008 at 10:53 pm

    I have an issue with the new 2.5 when it creates VMB_URL based on VMB_DIR. Unforuntately on my host (Dreamhost), the VMB_DIR does not contain the $_SERVER['DOCUMENT_ROOT'], so the replacement to create the URL from the DIR fails. The applicable diagnostics are included below:

    VMB_DIR : /home/.amerito/deltatee/wordpress-install/wp-content/multiblog
    $_SERVER['DOCUMENT_ROOT'] : /home/deltatee/wordpress-install

    This leads to

    VMB_URL : http://moo.plaidcow.net/home/.amerito/deltatee/wordpres...

    instead of

    VMB_URL : http://moo.plaidcow.net/wp-content/multiblog

    Aside from hardcoding the value in wp-config-wmb.php or ignoring the 404′s on Ozh’s icon, is there anything else I can do to make it work?

  401. Henry Hartley
    #401 | Posted December 12, 2008 at 10:11 am

    Any idea what will happen if I install the new version 2.7 of WordPress? I mean, I guess I could just try and see but it sounds like a big set of changes. Also, do you know if their “automatic update” feature will work with the multiblog setup?

  402. #402 | Posted December 12, 2008 at 10:16 am

    This site is running on WP 2.7 and Virtual Multiblog. No problems. The way VMB works, I would not commonly expect problems from WordPress updates.

    Oh, and automatic update works fine as well. When updating, WP doesn’t delete your config file, nor does it change things in your wp-content folder. VMB is pretty much contained in those two places. :)

  403. #403 | Posted December 14, 2008 at 5:08 pm

    [...] Nerdaphernalia » Virtual Multiblog for WordPress (tags: wp plugins multiple) [...]

  404. #404 | Posted December 15, 2008 at 10:52 pm

    [...] one fine day as I was surfing for plugins, I came across Nerdaphernalia’s Virtual Multi Blog that offers a script (originally used as a plugin) that lets you create multiple blogs using [...]

  405. #405 | Posted December 16, 2008 at 6:15 am

    Are the paged comments on your site working properly? I have been unable to access anything but the most recent few comments in Safari and Firefox.

  406. #406 | Posted December 16, 2008 at 12:23 pm

    Paged comments are working on this page, as you can probably see; but I’m not using the native WP 1.7 ones — I use the Pages Comments plugin. On my test server I’ve been testing out the “native” version, and getting a weird bug (When you post a comment, it takes you to a “comment page” that’s way too high — thus no comments showing.)

    I don’t believe it’s related to VMB, if that’s what your thinking about, but I haven’t fixed it yet — so can’t say absolutely.

  407. Timmy
    #407 | Posted December 16, 2008 at 9:26 pm

    Hi, I’m curious about how to handle other plugin upgrades. Say a plugin has a database change/addition in the upgrade. Most of the time you wouldn’t know if it does or not unless you read the change notes or look at the code. So, how would you handle upgrading a plugin with database changes for each blog after the first one(thinking it would only show as an old plugin once since you just replaced the master files)? Or am I mistaken and it will always show for each blog that you need to update?

  408. #408 | Posted December 16, 2008 at 9:56 pm

    When you upgrade a plugin, you are upgrading the same files seen by all the blogs. The plugin should be able to handle this though — I would be hard pressed to think of a plugin that makes you manually make changes to the database!

  409. Timmy
    #409 | Posted December 17, 2008 at 11:48 am

    Yes, but the database changes are done when you add the new files and run the upgrade in the admin. It would only change the database files that that blog is connected to. So all the files are indeed changed for all the blogs, but what about the database. I’m still not seeing how the database would get updated for blog #2, 3… when you only run the update on blog 1.

  410. #410 | Posted December 17, 2008 at 6:17 pm

    I guess I’m not sure what exactly you mean by database changes. Automatic Update basically deletes the plugin, and installs the new plugin files. That’s all. In VMB you do it for all blogs at once (because they’re all using the same files.)

    If you’re referring to the count of how many plugins have updates available, the other blogs figure it out pretty quickly.

    You can also update plugins at any time via FTP without going through the automatic update function. For other blogs, it’s no different than that — the files are suddenly different.

    Putting it another way — I’ve been using Virtual Multiblog on this site for years now (currently running WP 2.7), and have had no problems with plugin updates.

  411. Timmy
    #411 | Posted December 17, 2008 at 7:53 pm

    No you are missing the point. I’m not talking about the files. I’m talking about the database and any tables or entries the plugins make during installation and updating of plugins. Each blog is not using the same database.

    If a plugin has a table that it added during the initial installation of that plugin. Now that plugin has the 2nd version out and there the author added a field to the table structure. So the 2nd version is to update the table structure. Running the update will update the 1st database.

    How does the 2nd blog know to update its database? Will it show up in the admin of the 2nd blog that it still needs to update even though the files have been updated?

  412. #412 | Posted December 18, 2008 at 7:54 am

    Timmy — In all cases, including a plain vanilla install of WordPress (without VMB), the plugin must handle this itself.

    When you run auto-update on a plugin, all it does is delete the old files and replace them. If you update via FTP, you are deleting the old files and replacing them. (Note: Auto-update does *not* trigger the deactivate/activate hooks in the code.)

    So there is no difference between regular WordPress and running it on Virtual Multiblog, with regard to updates to plugins. If a plugin requires that you manually deactivate/reactivate it, then it will have issues with any of the above scenarios, including regular auto-update. That’s a bug in the plugin.

  413. #413 | Posted December 20, 2008 at 8:33 pm

    Actually, on this site I can only look at the last page of comments posted. The numbered links have no effect on what comments are being shown. (The “Show All” button does work, however.)

    Do you have any suggestions for the question I raised in comment #400? For now, I had to hand edit the VMB files to be specific to my install.

    Also, though I am subscribed to the entry, I never get notification of new comments.

  414. #414 | Posted December 29, 2008 at 2:55 pm

    Regarding pages comments — I’m using the Paged Comments plugin, and the most recent update seems to fix the problems.

    I have not yet gotten the new “WP standard” paged comments working with VMB on my test server, but I don’t know if it’s a bug in WP or VMB or something else entirely.

  415. #415 | Posted December 29, 2008 at 6:57 pm

    [...] Virtual Multiblog [...]

  416. #416 | Posted December 29, 2008 at 10:43 pm

    [...] Virtual Multiblog [...]

  417. #417 | Posted December 31, 2008 at 3:28 pm

    Hi–

    I’m trying to replace my current homepage with a blog. The backend works fine (http://bioquest.org/wp-admin I can build away) but when I try to view the home page it seems to go in an endless loop of loading the favicon.ico over and over again. access.log says this over and over:
    X.X.X.X – - [31/Dec/2008:16:15:34 -0500] “GET /index.php HTTP/1.1″ 301 – “-” “Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5″
    X.X.X.X – - [31/Dec/2008:16:15:35 -0500] “GET /index.php HTTP/1.1″ 301 – “-” “Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5″
    X.X.X.X – - [31/Dec/2008:16:15:36 -0500] “GET /index.php HTTP/1.1″ 301 – “-” “Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5″

    while error.log reports this over and over:
    [Wed Dec 31 16:15:37 2008] [error] [client X.X.X.X] \n\tVirtual Multiblog v2.1.1 — Diagnostics\n\t\tABSPATH = /var/www/Documents/wordpress/\n\t\tVUSER = bioquest.org\n\t\tvmb_get_bloginfo( ‘vuser’ ) = bioquest.org\n\t\t$_SERVER['SERVER_NAME'] = http://www.bioquest.org\n\t\t$_SERVER['PHP_SELF'] = /index.php\n\t\t$_SERVER['HTTP_HOST'] = http://www.bioquest.org\n\t\t$_SERVER['SCRIPT_NAME'] = /index.php\n\t\t$_SERVER['DOCUMENT_ROOT'] = /var/www/Documents\n\tEnd Diagnostics\n\t
    [Wed Dec 31 16:15:38 2008] [error] [client X.X.X.X] \n\tVirtual Multiblog v2.1.1 — Diagnostics\n\t\tABSPATH = /var/www/Documents/wordpress/\n\t\tVUSER = bioquest.org\n\t\tvmb_get_bloginfo( ‘vuser’ ) = bioquest.org\n\t\t$_SERVER['SERVER_NAME'] = http://www.bioquest.org\n\t\t$_SERVER['PHP_SELF'] = /index.php\n\t\t$_SERVER['HTTP_HOST'] = http://www.bioquest.org\n\t\t$_SERVER['SCRIPT_NAME'] = /index.php\n\t\t$_SERVER['DOCUMENT_ROOT'] = /var/www/Documents\n\tEnd Diagnostics\n\t

    Any thoughts on what is going wrong or how to turn up the error log so that I can figure it out?

    Thanks much and HAPPY NEW YEAR!

    Stephen

  418. #418 | Posted January 7, 2009 at 11:01 pm

    [...] Virtual Multiblog [...]

  419. #419 | Posted January 8, 2009 at 9:55 am

    @Stephen — First off, try the latest version of Virtual Multiblog — it’s on 2.5 now. The diagnostic says you’re using VMB 2.1.1.

    Beyond that — without knowing anything about your setup (e.g. where are the actual WordPress files? What symlinks or other domains are you using?) there’s not much I can say from that. Something somewhere is doing a redirect. What’s in your .htaccess?

    (Hint — turn off “pretty permalinks”, comment the WP stuff out of .htaccess, and see what that does.)

  420. #420 | Posted January 9, 2009 at 4:26 pm

    [...] WordPress?2.7???????????????????????????????????????????WordPress????????????????????????????WordPress?????????????????????????????????????????????????????????????????? Virtual Multiblog for WordPress – Nerdaphernalia?????WordPress???????????????????????? [...]

  421. #421 | Posted January 10, 2009 at 12:05 pm

    Hi – thks for your efforts on behalf of the community! I’m addicted to mac osx also and looking to light up my domain portfolio (190+ names registered in 2000) as wp blogs – I’m researching the best way to approach it – I want to maintain one admin control for all and then farm out each blog to authors – mu seems too static – I’ve found several plugins – yours among the most interesting – not a technician however – just researching for my partner who has a ft job – thks

  422. #422 | Posted January 10, 2009 at 1:53 pm

    Carl –

    VMB won’t give you a “united” admin section, but you can read this article on customizing the WP setup process. With this, you might make it so that the “Admin” user for each now blog automatically has the same password (for example).

  423. #423 | Posted January 14, 2009 at 12:11 pm

    Has there been any progress on the issue I brought up in comment 400 about the need to change wp-vmb-config to hardcode the directory names?

    http://striderweb.com/nerdaphernalia/?page_id=46&cp...

    Hardcoding the values works fine, but I’m I know I will probably forget and overwrite the file during the next release.

  424. #424 | Posted January 14, 2009 at 11:52 pm

    I’ve had a small (but frustrating) issue with VMB, which is that if I have multiple blogs all in the same directory (via the symlinks approach), and I use a wordpress plugin like Google Sitemap to create a file like robots.txt or the content map, those files collide with each other from one blog to another. And the problem is that those files are kinda fixed to the single name (because of the dependency that other services rely on the fixed nam), and so there doesn’t appear to be a good way to “virtualize” the different versions of those files based on the URL.

    I’m thinking maybe something like mod-rewrite to solve it, but this could be a little messy, and it’s certainly not going to be automatic.

    Do you have any thoughts or suggestions on this?