Installing PEAR in Windows, Wamp

Go to the directory where PHP is located. Typically, this is <PATH-TO-YOUR-WAMP-INSTALLATION>\bin\php\php5.3.8

We’ll call this path “PHP’s location” throughout this article.

  1. Download “go-pear.phar” from this location:
  2. Create a folder “pear” in your PHP’s location
  3. Put the downloaded “go-pear.phar” file in this location.

Open a command prompt with administrative privilege. For this, click on start menu, type “cmd” – you can see the cmd.exe icon. Right-click on this icon and click “Run as administrator”

Cmd.exe will open. Go to the direcotry of your PHP’s location, by typing “cd” command. For example, my wamp is located in “D:\wamp”, so I write following command:

cd wamp\bin\php\php5.3.8

Now run the downloaded file, by typing:

php .\pear\go-pear.phar


Installation will begin! During installation, you’ll need to respond to some prompts, just hit enter/press “Y” when necessary.

After installing, double-click and instal “PEAR_ENV.reg” found in your PHP’s location.

Optionally, you can add your PHP’s location in your PATH variable.


4 thoughts on “Installing PEAR in Windows, Wamp

  1. if you can’t find it. like me. Then you can simply add it in your environmental variables tab.
    1. Press window key.
    2. right click on computer -> click on properties
    3. click on advance system settings
    4. click on environmental variable
    5. double click on PATH found in system variables list
    6. Add your location for pear.bat file. eg: C:\wamp\bin\php\php5.3.10\pear

    Hope this helps.

Comments are closed.