How to install PHP PEAR packages using cPanel

This article describes how to use cPanel to install PEAR (PHP Extension and Application Repository) packages on your web site. PEAR packages are reusable PHP code libraries that can speed up web site development.

Installing a PEAR package

To install a PEAR package, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the PHP PEAR Packages tool:
    • If you are using the Jupiter theme, on the Tools page, in the Software section, click PHP PEAR Packages:

      cPanel - Software - PHP PEAR Packages icon

    • If you are using the Paper Lantern theme, in the SOFTWARE section of the cPanel home page, click PHP PEAR Packages:

      cPanel - Software - PHP PEAR Packages icon

  3. The “PHP Extensions and Applications Package” Installer page appears. Under Using Your PHP Extension(s) and Application(s), note the path where the PEAR packages are installed. You will need this information later when you update the PHP include path. cPanel also provides sample PHP code to add to your application.
  4. Install the desired PEAR package in one of the following ways:

    • Search for a PEAR package. Type the name in the Search text box and then click Go. For example, to search for packages related to XML, type xml. Scroll down the list until you find the desired package and then click the Install link.
    • Click the Show Available Modules button. Scroll down the list until you find the desired package and then click the Install link.
    • If you already know the name of the package that you want to install, type the package name under Install a PHP Extensions and Applications Package and then click Install Now.
  5. When installation is complete, click Go Back.
  6. The installed package is now listed under Installed PHP Extension(s) and Application(s):

    • To update the package, click Update.
    • To reinstall the package, click Reinstall.
    • To uninstall the package, click Uninstall.
    • To view the documentation for the package, click Show Docs.
    • To view a list of packages installed systemwide, click Show System Installed Modules.
  7. After you install a PEAR package, you must configure the PHP include path. For information about how to configure the PHP include path for your web site, please see this article.

More Information

For more information about PEAR, please visit http://pear.php.net.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.