diff --git a/ghost/core/core/boot.js b/ghost/core/core/boot.js index 3e5df321cc..3b7bfe6118 100644 --- a/ghost/core/core/boot.js +++ b/ghost/core/core/boot.js @@ -477,13 +477,6 @@ async function bootGhost({backend = true, frontend = true, server = true} = {}) try { // Step 1 - require more fundamental components - // Load New Relic - debug('Begin: Load New Relic'); - if (config.get('newRelic:enabled')) { - require('newrelic'); - } - debug('End: Load New Relic'); - // Sentry must be initialized early, but requires config debug('Begin: Load sentry'); require('./shared/sentry'); diff --git a/ghost/core/index.js b/ghost/core/index.js index 3eb69a6823..4bfb4b247c 100644 --- a/ghost/core/index.js +++ b/ghost/core/index.js @@ -1 +1,6 @@ +// Load New Relic +if (process.env.PRO_ENV) { + require('newrelic'); +} + require('./ghost');