Answers.Body: <p>Agreed with the @Kainuk answer. Here is what i did today to solve the same error.
  In your civicrm.settings.php if you have</p>
  <pre><code>require_once 'CRM/Core/ClassLoader.php';
  </code></pre>
  <p>Change it by adding &quot;civicrm_root&quot; variable</p>
  <pre><code>require_once $civicrm_root . '/CRM/Core/ClassLoader.php';
  </code></pre>
  <p>This is assuming that somewhere in that file, you have already set the &quot;$civicrm_root&quot; variable to point to your civiCRM install directory such as</p>
  <pre><code>$civicrm_root = '/var/www/html/drupal-root/vendor/civicrm/civicrm-core';
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-09T19:31:20.723Z
Answers.LastActivityDate: 2020-11-09T19:55:53.730Z
Answers.LastEditDate: 2020-11-09T19:55:53.730Z
Answers.UserDisplayName: salah-1
Answers.Body: <p>In the file <code>civicrm.settings.php</code> the variable <code>$civicrm_root</code> is defined. It should point to the directory where you installed the CiviCRM plugin. If it has the wrong value it causes the reported error.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-01T08:39:45.143Z
Answers.LastActivityDate: 2017-10-01T08:39:45.143Z
Answers.UserDisplayName: Kainuk - CiviCooP
Body: <p>I've installed the plugin successfully, but when I go visit the CiviCRM page in the backend, I get the following error: </p>
  
  <p>Warning: require_once(CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /home/capitaleventscom/public_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462</p>
  
  <p>Fatal error: require_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.:/home/capitalevents/public_html/wp-content/plugins/civicrm/civicrm/:/home/capitalevents/public_html/wp-content/plugins/civicrm/civicrm//packages:.:/usr/local/php56/pear') in /home/capitaleventscom/public_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462</p>
  
  <p>I've tried but couldn't figure out anything. Any help will greatly be appreciated.</p>
  
Tags: <wordpress><civievent>
Title: Fails to open ClassLoader.php file
ThreadText: # Fails to open ClassLoader.php file
  
  (Asked by: username_0 on 2017-09-30)
  
  I've installed the plugin successfully, but when I go visit the CiviCRM page in the backend, I get the following error:
  
  Warning: require\_once(CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /home/capitaleventscom/public\_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462
  
  Fatal error: require\_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include\_path='.:/home/capitalevents/public\_html/wp-content/plugins/civicrm/civicrm/:/home/capitalevents/public\_html/wp-content/plugins/civicrm/civicrm//packages:.:/usr/local/php56/pear') in /home/capitaleventscom/public\_html/wp-content/uploads/civicrm/civicrm.settings.php on line 462
  
  I've tried but couldn't figure out anything. Any help will greatly be appreciated.
  
  **Tags:** wordpress, civievent
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-10-01. Score: 4 | Accepted answer
  
  In the file `civicrm.settings.php` the variable `$civicrm_root` is defined. It should point to the directory where you installed the CiviCRM plugin. If it has the wrong value it causes the reported error.
  
  
  ---
  
  ### Answer by username_1 on 2020-11-09. Score: 1
  
  Agreed with the @username_2 answer. Here is what i did today to solve the same error.
  In your civicrm.settings.php if you have
  
  ```
  require_once 'CRM/Core/ClassLoader.php';
  
  ```
  
  Change it by adding "civicrm\_root" variable
  
  ```
  require_once $civicrm_root . '/CRM/Core/ClassLoader.php';
  
  ```
  
  This is assuming that somewhere in that file, you have already set the "$civicrm\_root" variable to point to your civiCRM install directory such as
  
  ```
  $civicrm_root = '/var/www/html/drupal-root/vendor/civicrm/civicrm-core';
  
  ```
  
  
  ---
  
  