Answers.Body: <p>I have resolved the issue. The path to the wordpress directory was wrong, don't know why. I have changed hosting during the week.</p>
  
  <p>I had to add this line in civicrm.settings.php:</p>
  
  <pre><code>define('CIVICRM_CMSDIR','/var/www/vhosts/website.org/httpdocs');
  </code></pre>
  
  <p>This issue helped me: <a href="https://civicrm.stackexchange.com/questions/2730/problem-with-open-basedir-restriction-in-effect">Problem with open_basedir restriction in effect</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-08T15:30:44.963Z
Answers.LastActivityDate: 2016-05-08T15:30:44.963Z
Answers.LastEditDate: 2017-04-13T12:53:13.167Z
Answers.UserDisplayName: Francis Poisson
Body: <p>CiviCRM 4.6.7</p>
  
  <p>I get an error with this command: 
  wget -O - -q -t 1 '<a href="http://www.website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=user&amp;pass=password&amp;key=site-key" rel="nofollow">http://www.website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=user&amp;pass=password&amp;key=site-key</a>'</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'Exception' with message 'Function
    "is_admin()" is missing, even though WordPress is the user framework.'
    in
    /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:258</p>
  </blockquote>
  
  <p>Thanks for helping.</p>
  
  <p>Edit:</p>
  
  <p>With CLI PHP I get this error:</p>
  
  <p>This what I get with CLI PHP:</p>
  
  <p>Sorry. A non-recoverable error has occurred.
  Could not find the install directory for WordPress</p>
  
  <pre><code>#0 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(343): CRM_Core_Error::fatal("Could not find the install directory for WordPress")
  #1 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1500): CRM_Utils_System_WordPress-&gt;loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
  #2 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(251): CRM_Utils_System::loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
  #3 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(72): civicrm_cli-&gt;_bootstrap()
  #4 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.php(31): civicrm_cli-&gt;initialize()
  #5 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-03T16:44:08.317Z
Comments.Text: Did you try using CLI PHP?
Comments.UserDisplayName: Hershel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T20:15:27.720Z
Comments.Text: I am having this same issue. I have used the provided code to define the Wordpress install directory, but I am still unable to run the Cron. Any help would be appreciated.
Comments.UserDisplayName: user2258848
Tags: <cron-job><cron>
Title: Cron issue with shared hosting
ThreadText: # Cron issue with shared hosting
  
  (Asked by: username_0 on 2016-05-03)
  
  CiviCRM 4.6.7
  
  I get an error with this command:
  wget -O - -q -t 1 '<http://www.website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=user&pass=password&key=site-key>'
  
  > Fatal error: Uncaught exception 'Exception' with message 'Function
  > "is\_admin()" is missing, even though WordPress is the user framework.'
  > in
  > /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:258
  
  Thanks for helping.
  
  Edit:
  
  With CLI PHP I get this error:
  
  This what I get with CLI PHP:
  
  Sorry. A non-recoverable error has occurred.
  Could not find the install directory for WordPress
  
  ```
  #0 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(343): CRM_Core_Error::fatal("Could not find the install directory for WordPress")
  #1 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1500): CRM_Utils_System_WordPress->loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
  #2 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(251): CRM_Utils_System::loadBootStrap((Array:0), FALSE, FALSE, "/var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/")
  #3 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(72): civicrm_cli->_bootstrap()
  #4 /var/www/vhosts/website.org/httpdocs/wp-content/plugins/civicrm/civicrm/bin/cli.php(31): civicrm_cli->initialize()
  #5 {main}
  
  ```
  
  **Tags:** cron-job, cron
  
  > **Comments:**
  > **username_1**: Did you try using CLI PHP?  
  > **username_2**: I am having this same issue. I have used the provided code to define the Wordpress install directory, but I am still unable to run the Cron. Any help would be appreciated.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-05-08. Score: 1 | Accepted answer
  
  I have resolved the issue. The path to the wordpress directory was wrong, don't know why. I have changed hosting during the week.
  
  I had to add this line in civicrm.settings.php:
  
  ```
  define('CIVICRM_CMSDIR','/var/www/vhosts/website.org/httpdocs');
  
  ```
  
  This issue helped me: [Problem with open\_basedir restriction in effect](https://civicrm.stackexchange.com/questions/2730/problem-with-open-basedir-restriction-in-effect)
  
  
  ---
  
  