New Relic for PHP

This section provides information about compatibility and requirements, basic instructions on how to install and configure the PHP agent, and links to more detailed information.

To use the PHP agent:

  1. Make sure your system meets New Relic's PHP compatibility and requirements.
  2. If you do not already have a New Relic account, sign up for one.
  3. From your New Relic Account Settings page, copy your license key information.
  4. Follow the agent installation procedures for both the PHP extension and the local proxy daemon.
  5. Complete the configuration settings for the agent and optionally the proxy daemon.
  6. Change the default application name to a meaningful name.
  7. Restart Apache or your PHP host program (such as php-fpm) as applicable.
  8. Verify that data appears, and refer to Troubleshooting your installation as applicable.

Also refer to the For more help section in this document.

Compatibility and requirements

Before you install New Relic for PHP, make sure your system meets these requirements.

New Relic PHP Agent Requirements

5.2, 5.3, 5.4, 5.5

  • New Relic recommends the latest release in the PHP 5.4.x or 5.5.x series.
  • PHP 5.1 support was deprecated in release 4.0 of the agent.
  • PHP 5.5 support was added in release 4.0 of the agent.
Processor Type

Intel (and compatible) platforms only.

Support for SSE2 instructions is required.

Operating Systems

Linux (x86 and x86_64):

  • RedHat Enterprise Linux (RHEL) 5 or later
  • CentOS 5.5 or later
  • Debian 5.0 ("lenny") or later
  • Ubuntu 9.10 ("Karmic Koala") or later
  • Any other Linux distribution with kernel 2.6.13 or later (2.6.26 and later highly recommended) and glibc 2.5 or later with Native Posix Threads Library (NPTL) support
SmartOS and Solaris (x86 and x64):
Mac OS X (x86_64 only):
Note: Support for FreeBSD and 32-bit Mac OS X was removed in release 4.6 of the agent.
Web Server

Apache 2.2 or 2.4 via mod_php
Or any web server that supports FastCGI using php-fpm

Frameworks *
  • CakePHP 1.2, 1.3, and 2.*
  • CodeIgniter 2
  • Drupal 6, 7 and 8
  • Joomla 1.5 and 1.6
  • Kohana 3.2 and 3.3
  • Laravel 4.0 and higher
  • Magento 1.5, 1.6, 1.7 and 1.8
  • MediaWiki
  • QDrupal
  • Symfony 1 and 2
  • WordPress
  • Yii
  • Zend Framework 1

The New Relic PHP agent's list of frameworks continues to grow. Even if the framework you are using is not listed here, New Relic's engineers may be able to provide you with useful information about your app. For more information, see PHP frameworks: Integrating support for New Relic. Or, if you need help or if you want to request other popular PHP frameworks, get support at

License key

For any installation, you will need your New Relic license key. This is a 40-character hexadecimal string that New Relic provides when you sign up for your account. To view your license key: From the New Relic title bar, select (account) > Account settings.

Note: For version 3.0 and higher, refer to this information about the New Relic PHP install script and license key settings in the PHP INI file.


Video For PHP installation tips, watch this New Relic video (approximately 1 minute).

The agent has two parts, a PHP extension and a local proxy daemon. Follow the appropriate installation instructions carefully to make sure you have accounted for both.

Note: As part of the installation process, change the default application name to a meaningful name.

For standard installations, see:

For other types of PHP installations, see PHP agent installation: Non-standard PHP.


After installing the PHP agent, configure the settings for both the agent and the proxy daemon, and then restart Apache or your alternate web dispatcher as applicable. For more information, see:

Sample New Relic phpinfo() File
Sample phpinfo() File: If data does not appear on your New Relic dashboard within a few minutes after configuring both the PHP agent and the proxy daemon, check the New Relic section of your phpinfo() file to verify that New Relic is installed.

For information about advanced configuration settings, see:

Mac OS X newrelic-daemon init script

Unlike the other operating systems supported by the New Relic PHP agent, Mac OS X doesn't use the standard /etc/init.d/newrelic-daemon init script. Instead, you can use the /usr/bin/newrelic-daemon-service script in the same way:

/usr/bin/newrelic-daemon-service restart

SmartOS 32-bit support

Known issue: On some SmartOS 32-bit VMs, the daemon fails to report metrics. For more help, get support at

For more help

Additional documentation resources include:

If you need additional help, get support at