How to Enable libcurl in WAMP

Are you are getting “Fatal error: Call to undefined function: curl_init()” and you’re using WAMP, you’ve got to perform a few extra steps to get cURL working.

Wamp comes with a lot of extensions, including cURL, it is just a matter of getting the extension loaded when wamp is started. And no, enabling php_curl from within the wamp menu is not how to do it.

For some reason, that just doesn’t work.

How to Enable libcurl in WAMP

Here are the steps for getting cURL enabled in WAMP.

Step 1

  • Open C:wamp\bin\php\php5.2.6\php.ini
  • Find “;extension=php_curl.dll” and remove the semicolon to uncomment the line
  • Do the same for C:wamp\bin\apache\apache2.2.8\bin\php.ini

Note: the version of WAMP you’re running does not really matter. The step should be the same for all versions.

Step 2

Next, you need to make sure apache can find the extension to load, so make sure that in both php.ini files, you find the lines:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\wamp\bin\php\php5.2.6\ext"

Make them both point to the ext folder within your PHP folder. By default, they will be set to something like /usr/bin/ext. This is what you will need to change.

Step 3

Restart wamp and it should all work. You can look in the phpinfo() to see if cURL was loaded. If it still doesn’t work, check the apache error log within the wamp logs folder for additional clues.

Good luck!

Published byJosh McGinnis

Josh is a software engineer, leader, startup advisor for the LA Chamber of Commerce and consultant residing in the Los Angeles area. Josh is passionate about helping entrepreneurs and businesses reach their maximum potential.


  • Brando Bandido

    January 13, 2010 at 10:31 pm Reply

    Thanks! It really helps!

  • akm1313

    March 2, 2010 at 1:01 am Reply

    Thanks! … works a charm

  • Jason Priem

    March 9, 2010 at 11:03 pm Reply

    Thanks! WAMP was using curl just fine, but I was having trouble getting the NetBeans IDE’s PHPUnit support working with curl. Uncommenting the appropriate line in php.ini did the trick.

  • user

    March 24, 2010 at 11:21 pm Reply

    Thanks! Works

  • Morteza

    May 31, 2010 at 6:55 am Reply


    Really works…… SO MANY thanks

  • monnster

    December 15, 2010 at 10:29 am Reply

    the trick [extension_dir = “C:\wamp\bin\php\php5.2.6\ext”]

  • Divesh

    January 3, 2011 at 3:28 pm Reply

    Really a cool steps. Thanks Buddy

  • jay

    March 18, 2011 at 2:47 am Reply

    shit man. you’re brilliant

  • rudrah

    April 29, 2011 at 8:24 am Reply

    Thanks buddy its really works

  • Nitin

    May 12, 2011 at 11:29 am Reply

    Thanks man. Made my life cool….

  • Stuart

    June 13, 2012 at 6:38 am Reply

    still couldnt get wordpress to install after following the above steps!!!

  • Alejandro

    July 2, 2012 at 6:21 pm Reply

    did all the steps, both php.ini files include:
    extension=php_curl.dll (uncommented)
    ; Directory in which the loadable extensions (modules)

    ; extension_dir = “./”
    ; On windows:
    ; extension_dir = “ext”
    extension_dir = “c:\wamp\bin\php\php5.4.3\ext”

    but still is not working… any advices?

  • Mukesh

    July 3, 2012 at 12:53 pm Reply

    Thanks Joshua. You saved my day.

  • not

    September 6, 2012 at 5:49 pm Reply

    Did not work. Changed in both ini files. Made sure the extensionpaths were correct, updated even the curl dll-file and restarted.. No working..

  • Arvind

    November 28, 2012 at 7:07 am Reply

    Doesn’t work for me 🙁

  • Vinay Raghu

    February 2, 2013 at 1:12 pm Reply

    Thank you kind sir

  • Vinay Raghu

    February 2, 2013 at 1:13 pm Reply

    Thank you! It worked.. God bless!!!

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.