Wordpress

Running two wordpress blogs on the same domain

Today I tried to run two wordpress blogs from the same domain name.
It is entirely possible and works like a charm.

The following are the steps to be used:

1. Download the latest version of WordPress.
2. Unzip the the WordPress files to a folder.
3. Make a second copy of this folder
4. Name the copies of the folder as say blog1 & blog2
5. In each of these folders you will need to create wp-config.php file.
6. To create this you need to edit the wp-config-sample.php file
7. The following items shown are to be edited:

define(‘DB_NAME’, ‘putyourdbnamehere‘);    // The name of the database
define(‘DB_USER’, ‘usernamehere’);     // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’);    // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);

8. To edit the above you will need to first create your databases.
9. Create two different MySQL databases one for each blog in your domain. I’m assuming you have MySQL/PHP on Linux hosting. You will need to use the control panel provided by your web hosting service to create these databases.
10. Note down the parameters with which you set up the database and fill up the wp-config.php file suitably.
11. Upload the blog1 & blog2 folders to your domain to sit at http://www.yoursite.com/blog1 & http://www.yoursite.com/blog1
12. To setup the first blog start with http://www.yoursite.com/blog1/readme.html and follow the standard WordPress install procedure.
13. To setup the second blog start with
http://www.yoursite.com/blog2/readme.html and follow the standard
Wordpress install procedure.
14. Now you will have two different wordpress installations, two different databases and two different blogs.
15. The first blog will be at http://www.yoursite.com/blog1 and the second one at http://www.yoursite.com/blog2.

Have fun with your blogs.

Advertisements

21 thoughts on “Running two wordpress blogs on the same domain

  1. This works fine, but problems occur when I try to activate permalinks. Basically, permalinks on the second blog get directed to the path of the first blog, where the pages can’t be found. I guess it’s a problem that they are using the same .htaccess. Do you have any thoughts on how to get round this?

  2. You can have multiple installations (multiple blog) even in one database if you give a unique table prefix. for each of them . you do need to have 2 folders and 2 DB.
    tnx

  3. This tip is good but are the 2 blog considered to be single site or two different sites? While building back-links, how Google treats its? Also is it possible to create 2 separate feed-burners for this 2 blog?

    1. yes. create a common folder for uploads. and give that folder path in both blog’s upload path section. upload path section can be found under permalinks section

  4. Hi Krishnan,

    Very clear explanation, but i have a question. I have a running Wp site in a directory /wordpress. If someone enters the url of the site for example http://www.site.com there is an automatic redirection to http://www.site.com/wordpress (that is according the installation procedure).
    Now i want to have a second install of wp with a second database in another directory let’s say /site to test out a different theme.
    When the url is entered now how is decided to which installation is redirected?
    After testing the new template i will remove the installation onder /wordpress and want the /site to be the running wp site. Maybe the solution is very simple and the reason i can’t find is is due to my poor knowledge of how wp internally works, but i hope you can send me in the right direction.

    Joop Schor
    The Netherlands

  5. Does one blog only give you a home paged blog for one user I want to have a marks blog dales blog and thd home page that doesn’t change more like a about is page can I do this with one install ?

  6. Everything is very open with a really clear explanation of the issues.
    It was really informative. Your site is very useful.
    Many thanks for sharing!

  7. Hmm it appears like your blog ate my first comment
    (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly
    enjoying your blog. I as well am an aspiring blog blogger but I’m still new to everything. Do you have any points for rookie blog writers? I’d genuinely appreciate
    it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s