XAMPP + Pretty Permalinks in WordPress

If you using XAMPP as a local web server for testing out themes and plugins then you might find this useful if you want to enable pretty permalinks for WordPress. *Note: I have xampp installed on a Windows XP setup.

Turn on Mod Rewrite

In order for WordPress to manipulate URLs, Mod Rewrite must be turn on. To load the module open up Apache’s main configuration file: httpd.conf.
It is usually found in c:\xampp\apache\conf\.
Look for the following line and remove the “#” at the beginning of the line.

	#LoadModule rewrite_module modules/mod_rewrite.so	

Set up the Virtual Host directives

Now it’s time to create your site on your local machine because let’s face it, it’s nicer to look at http://garinungkadoldev.com than http://localhost/gkl_280 :)
The VirtualHost config file, httpd-vhosts.conf is usually located at c:\xampp\apache\conf\extra


	NameVirtualHost garinungkadoldev.com
	<VirtualHost garinungkadoldev.com>
	     DocumentRoot c:\xampp\htdocs\gkl_280
  	</VirtualHost>

So what does this all mean?

NameVirtualHost – tells the Apache HTTP Server which domain name (garinungkadoldev.com) to use.

<VirtualHost> – container where directives intended for garinungkadoldev.com are placed.

DocumentRoot – absolute path to where web files are located. In this example my WordPress installation is inside c:\xampp\htdocs\gkl_280

Save your files and restart XAMPP!

Map the IP address to your domain

Before enabling permalinks in WordPress you need to tell Windows to recognize your domain name as belonging to localhost.
In Windows XP the HOSTS file is found at C:\WINDOWS\system32\drivers\etc\. Open the “host” file inside a text editor and add this:

127.0.0.1	garinungkadoldev.com

5 thoughts on “XAMPP + Pretty Permalinks in WordPress

  1. Pingback: Meanwhile, on the Internet… // VOID-STAR.NET β

  2. Pingback: Apache Virtual Host Configuration | dijexi.com

  3. Pingback: How to change upload file size on a Windows localhost | dijexi.com

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>