HomeWeb application programmingPHP programmingInstall Pear on Windows 7 64x using WAMP

Install Pear on Windows 7 64x using WAMP

Installing PEAR on Windows 7 seems simple; however, a few headaches with some recent versions of PHP can leave some people confused. The go-pear.bat file doesn’t exist in some 64x downloads of WAMP and PHP. By following these steps to workaround this issue, you should be able to get Pear installed into your WAMP setup.

You must have WAMP installed correctly first.

1 We need to first locate the file go-pear.bat in our WAMP PHP install directory. In the current installation, this is located at C:\wamp\php\php5.3.13 although this will change based on your current version. In WAMP 64-bit versions sometimes this file is not included. Instead we can use the file go-pear.phar instead. Visit http://pear.php.net/go-pear.phar in your browser and save the page to a local go-pear.phar file.

2 Put this file in the following directory:


(This directory may be different depending on your version of PHP.)

3 Now, pull up the Windows start menu, type in CMD, then hit enter. We need to look at the folder we just put the .phar file in, so enter this string:

cd C:\wamp\bin\php\php5.3.13

and hit enter. We should now be looking in this directory.


4 Next, we will need to run this .phar file by using the following command:

php go-pear.phar

5 It will ask “Are you installing a system-wide PEAR or local copy?” You will need to type “local” and hit enter. It will ask you to confirm by typing “yes” and hitting enter.

Pear local

6 You will be shown the 12 file locations corresponding to where PEAR will install packages, documents, config files and more. I just leave these on default in my WAMP PHP folder. Press enter to bypass this and accept this.

7 You may receive the following error:

This is letting you know your php.ini file doesn’t have the path that you just specified above in the CMD. If you type a simple “Y” and hit enter, the php.ini file will automatically be updated. Go ahead and do this if needed.

8 You should be done with the CMD part now. If everything worked correctly, you should be notified that “The ‘pear’ command is now at your service…”

9 Next, we need to add pear’s path to make sure that installing packages work. Go to Windows and type in System and hit enter. Click on Advanced System Settings on the left, then under the Advanced tab click Environment Variables.

Edit the Path Variable and append the location to your PHP version folder in wamp:


Hit okay to save it. Be sure to include the semi-colon at the end of the folder path.

10 Now open back up our CMD and type in pear followed by enter. If everything is working correctly, you should see pear’s list of commands.

Chris Luongo
Chris Luongo
Chris is a self-taught web designer and developer out of Atlanta, GA. This geek enjoys coffee, cold brews, bike riding, and twisting any form of tech into submission.


Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments

error: Content is protected !!