Answers.Body: <p>This method uses New Relic's PHP API, rather than php.ini, and is working well for me. It seems to be catching everything that I need to monitor. Any applications I've not done this for remain in the default application.</p>
  
  <p>Just stick this in Craft's index.php file:</p>
  
  <pre><code>if (extension_loaded('newrelic')) {
      newrelic_set_appname('NAME OF SITE');
  }
  </code></pre>
  
  <p>I haven't tried it with ExpressionEngine or Wordpress, but the principle would be the same?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-19T09:27:44.157Z
Answers.LastActivityDate: 2014-12-19T09:27:44.157Z
Answers.UserDisplayName: Clive Portman
Answers.Body: <p>Looks like this <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications#php" rel="nofollow">can be done</a> with a <code>php.ini</code> file in Craft's public HTML folder.</p>
  
  <p>Although, we should be able to call an <code>ini_set</code> for it in Craft itself.  If you want to hit up support@buildwithcraft.com, I'll give you a file that you can test with.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-13T21:29:16.093Z
Answers.LastActivityDate: 2014-10-15T18:01:30.107Z
Answers.LastEditDate: 2014-10-15T18:01:30.107Z
Answers.UserDisplayName: Brad Bell
Body: <p>Like many of you, we've started to use New Relic to deep dive into performance of our websites.</p>
  
  <p>Right now, we have a client's production server that has a version of Craft, ExpressionEngine and Wordpress. </p>
  
  <p>Right now WP and Craft get lumped together as a 'PHP application'. Is there any config setting to allow us to set 'Craft CMS' as a thing to differentiate?</p>
  
  <p>We've been able to do this with EE.</p>
  
Tags: <config><newrelic>
Title: Set the application name for Craft in New Relic
ThreadText: # Set the application name for Craft in New Relic
  
  (Asked by: username_0 on 2014-10-13)
  
  Like many of you, we've started to use New Relic to deep dive into performance of our websites.
  
  Right now, we have a client's production server that has a version of Craft, ExpressionEngine and Wordpress.
  
  Right now WP and Craft get lumped together as a 'PHP application'. Is there any config setting to allow us to set 'Craft CMS' as a thing to differentiate?
  
  We've been able to do this with EE.
  
  **Tags:** config, newrelic
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-12-19. Score: 2 | Accepted answer
  
  This method uses New Relic's PHP API, rather than php.ini, and is working well for me. It seems to be catching everything that I need to monitor. Any applications I've not done this for remain in the default application.
  
  Just stick this in Craft's index.php file:
  
  ```
  if (extension_loaded('newrelic')) {
      newrelic_set_appname('NAME OF SITE');
  }
  
  ```
  
  I haven't tried it with ExpressionEngine or Wordpress, but the principle would be the same?
  
  
  ---
  
  ### Answer by username_2 on 2014-10-13. Score: 1
  
  Looks like this [can be done](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications#php) with a `php.ini` file in Craft's public HTML folder.
  
  Although, we should be able to call an `ini_set` for it in Craft itself. If you want to hit up support@buildwithcraft.com, I'll give you a file that you can test with.
  
  
  ---
  
  