Override Civicrm Utils file /sites/all/modules/civicrm/CRM/Utils/ReCAPTCHA.php to /custom_code/CRM/Utils/ReCAPTCHA.php . it is not working. I have cleared the drupal cache and also cleared /civicrm/admin/setting/updateConfigBackend?reset=1 cache. What thing is missing please guide me how can override civicrm files?


First of all, you should really customize CiviCRM by developing extensions. There is a developer guide that will explain you how this is done: https://docs.civicrm.org/dev/en/latest/

If you do want to override anyway, you should first of all navigate to Administer>System Settings>Directories to provide the path to the PHP files, have you done this? If you have it should work but I would still recommend to take the extensions route as this is by far the most used and supported route.

  • Yes , I have already set directories path of php files and also already override some civicrm core files like /custom_code/CRM/Admin/Form/Setting/Mapping.php file and it is override successfully . but /custom_code/CRM/Utils/ReCAPTCHA.php file is not overriding. – jossan May 22 '19 at 7:44
  • I understand. I repeat my recommendation to write an extension rather than overriding core files. – ErikH - CiviCooP May 22 '19 at 10:09
  • Okay. I am reading docs.civicrm.org/dev/en/latest. – jossan May 22 '19 at 11:23
  • Cool, do ask questions if you need any help, either here or on the dev channel on Mattermost? – ErikH - CiviCooP May 22 '19 at 14:06

Your Answer

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

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