Configuration – Apache, MySQL, PHP for windows

February 15, 2009 by Kapil Bharati · Leave a Comment
Filed under: Tech 

Once installed make sure the following steps have been covered:

For Apache:

Update http.conf

  • Load module mod_rewrite, required by WordPress for url rewriting. Uncomment the following line:

LoadModule rewrite_module modules/mod_rewrite.so

  • Add index.php to DirectoryIndex, if you don’t do this – you will keep seeing directory listing or error pages

<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

  • Setup Virtual hosts, uncomment the following line:

Include conf/extra/httpd-vhosts.conf

  • Update httpd-vhosts.conf, change the ServerName and the DocumentRoot to your specific settings. I am setting up Wordpress Mu on my windows machine, this is how it looks:

<VirtualHost *:80>
ServerName wpmublogs.localhost
DocumentRoot "C:/wpmu"
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory "C:/wpmu">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

For PHP:

  • Get the mysql extension and save them to say “C:/ext”- mysql.dll for windows / mysql.so for unix
  • Update php.ini, set the extension dir

extension_dir = "C:\ext\"
Add extensions, this is the name of the file
extension=php_mysql.dll

  • Create an index.php page with phpinfo() and store it in documentroot, in this case “C:/wpmu” and point your browser to http://wpmublogs.localhost

<?php phpinfo() ?>

  • If all went fine, you should see the dump of phpinfo(), check if mysql was loaded … (try rebooting your m/c once if mysql did not load) now you are ready to setup the wordpress blog …

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!