Multiple WordPress Blogs Under One WordPress Folder

Multiple WordPress Blogs Under One WordPress Folder
By Allen Michael Gurrea

What is this?

This is a guide on how to have multiple wordpress blogs in just one wordpress folder.

Can I just upload another wordpress folder in my account and use that instead to make a new blog?

I thought about this and I can say that this is the super easiest way. However, it has some drawbacks.

  1. Space – Every time you upload a new wordpress folder, you take up space. The default wordpress (without added themes and plug-ins) is about 4mb big and you have to multiply this to the number of blogs you want to have. For those who have no limits in their web-hosting, this should not be a problem but for those who only have 200mb for their hosting (ehem) it’s a problem.
  2. Upgrade Hassles – WordPress is still under development and new versions are released from time to time. WordPress users needs to upgrade to the latest versions so that they can benefit from the new features and be more secure against exploits. If you only have one wordpress blog, upgrading is easy. But what if you have lots of wordpress blogs? You have to upgrade each of them and that will be a tedious task. It is something someone as lazy as me won’t bother to do.
  3. Adding new themes and plug-ins – These are just for customizing your blog. Generally one them per blog is sufficient but the problem lies in the plug-ins. If you want to add new plug-ins to your blogs, you have to add them manually to each of them. Again, this is a tedious task that won’t be done by someone like me.

Why do you want to do this?

I wanted to do this because I plan to have several blogs for different topics. For example, you want to have a separate blog for your personal life, you dog’s life, your cat’s life and your cow’s life. There are many ways to do this but I wanted to look for the easiest and fastest way to have multiple blogs.

How do we do this?

I thought we will never get here. So now I can guess that you are interested on how this is done. I will do my best to write this guide as clear as possible. If you have any questions or clarifications that you might ask, just do so by dropping a comment. I will update this guide if necessary.

This guide is how I did this so if you have a better way, don’t be greedy and share! ^_^

  1. Before we can proceed, we need to have a few requirements.
    • Stephen Rider’s Multiblog zip file – you can download it from here
    • FTP access to your web hosting account – this will make uploading faster
    • Notepad or any text editor – we have files to edit.
  2. Decide on your blog names (for this guide I’ll use “cat” and “dog”). One of them will be the default blog which in this case is cat. The other blog names are the blogs to add which in this case is dog. Make sure that you don’t have a folder with the same name as dog or your other blog names.
  3. We have two situations here…
    • If you already have an existing blog, proceed to Step 6
    • If you are starting from scratch, just continue reading
  4. Make a folder for your first blog. (I made a “cat” folder)
  5. Upload all the wordpress files in the cat folder (it should look like the screenshot below… please don’t flame me because I just used the C: directory haha)
  6. Make a symbolic link to the cat folder (which should be public_html/cat/)
    • You can a PHP function called symlink() to do this. The syntax of symlink() is this symlink('target', 'link name')
    • For those who want to have an easy way (just like me), do this…
      • Make a new file called LinkMe.php.
      • Copy-Paste this code
        symlink ('target', 'linkname');
      • Replace target with the directory where “cat” folder is located. (Example : 'home/user/public_html/cat')
        Note: Replace user with your own username in your webhosting
      • Replace linkname with other blog name you want. (Example: 'dog')
      • For our example, LinkMe.php would contain…
        symlink (
        'home/user/public_html/cat', 'dog');
  7. Upload the php file (LinkMe.php) you created in step 6 to your public_html directory.
  8. Activate the php file by typing this in your browser,
    • If you get a blank screen, then it’s a success.
    • If you get an error, tell me the error you got.
  9. Remember the zip file by Stephen Rider that I asked you to download in Step 1? Extract it somewhere in your computer first. We need to do some modifications of the files there. To check if we have the same files after extraction, verify that you have these files.
    • multiblog folder
      • mb-config-sample.php
      • mb-functions.php
      • multiblog-readme
      • wp-config.php
  10. Edit wp-config.php that is found in the multiblog folder.
    1. Find this line $vusers[] = 'blog';
    2. Replace that line with the names of your blog.
      $vusers[] = 'cat';
      $vusers[] = 'dog';
    3. Find this line $defaultuser = 'blog';
    4. Since cat is our default blog (mentioned in step 2), it will be $defaultuser = 'cat';
    5. Save the file and close
  11. Back up the original wp-config.php file in your wordpress folder. VERY IMPORTANT.
  12. Upload the wp-config.php file from multiblog folder to your wordpress folder. (Replace it)
  13. Let us go back to the multiblog folder
  14. Make copies of the mb-config-sample.php by naming them as mb-config-default.php (for the cat blog since cat blog is our default blog) and mb-config-dog.php (for the dog blog)
  15. Input your database settings in mb-config-default.php and mb-config-dog.php.
    • I am assuming you know how to do this.
    • If you want to use the same database for both blogs, make sure to change the $table_prefix = ''; in the two files. You can change it into $table_prefix = 'cat'; and $table_prefix = 'dog'; if you want.
  16. Upload the whole multiblog folder inside the wp-content folder. (public_html/cat/wp-content/UPLOAD IT HERE)
  17. Install your new blogs.
  18. Enjoy your multiple blogs under one wordpress folder (see my results in action in this blog and my animeblog)

Unconfirmed Bug # 1:

This bug has something to do with the permalinks. It seems that the blog gets errors on the permalink when the permalink structure is use is /%postname%/.

My unconfirmed fix: I solved this by changing the permalink structure. Right now I am using, /%year%/%monthnum%/%day%/%postname%/

Version History:
1.0 Guide is published
1.1 Unconfirmed bug # 1 inserted
1.12 Unconfirmed bug # 1 with more details

PHP symlink() Function
How to create symbolic links without shell access..
Stephen Rider’s Multiblog

22 thoughts on “Multiple WordPress Blogs Under One WordPress Folder

  1. That’s a pretty good writeup — good instruction, that is. As my comments will attest, what seems clear to one person can be confusing to another, so this can be helpful. πŸ™‚

    In answer to aj batac’s question:

    I’ve been using this method for quite a while now, with a lot of plugins and several upgrades of WordPress. I have had absolutely no problems with upgrades or plugins that were caused by this methodology.

    In fact, the big thing I really like about this method is that I can’t think of how there realistically _could_ be any such conflicts. The only thing we’re changing in the way WordPress runs is that the new config file looks at what directory it is in and loads the appropriate configuration for WP. The software is completely unchanged after the configuration is loaded.

    (I’m not tooting my own horn here. I didn’t originate this method– I just gave it some cleanup and publicized. it πŸ™‚ )

    1. Hi there, thanks for dropping by. Although I implemented this guide yesterday, I think I have not yet completed the setup process. I am still having errors on the other blog (the one that uses the symbolic links). All its permalinks are pointing to the default blog (this blog). For now I am lost on what I should do. -_-

      Solution: I changed the permalink structure of my other blog and it seemed to have solved the problem. I am still monitoring the results of this multi blog technique. ^_^

  2. Thanks for posting this…

    How about if you have an existing blog and want to create another new one, would you know? I’m not an expert. πŸ™‚

    1. Hi there, If you need a new blog in the same domain then this technique would work.

      Personally, I tried this while I already have an existing blog and it worked. Although do read the the unconfirmed bugs I have found… hehe I’m still trying to find out what causes the bug but it can be easily fixed.

  3. hehe. i came across the permalink problem also. my solution was to install each blog to a separate folder.

    i still have lots of disk space left. actually i’m looking for ways to maximize utilization of the space i paid for, since letting more than 10mb become unused feels like being ripped off, y’know. anyway, if the time comes that i’ll be needing more space i’ll check this post. so try not to delete this until then, eh, len?

    good sources, by the way. πŸ˜€

  4. Hehe I have fixed the error. I forgot to set my CHMOD my .htaccess to read-only so wordpress changed it thus giving me the permalink errors. But now it’s fixed and working.

    Hmm as long as this blog is online, this post won’t get deleted. hehe

  5. thanks for sharing the fix.. im still waiting for my hosting service to put up one soft link.. but apparently i don’t have to.. according to step 6.. hmm.. let me check..

    tnx again..

  6. forgot the error but it’s ok now.. (asked the ISP to do it for me.. πŸ™‚

    anyway, how about if you have an existing blog? hmm.. let me do a little Googling…

    1. Yes, you can still use this even if you have an existing blog. However, I discovered a few disadvantages to this method when compared to installing wordpress separately per blog. ^_^

    1. One disadvantage that I found is that when you want to create sitemaps. Since the other blogs reside on a virtual folder (sym link), they still point to the same folder and thus when each of the blogs create their sitemaps, they overwrite each other. Well, it’s just a minor disadvantage… hehe

      1. Hi,
        Thank you for all the helpful info. I have a couple of questions to clarify I understand the whole thing (I am sorry, I am still learning).
        I have troubles to understand step #15. How do I input database settings?
        #17: What do you mean by install? Do you have to un this PHP somehow in the cpanel?
        Also, when you use both folders i.e. β€œdog” and β€œcat,” do they share the same google rank or are they treated as separate domains?
        Thank you very much and I apologize for my trivial questions.

  7. Hi pals,
    I am a Newbie in WordPress. I need multiple blogs in a Single
    installation of wordpress. I look “multiblog” mechanism , but it’s
    not Working Properly , I don’t Get the idea How it can Setup in
    localhost system properly first. At last I found WordPress MU ,
    I install same , it’s Work well …. But I don’t know how to setup
    new Blogs in there. Do any one give a Work around for same first in my
    localhost. Then I need To do same online…. So Please Give a Solution
    As Early As Possible…

    with Regards
    Anes P.A

Leave a Reply