To take full advantage of New Relic's latest features, enhancements, and important security patches, we recommend you update your PHP agent to the latest version. For additional information about specific agent updates, refer to the PHP agent release notes.
This document explains how to update the agent for:
- RedHat and CentOS on x86_64
- Ubuntu and Debian on x86_64
To update via tar archive, follow the tar archive installation procedures. (Procedures to install and update with the tar archive are the same.)
Use the newrelic-php5
package
The package name for New Relic's PHP agent is newrelic-php5
.
Tip
Although the package name references PHP 5, this package works for all supported PHP versions.
Update using your package manager
To update the PHP agent:
Replace the agent files using your preferred package manager for your system:
RedHat or CentOS: Run the
newrelic-install
script, and follow the install script's confirmation prompt before overwriting an old installation.bash$sudo newrelic-install installUbuntu or Debian: Follow the package manager's prompts to run the
newrelic-install
script as part of its installation process.Stop any residual
newrelic-daemon
processes by runningkill $(pgrep newrelic-daemon)If the
newrelic-daemon
is configured to start in external mode, use your operating system's service manager to restart it.Restart your web server (Apache, Nginx, PHP-FPM, etc.).
Wait a few minutes for your application to send data to New Relic.
Update unsupported agent versions
Important
If you are updating from an older agent version, including major version jumps, review the following list for changes in functionality.
Migration | Comments |
---|---|
8.0.0.204 | Release notes: PHP agent 8.0.0.204 TLS replaces the To increase security, the |
7.0.0.186 | Release notes: PHP agent 7.0.0.186 PHP 5.2 is no longer supported. New Relic highly encourages you to use a supported version of PHP (5.6 or higher). If you want to continue running the New Relic PHP agent with PHP 5.2, we recommend using agent version 6.9. However, in this case, we can only offer limited support. |
5.0.0.115 | Release notes: PHP agent 5.0.0.115 Daemon command line flags have been renamed. For customers who start the daemon manually, you can find the newly renamed command line flags with the
|
Troubleshooting after update
If you updated PHP and the agent stopped working or reporting data, follow the troubleshooting procedures.