PHP agent installation overview

This document provides an overview for installing the New Relic PHP agent.

The agent consists of a PHP extension (collects data from your application) and a local proxy daemon (transmits the data to New Relic). Your system configuration (such as the web server, operating system, system permissions, PHP installation itself, package manager, etc.) is an important factor during installation and configuration, because the agent is a part of it.

Install PHP via partnership accounts

Installation procedures may be different for admins who install the PHP agent via a partnership. For more information, see:

Not all partners support PHP agents.

Install the agent

Follow this general process to install the agent on your system. The agent installation package/tar archive includes the interactive newrelic-install script, which automates some installation tasks.

  1. Ensure your system meets the agent's requirements, including appropriate system permissions.
  2. If you do not already have a New Relic account, create one.
  3. From your New Relic Account settings, copy your license key information.
  4. Obtain the installation package for your operating system.
    RedHat or CentOS

    The most common way to install the agent on RedHat or CentOS is with the installation package (.rpm) and the package manager. You can tell the package manager to get it from the New Relic repository, or you can download the .rpm file directly from the New Relic website.

    Ubuntu or Debian

    The most common way to install the agent on Ubuntu or Debian is with the installation package (.deb) and the package manager.

    1. Configure the repository.
    2. Obtain the installation package by either configuring apt-get (recommended) or downloading .deb files directly and running the package manager on them locally.
    Tar archive

    The .tar archive method is the most generic method you can use on all supported operating systems. Download the compressed tar archive for your system if any of these situations apply to you:

    • Your operating system is not listed here.
    • You are not using a package manager.
    • Other methods are unsuccessful.
  5. Install the agent package or tar archive on your system.
    RedHat or CentOS

    Install the package with your preferred package manager (yum or rpm) and then run the newrelic-install script.

    Ubuntu or Debian

    Install the package either with apt-get or with dpkg commands. Typically, running the newrelic-install script is not required.

    Tar archive

    Install the tar archive of the agent on any supported platform.

  6. Change the default application name to a meaningful name.
  7. Optional: Change other agent configuration settings to further customize your installation.
  8. Restart your web server (Apache, Nginx, PHP-FPM, etc.).
  9. Wait a few minutes for your application to send data to New Relic.

Then, check your app's performance in the New Relic UI.

For more help

Additional documentation resources include:

Join the discussion about PHP in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at