Madhurie Singh . Com

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

Archive for the ‘Migrating Wordpress Blog’ Category

Deciding to Install wordpress in a subdirectory/ root on webhost of my website!

Posted by Madhurie Singh on September 8, 2009

I have now installed wordpress more than 50 times 😛 !

And I realize a few very important things in deciding where to install wordpress.

A: WordPress in the Root directory i.e. /public_html

This is a good idea only for those who have intentions to work with only one blog.
If tomorrow, I wish to start a new blog, like this current blog http://www.singhmadhuri.wordpress.com, then I will have problems.
I will then have to either create a separate subdirectory for the second blog2 or I will have to move the blog1 first into a subdirectory and then create a new subdirectory for blog2. Now moving wordpress installation to a subdirectory later at any point is tricky always.

B: WordPress in the subdirectory right from the start under Root directory i.e. /public_html/Blog1

This is an excellent idea. Any fresher must do this to have a clean root directory and have all wordpress installation of blog1 in a subdirectory called blog1.

If tomorrow I wish to install a second wordpress blog2 in the root directory, all I have to do is create a new subdirectory under root called blog2. i.e. /public_html/blog2

Also the problem of my URL with and added subdirectory name is solved by using the facility called “Redirecting WordPress” through CPanel. So people have to type only one url everytime to reach any of my blogs. i.e. http://www.madhuriesingh.com

C: WordPress installed in the root when I have only one blog, blog1. But later on I migrate the blog1 to a subdirectory under root directory called public_html. Now my final path looks like this /public_html/blog1

Posted in Migrating Wordpress Blog | Tagged: , , , , , , , , | 16 Comments »

Migrating wordpress from root to subdirectory on webhost!

Posted by Madhurie Singh on September 7, 2009

Tonight I will make a subdirectory for wordpress files to keep the root directory clean.

My root i.e. /public_html has all wp_ files that were created after SimpleScripts installed wordpress. Then other files were added after I imported wordpress.date.xml file through my wordpress site admin page.

I am creating a subdirectory say ONLY4KIDS where all my wordpress files will be moved.

I go to my CPanel and make a new directory under public_html. I name it as Only4kids.
Then I select all files except index.php and .htaccess files and move them into subdirectory Only4Kids.

move all wordpress files to subdir

The subdirectory is created.
created now subdirectory for wordpress

Now I need to change the link address from http://www.madhuriesingh.com to http://www.madhuriesingh.com/Only4kids throughout my database.

For that I Click phpmyadmin in CPanel. Then I click the database connected with this wordpress. In my case it is madhurie_wrd01.
I then select all the tables preceding with wp_ .
select all tables in original table and export

Then I click EXPORT button on top. An sql file containing all my database details and content is downloaded to my laptop. This file is madhurie_wrd01.SQL
exporting the tables to change wordpress to subdirectory

Now I open this SQL file in an editor and find all http://www.madhuriesingh.com with http://www.madhuriesingh.com/only4kids.
I save this sql file.
change all urls to new url with subdirectory

Before I upload it back to the database, I select all the tables and drop them.
drop all tables and import the file which has updated url

Now I click IMPORT and select the updated SQL file madhurie_wrd01.SQL
import all updated tables in database

So now all places where the reference to http://www.madhuriesingh.com are changed to http://www.madhuriesingh.com/only4kids

Now I need to change the index.php file line 17. The index.php file should be in the root directory where I change this line 17.

I change line 17 ie require(‘./wp-blog-header.php’); to require(‘.only4kids/wp-blog-header.php’);

But I get this error message when I load my site http://www.madhuriesingh.com

Warning: require(.only4kid/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home8/madhurie/public_html/index.php on line 17

Fatal error: require() [function.require]: Failed opening required ‘.only4kid/wp-blog-header.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home8/madhurie/public_html/index.php on line 17

Lemme try to change the path in settings on the wordpress admin page.

OOPS 😦 !!!!
I am getting same error message here too !!!!!!!!!!!!!!!

Ok lemme guess, maybe the path has some minor error.

I will rewrite line 17 of index.php with a front slash before the subdirectory only4kids
require(‘.only4kids/wp-blog-header.php’); to require(‘./only4kids/wp-blog-header.php’);

I save the index.php file and load my site again.

YIPPPPPYYYY it works!

There is my baby .
mysite after migrating to subdirectory

reference
http://sandboxblogger.com/giving-wordpress-its-own-directory/comment-page-1/#comment-1890

Posted in Migrating Wordpress Blog | Tagged: , , , , , , , , | 1 Comment »

How to change links within wordpress posts after migrating!

Posted by Madhurie Singh on September 4, 2009

Now that I got my site up.

I will check for a few things to make sure the pages and content are correct.

I click on the page Indian Mom’s Reviews4Kids.

I see everything fine. In the last paragraph, I see a few links to other pages.
My site page with correct site name and link name

I click on School Reviews.
The page which opens is not in my site http://www.madhuriesingh.com, but it opens the page in http://www.madhuriesingh.wordpress.com !!! 😦

My links within posts directs  to wordpress blog

Obviously the links do not update when the wordpress is migrated !

I have to change all the links myself.
SO I click phpmyadmin and click the table that is for this website.
click myphp to goto tables

Now I click the table meant for this website. madhurie_wrd01
Click the table for which the links have to change

Now I select wp_posts in the table madhurie_wrd01.
Then I click export button. And save the sql file.

export the wp_posts to edit the links

Now I open the wp_posts table in any editor, find and replace all http://www.madhuriesingh.wordpress.com to http://www.madhuriesingh.com
Save the file.

find and replace all links

Now I go back to myphp and drop the wp_posts table.
drop wp_posts table to import updated file

Now I will import this updated wp_posts.sql file back into the tables lists.
import back changed wp_posts file

There I am done with my changing of all the links that were pointing to the wordpress blog back to my site posts. 🙂

Now lemme test the links again.

I click on the School Reviews link in the page Indian Mom’s Reviews4kids of my site http://www.madhuriesingh.com

Yippy! I am taken to the correct page School Reviews within my site. 🙂
my links corrected page

Posted in Migrating Wordpress Blog | Tagged: , , , , , , , , , , | Leave a Comment »

Exporting, Importing, Settings of WordPress for My BLOG Website!

Posted by Madhurie Singh on September 2, 2009

Once the installation by SimpleScripts of WordPress is complete, I received a mail and a pop up page confirming the site URL and the site administration path. The email sent by SimpleScripts also mentions the password of the database.

This is the Page on successful installation of wordpress.

Page on successful Worpress installation

When I clicked on the URL HTTP://WWW.MadhurieSingh.Com , I was taken to my own site! WOW what feeling! This is what I saw:
MY Blog Page

Earlier I had done some mistake in naming the database. So when I clicked my URL, I was taken to this Default.HTML page!
first look of my site

It’s got My site name and a few ads, that’s all!

Since I am still learning, I glad I did this mistake. I know now that to install wordpress the best way is to let all default settings run initially. Later all these details can be changed.
So I again go back to the SimpleScripts. The page shows my earlier WordPress installation script. I click Uninstall to remove the last installation of database and other details.

When I had tried to access http://www.madhuriesingh.com/wp_admin, it had shown my this page.
Error while accessing the wordpress wp_admin1

Whenever I get this kind of erroneous page, I have the liberty to delete the wordpress script that I had installed last. And start a fresh Install on WordPress.

But this privilege is exercised only because I have not yet announced my website to the world. I am in my testing stage which is the most crucial step. I am in mood to hurry up. I may take 2 more months before I am confident to launch the website http://www.madhuriesingh.com to the world.

Now I have to export the wordpress files from my http://www.madhuriesingh.wordpress.com to my computer.
SO I go to the wordpress blog. Click Export under TOOLS.
exporting wordpress blog

An xml file will be downloaded and saved in my computer. wordpress.date.XML

Now come back to my site admin page http://www.madhuriesingh.com/wp-admin page.
Here I Click IMPORT under TOOLS.
Click Import under Tools in WordPress Admin page

I am again taken to the page where I have to click WordPress that is found in the last row.
I click WordPress

I select the xml file which was downloaded as wordpressXXX.xml .

Click wordpress after Import button is clicked

When I click Import button in Tools of wordpress
The uploading of all posts, images etc begin one by one.
while importing wordpress xml file from my computer
And there I am, DONE with my wordpress IMPORT! 🙂

Now when I go back to my site http://www.madhuriesingh.com

I can see the posts written by me with pictures and pages.
my site after wordpress is imported

The Site Title is still “MY BLOG” 😦

So now I have to change the Settings so that my site looks more personalized.

I click GENERAL SETTINGS and change the BLOG TITLE to “MADHURIE SINGH.COM”

Change the Tag line that always follows the BLOG TITLE to “All about Kids, product review….”

Change other settings, time zone, date and time format etc.
settings page of wordpress site

I save the settings and click the WRITING SETTINGS, be enabling everything.
I leave the mail setting untouched and save the setting.
writing settings for wordpress site

Next I change the READING SETTINGS.
Here there one very important setting to be done in order to have a static homepage, instead of the recent posts that appears in the home page.

I first create a new page with title “Indian Mom’s Review’s for Kids” and add content that I want to appear on my homepage always. I assign this page as Front Page under STATIC Page.
Then I create another page called “RECENT POSTS” and assign it for Posts Page. This page “Recent Page” now will show all my recent posts, instead of the Home page.
How to make a static home page in wordpress

I save these settings.

And click Discussion Settings. Here I make sure the comments are nested and needs moderation.
discussion setting for wordpress site

I click save button.

I leave the MEDIA and PRIVACY settings as it is.

Now I click an important setting called PERMALINKS.
This setting allows how the posts will be indexed and appear in the search. It’s important that I change it to
Day and name http://www.madhuriesingh.com/2009/09/02/sample-post/

This way the search engines will be easily searching the file headings instead of some numbers.

Permanent setting of the posts in wordpress site
I save the settings.

The last setting I have to make is under MISCELLANEOUS settings.
This has the path name where all files will be uploaded into my server directory.
Default is wp-content/uploads and I should not touch it unless I am changing my subdirectories.
Then in order to organize the Uploads into months and year folders with time track, I click the other two options too.
Miscellaneous setting of wordpress site

I save the last settings.
Now this is how my Site looks. 🙂
My site after settings changed

Mission Completed 🙂

In the next post I will be try to install the wordpress into a sub directory by shifting all the wordpress files from root directory i.e /public_html to sub directory say /public_html/only4kid

Posted in Migrating Wordpress Blog | Tagged: , , , , , , | 16 Comments »

Is it better to install WordPress in Root or Sub Directory?

Posted by Madhurie Singh on September 1, 2009

I am a bit confused on whether to install wordpress in the root directory or in a subdirectory under root?

http://www.techcounter.com/wordpress/install-wordpress-files-to-a-subdirectory-but-run-your-blog-off-the-root-directory/
This is an excellent site that solved my dilemma and confusion.

I really want to install my wordpress in a subdirectory, simply because, I have future plans to install more blogs under the same root directory of my domain. But if I install in wordpress in the root directory http://www.madhuriesingh.com, I will have a clutter of several directories and I am sure I will mess my web life worse than a fly caught in the spider’s web.
SO I am gonna create a separate sub directory for my wordpress installation under Root directory. I will call this say “only4kid”. Now this will have path name as http://www.madhuriesingh.com/only4kids/

Now if I go by the normal rule, anyone who wants to goto my website has to type “www.madhuriesingh.com/only4kid ! Naah! This is bad. Why will anyone want to remember or type so many words to reach my site. Unless it’s popped up by the search engines!

I want people to remember only one thing, and that is my name, which is my site name.

So the solution is to go change the path address for accessing the data and
to change the path address that readers will be typing to access the data in my site.
Confused?

Ok let me simplify this.

I live in a house, where my hubby and my two kids also live. We have a separate room to each of us. But when we give our address to anyone, we give the address of our flat. We do not mention which room 🙂
But when they reach our home, we direct them to the exact room they should go, to meet the right person!

So even if I give my site address as http://www.madhuriesingh.com, I will have to direct my readers to the path address http://www.madhuriesingh.com/only4kid/ 🙂

Now let’s see, how this is possible in WordPress.

Say I have already created a database called Only4Kid in the Root directory /root of my domain on the server provided by BlueHost, while running SimpleScripts for wordpress.
I log into my website, http://www.madhuriesingh.com/Only4Kid. Then I log into the admin page of my site.
I reach http://www.madhuriesingh.com/only4Kid/wp-admin/ .
Goto Settings > General
Make WordPress Address as http://www.madhuriesingh.com/Only4Kid
Blog Address as http://www.madhuriesingh.com
wordpress installed in subdirectory

Now I will save these settings.
I saw my site and got scared! 😦 It’s showing big error message. But that’s ok, it’s suppose to show error, since the site is pointing to wrong path. :p

SO I need to set the path of the wordpress database right, before any other step.
At any point of time, when I have goofed up royally knowingly, all I do is go back to my SimpleScripts and install wordpress database again. But before that I make sure to delete the database and directories created by the last installation. An advice to all new comers. Always keep snapshots of all the your work step by step.
The exact steps to change and move the wordpress from root to subdirectory will be posted in another post.
At this point of time, there are some other basic things that I need to experiment and set up.

A few sites that googled as a result of my search to move wordpress, to sub directory.
http://educhalk.org/blog/?tag=change-url This is the best and I am gonna follow this site.

http://mu.wordpress.org/forums/topic/9542
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
http://www.corvidworks.com/articles/giving-wordpress-its-own-directory
http://samdevol.com/wordpress-troubleshooting-finished-installation-and-it-doesnt-work/
http://www.dailyblogtips.com/always-install-wordpress-on-the-root-directory/
http://www.bizquarium.com/install-wordpress-subdirectory
http://techblog.touchbasic.com/html/single-unified-login-for-multiple-wordpress-2-8-installs-in-subdirectories-using-cookies/
http://blogging.seocompany.ca/wordpress/how-to-setup-a-blog-using-wordpress/

http://www.searchforblogging.com/

Posted in Migrating Wordpress Blog | Tagged: , , , , , , | 5 Comments »