3

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.

  • What commands are you running from cron? – Aidan May 1 at 10:04
  • 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. – Graham May 2 at 12:45
  • 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. – Alan Dixon May 5 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.