Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I was recently setting up WordPress to run locally on my development machine and when I tried to browse to the WordPress homepage locally, I recieved the error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

My configuration:
Windowx XP
Apache 2.2
php-5.2.8
MySQL 5.1

To correct this issue, I did the following:

  1. In the Php.ini file (on my machine this is located at C:\Windows):
    Set extension_dir = "C:/Program Files/php-5.2.8/ext" (where php is installed on my machine)
  2. uncommented (remove ;)
    extension=php_mysql.dll
    extension=php_mysqli.dll
  3. Copied libmysql.dll from php dir to system32 (C:\WINDOWS\system32 on my machine)

Hope that helps anyone with a similar issue.

Comments (6) -

  • Thank you so much for this post. Step 3 is what did it for me. I have spent about 3 hours messing with this problem today. It all broke after I installed Plesk on my server. I had problem after problem after removing it! I was finally able to get my blog back after copying the right dll file.

    Thanks a million!!!!
  • thanks for telling all this..the steps are useful..
  • I cannot thank you enough for this. I have used the "Microsoft Web Platform" installer yesterday to install some scripts and some of them required fastCGI so I installed it too, but that screwed up my current php's installation and today, when I tried to continue my work on a wp theme that error was thrown...and I searched for different solutions but couldn't find one; I've reinstalled php, uninstalled the "Microsoft Web Platform" and the FastCGI application but still couldn't fix this.

    The step #3 was all I needed. (No need for the steps #1 or #2 for me).

    Thanks a bunch, you saved my day Smile
  • You are the best! Thanks so much for sharing your solution!
  • Thks a lot for your post.
  • Thanks mate!I was looking for that solution nearly all day!I love your blog,awesome!!!
    Can I copy this article on my blog?If,yes we can exchange useful articles in the future?

Pingbacks and trackbacks (4)+

Add comment