Monthly Archives : March 2010

How to turn WordPress URL into Web Domain URL

Post on March 31st,2010 by Posted in programming languages| Tagged in , , | 2 Comments

I have been very busy all week long trying to set up my website and finally today I have done all the work I need to do to get my website going. Today, I have made my last website changes which is changing my WordPress blog URL to my website domain URL. When I first started to use this new site, I am still thinking of using it as the HQ for WordPress and my other blog sites from Joomla and Drupal to link to, therefore, at that time I had not yet decided whether I should turn my website domain name into my WordPress blog name or not. But now I have finally made the decision to use my website domain address as my wordpress url, this is because I think WordPress already has everything I need to create a really cool website and therefore there is no need to have a separate website anymore, I believe most of you will also agree with me on this matter. Well, so how am I going to start from here? I ask my self this question after I have created seven posts and if I do this then my previous post links will all become the broken links (I don’t think I will do any redirect because the quantity of my articles is not that many and I am not allow to have the .htaccess file (I think that is why I can’t find this file under my WordPress folder) in my current hosting site. Therefore those seven links will become the broken links for sure. But anyway, I think it is better to change it now rather than do it later which will sure become a lot more difficult than now. So, finally, I have made the changes, for those of you who want to know how I did it, here are the steps:-

Go to Settings->General and change this line…

Change the Blog address (URL) to your domain URL which is http://yoursite.com or http://www.yoursite.com, whatever. Leave the first input box (WordPress address (URL)) untouched because this is the path to your wordpress template files folder under your root folder in your web hosting site. For those of you who have the .htaccess file in your WordPress folder, maybe you would like to visit the Settings->Permalinks first and set up permalinks before you make the change.

After you have made the change, save it! Then log in to your web hosting site and do the followings…

Turn the index.php or index.html file under your web hosting root directory into a broken link like this, index.ht-ml or index.p-hp. Then move the wordpress index.php and the .htaccess file (if you have one) from your subfolder to the root directory and leave other files untouched in that subfolder you have created under the root directory. Then, do this final step, open up the index.php file (which is your WordPress index.php file) which is now in the root directory and change this line of codes require (‘./wp-blog-header.php’); to require (‘./thenameofyoursubfolder/wp-blog-header.php’);  where thenameofyoursubfolder is the name of the subfolder which the other template files are now in. And that is all you need! For those of you who have the .htaccess file you will need to update the permalinks again under Settings->Permalinks. Try to enter your damain url into the web browser address bar and if you can get to your website without any problem, then I would like to wish you the very best of luck.