getting a local wordpress installation

I spent this evening installing wordpress locally to have an offline playground. I already had an Apache 2.2 web server. So, next I installed MySql 5.1, used the command line tool to create a database (create database wordpress;) and then tried to install WordPress. But there I stumbled across two problems:

First, trying to run the install.php resulted in the following error: "Your PHP installation appears to be missing the MySQL extension which is required by WordPress".

But I had properly configured the MySql extension:

  • uncomment the lines “extension=php_mysql.dll” and “extension=php_mysqli.dll” in php.ini
  • configure the correct path to C:\php528\ext (or wherever you installed php) in extension_dir in php.ini
  • copy libmysql.dll to to C:\WINDOWS\system32 (not nice, probably adding the correct path of the DLL location in the PHP directory to the windows PATH variable would work too)

But I still got the error message. The reason was that  php.ini has to be copied to C:\Windows.

Now I could run the install.php and everything installed, but trying to open the blog just gave me a directory listing. It took me some time to find out that the following line has to be modified in httpd.conf:

DirectoryIndex index.html index.shtml
DirectoryIndex index.html index.shtml index.php

This tells Apache that index.php is a proper index page. Now I have a local version of the blog for playing around with layout and styles etc. before applying any changes to my online blog.

This entry was posted in Web development. Bookmark the permalink.

Leave a Reply

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