Body: <p>I've got a Civi/Wordpress install. Originally all of the codebase was in a directory called dev. When it was ready to go live I moved everything to a directory called default, and I went through all of the config files and databases to ensure that path references were all updated.
  Everything seems to be working fine, apart from the fact that my main cron job is failing. Looking at the error log, this is because when cron.php gets called, something in turn is calling wp-load.php from the dev directory:</p>
  
  <pre><code>`require_once(/home/example/sites/dev/wp-load.php)`
  </code></pre>
  
  <p>when of course it should be calling /home/example/sites/default/wp-load.php</p>
  
  <p>Clearly I've missed a setting somewhere, but I'm really struggling to identify where this is. Any pointers most welcome.</p>
  
  <p>In terms of a broader learning point, I won't be changing directory names again in a hurry on new projects.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-01T10:04:50.497Z
Comments.Text: What commands are you running from cron?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-02T12:45:11.843Z
Comments.Text: Good question, thank you. This prompted me to disable all of the scheduled jobs and re-run the main cronjob. This gave the same result sadly.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-05T19:22:41.827Z
Comments.Text: Enabling the debug/backtrace might show you where that require is coming from? Normally, I'd guess it would be in the civicrm.settings.php file, but if it's only failing in the cron, that would suggest your cron is being run by a standalone script with the path baked into it.
Comments.UserDisplayName: Alan Dixon
Tags: <cron><civicrm.settings.php><configuration>
Title: Why is my cron run failing following a database move?
ThreadText: # Why is my cron run failing following a database move?
  
  (Asked by: username_0 on 2020-04-30)
  
  I've got a Civi/Wordpress install. Originally all of the codebase was in a directory called dev. When it was ready to go live I moved everything to a directory called default, and I went through all of the config files and databases to ensure that path references were all updated.
  Everything seems to be working fine, apart from the fact that my main cron job is failing. Looking at the error log, this is because when cron.php gets called, something in turn is calling wp-load.php from the dev directory:
  `require_once(/home/example/sites/dev/wp-load.php)`
  
  when of course it should be calling /home/example/sites/default/wp-load.php
  Clearly I've missed a setting somewhere, but I'm really struggling to identify where this is. Any pointers most welcome.
  In terms of a broader learning point, I won't be changing directory names again in a hurry on new projects.
  
  **Tags:** cron, civicrm.settings.php, configuration
  
  > **Comments:**
  > **username_1**: What commands are you running from cron?  
  > **username_0**: Good question, thank you. This prompted me to disable all of the scheduled jobs and re-run the main cronjob. This gave the same result sadly.  
  > **username_2**: Enabling the debug/backtrace might show you where that require is coming from? Normally, I'd guess it would be in the civicrm.settings.php file, but if it's only failing in the cron, that would suggest your cron is being run by a standalone script with the path baked into it.  
  
  ---
  
  ## 0 answers
  
  