---
title: PHP agent installation overview
source: https://docs.newrelic.com/docs/apm/agents/php-agent/installation/php-agent-installation-overview
---

Our PHP agent auto-instruments your code so you can start monitoring applications. You can use our guided installation for an automated install, or follow the instructions in this document to complete a basic PHP agent installation. Either way, you need a New Relic account. [It's free, forever](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing/#how-pricing-works)!

[Get an account](https://newrelic.com/signup)

[Start guided install](https://one.newrelic.com/marketplace/install-data-source?account=1&state=bb67253f-7a93-7d81-de1b-66eda54291f5)

[EU guided install](https://one.eu.newrelic.com/launcher/nr1-core.explorer?platform[accountId]=1&platform[$isFallbackTimeRange]=true&platform[timeRange][duration]=1800000&pane=eyJuZXJkbGV0SWQiOiJ0dWNzb24ucGxnLWluc3RydW1lbnQtZXZlcnl0aGluZyJ9&cards[0]=eyJuZXJkbGV0SWQiOiJzZXR1cC1uZXJkbGV0cy5zZXR1cC1waHAtaW50ZWdyYXRpb24iLCJhY2NvdW50SWQiOjI2NDA0MDl9&state=f79eeff7-ccd0-d779-67a7-62bbac6fc692)

[JP guided install](https://one.jp.newrelic.com/launcher/nr1-core.explorer?platform[accountId]=1&platform[$isFallbackTimeRange]=true&platform[timeRange][duration]=1800000&pane=eyJuZXJkbGV0SWQiOiJ0dWNzb24ucGxnLWluc3RydW1lbnQtZXZlcnl0aGluZyJ9&cards[0]=eyJuZXJkbGV0SWQiOiJzZXR1cC1uZXJkbGV0cy5zZXR1cC1waHAtaW50ZWdyYXRpb24iLCJhY2NvdW50SWQiOjI2NDA0MDl9&state=f79eeff7-ccd0-d779-67a7-62bbac6fc692)

## PHP components [#components]

Our [PHP agent](https://docs.newrelic.com/docs/agents/php-agent/getting-started/new-relic-php) consists of two basic components:

-   A PHP extension, which collects data from your application
-   A local proxy daemon, which transmits the data to New Relic

Your system's configuration components, including the web server, operating system, system permissions, PHP installation itself, package manager, etc., are all important factors during installation and configuration, because the agent is a part of that.

For more information about supported PHP releases, frameworks, and other system requirements, see [PHP compatibility and requirements](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements).

## Install the agent [#install-overview]

Follow this general process to install the agent on your system. The agent installation package or tar archive includes the interactive [**`newrelic-install`** script](https://docs.newrelic.com/docs/agents/php-agent/installation/newrelic-install-script), which automates some installation tasks.

> #### 💡 TIP
>
> If your application is frequently inactive, we recommend you generate some data by interacting with the application or site. This will help ensure the agent initially connects.

1.  If you haven't already, [create a New Relic account](https://newrelic.com/signup). It's free, forever.
2.  Ensure your system meets the [agent's requirements](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements), including appropriate [system permissions](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements#permissions).
3.  From your **Account settings**, copy your license key information.
4.  Install the agent package or tar archive on your 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](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-redhat-centos#tell-rpm) to get it from the New Relic repository, or you can [download the **.rpm** file](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-redhat-centos#download-rpm) directly from the New Relic website.

    [Install the package](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-redhat-centos) with your preferred package manager (`yum` or `rpm`) and then run the **newrelic-install** script.

    **Ubuntu or Debian**

    [Install the package](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-ubuntu-debian) either with `apt-get` or with `dpkg` commands. Typically, running the **newrelic-install** script is not required.

    **Tar archive**

    The **.tar** archive method is the most generic method you can use on all [supported operating systems](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements#operating-systems). [Download the compressed tar archive](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-tar-file#download) 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.

        [Install the tar archive](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-tar-file#install) of the agent on any [supported platform](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements).
5.  Change the default [application name](https://docs.newrelic.com/docs/site/naming-your-application) to a meaningful name.
6.  Optional: Change other agent [configuration](https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration) settings to further customize your installation.
7.  Restart your web server (Apache, Nginx, PHP-FPM, etc.).
8.  Recommendation: To help ensure the PHP agent is initiated, especially if your application has infrequent activity, generate some data by using the app for a few seconds.
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](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page).

## View logs for your APM and infrastructure data [#logs-context]

You can also bring your logs and application's data together to make troubleshooting easier and faster. With [logs in context](https://docs.newrelic.com/docs/logs/logs-context/configure-logs-context-php/), you can see log messages related to your errors and traces directly in your app's UI. You can also see logs in context of your [infrastructure data](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/), such as Kubernetes clusters. No need to switch to another UI page.

## Install PHP with partnership accounts [#partnership-accounts]

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

-   [AWS](https://docs.newrelic.com/docs/accounts-partnerships/partnerships/partner-based-installation/amazon-web-services-aws-users)
-   [Heroku](https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-heroku)
-   [Magento](https://docs.newrelic.com/docs/accounts-partnerships/partnerships/partner-based-installation/log-install-new-relic-partners#magento)
-   [Shared hosting providers](https://docs.newrelic.com/docs/agents/php-agent/installation/install-php-agent-shared-hosting-service)
-   [Other partnership installation procedures](https://docs.newrelic.com/docs/accounts-partnerships/partnerships/partner-based-installation/log-install-new-relic-partners)

Not all partners support PHP agents.
