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?

1 Answer 1


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.
    – jagjeet
    May 22, 2019 at 7:44
  • I understand. I repeat my recommendation to write an extension rather than overriding core files. May 22, 2019 at 10:09
  • Okay. I am reading docs.civicrm.org/dev/en/latest.
    – jagjeet
    May 22, 2019 at 11:23
  • Cool, do ask questions if you need any help, either here or on the dev channel on Mattermost? May 22, 2019 at 14:06

Your Answer

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

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