I have xampp portable installed on Windows 10.

I run about a dozen Drupal, Wordpress and other CMS on there. I can move the whole stack to different drives and machines and it all works perfectly, only one that can't work is D7/CIVICrm install.

When I move it to another directory I get this error:

fatal error: Cannot redeclare class CRM_Core_ClassLoader in C:\Core\XAMPP_2018\htdocs\crm4\sites\all\modules\civicrm\CRM\Core\ClassLoader.php on line 36

Any idea how to make this work?

The files are absolutely identical from source to location, copy and paste whole Xampp portable folder...

  • Try install a fresh copy first and then try to restore the backup of CiviCRM Database that should work Commented Aug 24, 2018 at 6:03
  • That's what I'm doing, now working Commented Aug 24, 2018 at 10:38
  • Have you tried - civicrm.stackexchange.com/questions/3978/… ? Commented Aug 24, 2018 at 12:13
  • Nope , NONE of that works, I think I might just drop CIVI CRM, I need a portable solution, been a week now...;( Commented Aug 25, 2018 at 1:46
  • Ok, I see something wrong here...the path of the error is C:\Core\XAMPP_2018\htdocs\crm4\ but the new destination path is: G:\XAMPP_2018\htdocs , so where can I change that setting? I take some kind of settings.php , config file or in the database with PHPmy admin? Commented Aug 25, 2018 at 2:15

1 Answer 1


Had to change the path name in civicrm.settings.php from:




This is around LINE 180:

Code looks like this:

$civicrm_root = 'G:/August25/XAMPP_2018/htdocs/crm4/sites/all/modules/civicrm'; if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) { define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'G:/August25/XAMPP_2018/htdocs/crm4\sites\default\files\civicrm\templates_c\'); }

But the slashes also have to be forward like this "/", I searched from Windows path, that's why I couldn't find the code using find and replace!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.