Skip to content

Installing PHP PEAR Packages Using cPanel

PEAR (PHP Extension and Application Repository) packages are reusable PHP code libraries that simplify web development. With cPanel, you can install and manage PEAR packages directly from your hosting account without needing manual server configuration.

  • Speed up development with pre‑built PHP libraries.
  • Add functionality such as XML parsing, database access, or caching.
  • Manage packages easily through cPanel’s interface.
  1. Log in to cPanel.

  2. On the Tools page → Software section, click PHP PEAR Packages.

  3. The PHP Extensions and Applications Package Installer page appears.

    • Note the path where PEAR packages are installed — you’ll need this for updating your PHP include path.

You can install PEAR packages in several ways:

  • After installation, packages appear under Installed PHP Extension(s) and Application(s).

  • Options available:

    • Update → Upgrade to the latest version.
    • Reinstall → Reinstall the package if needed.
    • Uninstall → Remove the package.
    • Show Docs → View documentation for the package.
    • Show System Installed Modules → See packages installed system‑wide.

After installing a PEAR package, you must configure the PHP include path so your application can use it.

  • Add the path provided by cPanel to your PHP scripts.

  • Example:

    ini_set("include_path", "/home/username/php");