Photo of logo on a pear.

How to Install PEAR on Through SSH

Photo of logo on a pear.It is possible to install PEAR on servers locally under your account.
First, you’ll need to install a local copy of PEAR.

To install PEAR through SSH, you can use the following command sequence to set up a local copy of PEAR. The backslashes ( ) tell the shell that your command is continuing on the next line. If you type the entire command on one line, you should omit them.

pear -s -c $HOME/.pearrc -d doc_dir=$HOME/pear/docs
-d ext_dir=$HOME/pear/ext -d download_dir=$HOME/pear/tmp
-d php_dir=$HOME/pear/lib -d data_dir=$HOME/pear/data
-d test_dir=$HOME/pear/tests -d cache_dir=$HOME/pear/cache
-d bin_dir=$HOME/pear/bin -d temp_dir=$HOME/pear/temp

This command will create a local configuration file in a file in your home directory named .pearrc. In addition, the command will create a directory structure based on a subdirectory of your home directory named pear that contains all of the packages that you install.

Then run the command:

pear -c $HOME/.pearrc install Archive_Tar PEAR Console_Getopt

You now have a local version of PEAR that supersedes the system’s copy. To use the files you have installed, you should set your PHP include_path in .htaccess like so:

php_value include_path ‘/usr/home/USERNAME/pear/lib’

Now you should have a complete and functional install of PEAR on



Zeen is a next generation WordPress theme. It’s powerful, beautifully designed and comes with everything you need to engage your visitors and increase conversions.

Zeen Subscribe
A customizable subscription slide-in box to promote your newsletter
[mc4wp_form id="314"]