• /
  • Log in
  • Free account

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.)

Get an account

PHP components

Our PHP agent 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.

Install the agent

Follow this general process to install the agent on your system. The agent installation package or tar archive includes the interactive 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. It's free, forever.

  2. Ensure your system meets the agent's requirements, including appropriate system permissions.

  3. From your Account settings, copy your license key information.

  4. Install the agent package or tar archive on your system.

  5. Change the default application name to a meaningful name.

  6. Optional: Change other 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.

View logs for your APM and infrastructure data

You can also bring your logs and application's data together to make troubleshooting easier and faster. With logs in context, 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, such as Kubernetes clusters. No need to switch to another UI page in New Relic One.

Install PHP with partnership accounts

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

Not all partners support PHP agents.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.