How to Install WordPress in Windows Localhost with XAMPP

XAMPP
This particular method of localhost installation using XAMPP will work for WordPress, WordPress MU, BuddyPress and bbPress. Installing a localhost version of WordPress will enable you to create a local hosting environment on your PC or USB storage device so that you can test your installation before going live. This process creates an offline live version of your WordPress blog. If you use the USB installation this also enables you to take that USB storage device to your client and perform a demonstration of the blog before it goes live. This will save you and your client a tremendous amount time and effort.
I saw a great live presentation of this process at the WordCamp Dallas 2009 given by SpamBoy. I have included a copy of his video and his PowerPoint presentation for your convenience.
0
Click here to access the PowerPoint Presentation: Creating Local WordPress Installs
Let’s dive in to our installation of WordPress in Windows localhost using XAMPP:
1. Install XAMPP www.apachefriends.org/en/xampp-windows.html
- Unzip file
- Follow the easy instructions at www.apachefriends.org/en/xampp-windows.html
- Either install on USB or on hard drive (not both for the same PC)
- Start the XAMPP control panel
2. Download and install WordPress or WordPress MU into the htdocs (which behaves like the public-html folder) www.wordpress.org or www.mu.wordpress.org
- Here is a great tutorial for WordPress MU XAMPP installation www.maketecheasier.com/install-wordpress-mu-in-windows-localhost-with-xampp/2009/05/02
- For WordPress MU use sub-directories for easier installation (I couldn’t get the sub-domains to work)
- You will need to make an adjustment to your PC for WordPress MU:
- For WordPress MU localhost.localdomain: go to C:\windows\system32\drivers\etc\hosts
- Add 127.0.0.7 (tab) localhost.localdomain
- Place a “#” in front of the action to temporarily disable it
- Edit wp-config-sample.php file
3. Import posts from live blog – Tools/export and import
4. Change permalink structure and match live blog
5. Copy and download wp-content folders from live blog, themes, plugins, uploads
6. Reactivate plugins – except ping/post, Google, Akismet
7. Remove default installed items – post links, categories, plugins
8. Scrub links in wp_posts table:
UPDATE wp_posts
SET post-content =,
Replace(post_content, ‘www.yourdomain.com‘, ‘localhost/wordpress”);UPDATE wp_posts
SET post_content =,
Replace(post_content, “yourdomain.com’, ‘localhost/wordpress’);
*make sure to change your wording in the localhost and the wordpress file name to match your wording used
9. To copy the database from your blog:
- Create new database user
- Copy custom .htaccess settings
- Copy database from live blog
- Export/import using phpMyAdmin
- Scrub links in wp_posts table (see previous step)
- Scrub options in wp_options table:
UPDATE wp_options
SET option_value = ‘http://localhost/‘
WHERE option_name = ’siteurl’ ;UPDATE wp_options
SET option_value = Concat(option_value, ‘ LOCAL’)
WHERE option_name = ‘blogname’ ;UPDATE wp_options
SET option_value = 0
WHERE option_name = ‘blog_public’ ;
I had header errors whenever I tried to save anything in the locahost environment. Try these two great articles and see if they help remove your errors. The first one was a fix for me.
- www.wordpress.org/support/topic/267604
- www.hongkiat.com/blog/wordpress-error-warning-cannot-modify-header-information
If I can do it! You can do it too! Celebrating Texas country living, down home cooking, family life, figuring stuff out and being a stay-at-home moxie mom computer geek.
Blessings,
Wendy Merritt
The Moxie Mom
XXO (A kiss on each cheek and a hug)
If you enjoyed this article get updates via my RSS feed.

Popularity: 4% [?]































Twitter Comment
How to Install WordPress in Windows Localhost with XAMPP[link to post]
– Posted using Chat Catcher