Install Or Update PEAR On Xampp For Windows

PEAR is short for “PHP Extension and Application Repository” which provide a repository for PHP community extensions that will make your PHP installation more powerful and easy to develop web application. The project that founded by Stig S. Bakken in 1999 was to promote the re-use of code that performs common functions. The project seeks to provide a structured library of code, maintain a system for distributing code and for managing code packages, and promote a standard coding style.

The purpose of PEAR is to provide:

  • A structured library of open-source code for PHP users
  • A system for code distribution and package maintenance
  • A standard style for code written in PHP, specified here
  • The PHP Extension Community Library (PECL)
  • A web site, mailing lists and download mirrors to support the PHP/PEAR community

Well actually PEAR is installed in default XAMPP, just in case you broke it and need reinstall or need update it follow these instructions:

  1. Edit your environment setting in Start > Control Panel > System > Environment add php installation files at the last PATH variable. In my case my php installation in C:xampp\php
  2. Go to and copy all the php code and save it as go-pear.php
  3. Open your command line and type: php /path/to/go-pear.php
  4. You will be asked some configuration required. Or you can skip it if you want it as default.
  5. Wait until it is finished. Then you have updated PEAR installation.


  1. Kris says:

    Thanks for the post, it was very helpful. I now have PEAR installed and configured correctly!

Give me your feedback

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