wallofiron
Power Member
- Nov 24, 2009
- 595
- 74
I want to totally redesign the homepage of my website and use a totally different template from wordpress. How to I go about keeping my homepage exactly the way it is while I make a new one?
I used Wampserver and installed wordpress locally, I always test the new themes locally before putting them on my live site
http://www.easyphp.org/download.php
The problem. Although it is not recommended, you may want at some point to change your domain name while keeping your blog and its data. Because WordPress records your domain name in the database, you have to change the database in order to connect your new domain name to your WordPress blog.
The solution.
1. You guessed it: the first thing to do is log in to your phpMyAdmin and select your WordPress database.
2. Click the "SQL" button to open the SQL command window. In order to change your WordPress URL, execute this first command:
view source
print?
1 UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
3. Then, we have to replace the relative URL (guid) of each post. The following command will do that job:
view source
print?
1 UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://www.newsite.com');
4. We're almost done. The last thing to do is a search and replace in the wp_posts table to make sure that no absolute URL is still here:
view source
print?
1 UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldsite.com', 'http://www.newsite.com');
5. You're done. You should be able to log in to your WordPress dashboard using your new URL.
Explanation. To easily change our WordPress domain name, I took advantage of the super-useful MySQL function "replace," which allows you to replace one term by another.
http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/