Site icon CodeRevolution Knowledge Base

How to enable PHP CURL?

If you need to enable curl in your hosting, please contact your hosting provider’s support and ask them to help you enable curl. However, if you want to enable it yourself, please follow the steps from below:

How to enable CURL in Apache?

There are a few ways I found to go about enabling CURL in Apache. The one you choose will depend on what OS your running and which flavor of Apache you’ve got.

Hopefully one of these should sort you out:

Option 1 : enable CURL via the php.inI

This is the main method on any windows install like WAMP, XAMPP etc

  1. Locate  your PHP.ini file
    (normally located at in the bin folder of your apache install e.g.
  2. Open the PHP.ini in notepad
  3. Search or find the following : ‘;extension=php_curl.dll’
  4. Uncomment this by removing the semi-colon ‘;’ before it
  5. Save and Close PHP.ini
  6. Restart Apache

Option 2: Enabling CURL in WAMP?

  1. Left-click on the WAMP server icon in the bottom right of the screen
  2. PHP -> PHP Extensions -> php_curl

Option 3: enable CURL in Ubuntu?

Run the following command:

sudo apt-get install php5-curl
sudo service apache2 restart

How to Make sure CURL is enabled and running

Use the phpinfo() command to output PHP’s configuration and look for curl support under the listed environment variable/modules

That’s it. Your done!

Exit mobile version