Skip to content
HoganHost blog

Installing PHP PEAR Packages in cPanel

PEAR stands for PHP Extension and Application Repository. It is a library of ready-made PHP packages that developers use to add features to their code, such as handling email, dates, or file formats. Using a tested package saves time and avoids writing common features from scratch.

The PHP PEAR Packages tool lets you browse the library and install packages directly to your account.

Open PHP PEAR Packages

  1. Log in to cPanel.
  2. In the Software group, click PHP PEAR Packages.

If the tool is missing, your hosting provider may have turned it off for your plan. Contact HoganHost support to confirm before you plan around it.

Find a Package

Click Show Available Modules to list the packages. Each entry shows the package name, its version, and a short description. Click Show Docs to read the documentation before you install.

Install a Package

  1. Find the package you want in the list.
  2. Click Install next to it.
  3. Wait for the installation to finish.

After it installs, the package appears in the Installed Modules table with its version number.

Use the Package in Your Code

The page shows a line of code to add to the top of your PHP file. That line tells PHP where to find the package. Place it at the top of the file that needs the package, then test the page.

If the page now shows an error, check that the package name in your code matches the installed name exactly.

Update, Reinstall, or Remove

Use Update to move a package to its latest version. Use Reinstall if a package seems damaged. Use Uninstall to remove a package you no longer need, but only after checking that your code does not still call it.

System modules that come with cPanel are included in the list, and they cannot be removed. Leave them as they are.

Check Your PHP Version

PEAR packages depend on the PHP version your site runs. If a package fails after you change versions, check the PHP settings covered in the Day 11 guides and make sure the package supports your version.

Building PHP applications that need a steady, updated stack? Explore HoganHost’s cPanel shared hosting plans or HoganHost’s VPS hosting options.

Share this article
Written by

Join the conversation.

Your email address will not be published. Required fields are marked *

Your next chapter starts here

Put your next big idea online.

The right hosting. A name of your own. A real team in your corner.

Explore Hosting