Madhurie Singh . Com

How to build my own web site from my wordpress blog !

Archive for the ‘Website Database’ Category

Creating Multiple subdirectories wordpress installation in one single database one domain.

Posted by Madhurie Singh on September 12, 2009

I am gonna try creating multiple wordpress installations as I have three wordpress blogs that I want to publish in one domain.

I initially thought of trying different database for different installations but then I realised I will have lots of back related work in future!

Also I know my target readers will be nearly the same like minded people who are like me and want all that I seem to be writing about.
So keeping all related data in one database makes sense provided I keep different tables for different wordpress installations.

Now I have done it for my four blogs, ofcourse only the database and wordpress installation part till today.:) But that is an achievement.
I encountered 500 internal server error, then 404 page not found and multiple redirection to a url as errors :(. But I managed to solve but the internal sever error. See my next post for the 500 internal server error solution.

So to start with when I have three blogs which I want to install in one domain, I must have a way to redirect people to each one of them seprately, right?
So it makes sense that I create a homepage where I will have all the links to my several other blogs.

So for that homepage also I created a separate wordpress installation. I name it homepage obviously.

Since when ever someone types in my domain url i.e. http://www.madhuriesingh.com, I want it to goto the homepage.

So I create a subdirectory in the root /public_html a subdirectory called “Homepage” and install wordpress in it through the Simple Scripts. All the files are now under one subdirectory call /public_html/Homepage .

Now I make a temporary directory in root directory, and name it “Tempdir”. so I have public_html/Tempdir

Again I select the “Homepage” directory, and copy it into “Tempdir”.

Then I rename this copied directory which has same name as “Homepage” as my new Blog name i.e. “OnlyForKids”

Now I move this subdirectory from “Tempdir” to my root directory /public_html/OnlyForKids

So now under root directory I have three subdirectories

/public_html/HomePage
/public_html/OnlyForKids
/public_html/Tempdir

I delete “Tempdir” .

Now I type http://www.madhuriesingh.com/homepage .

I am taken to the page where wordpress wants me to enter the Blog Name and my email id .

After I enter the details, a login id and password is generated by wordpress. I copy the password and login the admin page of my blog.

The first thing I do is change the password in my profile page to a more memorable password.

I repeat the same procedure for my other blog and type http://www.madhuriesingh.com/OnlyForKids.

Again I get new login and new password for the second blog.
I change the password and I own two different blogs under one domain name but a single database.

Now I need to change the URL such that, even when I type http://www.madhuriesingh.com I am actually redirected to the subdirectory URL http://www.madhuriesingh.com/homepage !:)

So to enable this, I first goto the admin page of my first blog, HomePage.

I select the settings page.

Here I leave the first URL, i.e. WordPress Blog URL as it is to http://www.madhuriesingh.com/homepage
but I change the second line i.e Blog URL as typed by others to http://www.madhuriesingh.com
I save this setting.

Now I go back to the cPanel of my webhost.
Here I locate the index.php file under the subdirectory HomePage.

I COPY (not move) the index.php file from subdirectory HomePage to the root directory /public_html

Now I open the index.php file in any editor.

I goto the line 17 and change the call
require(‘./wp-blog-header.php’); to require(‘./HomePage/wp-blog-header.php’);

I save this index.php file and close it.

Now I type in browser http://www.madhuriesingh.com

I am taken to the url http://www.madhuriesingh.com/HomePage directly ! 🙂

yippppppppyyyyyyy I have done it again !:)

Posted in Website Database | Tagged: , , , , , , | 21 Comments »