Why should you not hack core in Drupal?

| | 1 min read

When things don't work the way you want it to and all it takes is a hack in the core, people sometimes hack the core. You might get the feature working the way you wanted it to but by doing that you would effectively be crippling your drupal installation. There are three main reasons why you should not hack core in Drupal.

They are as follows

  1. By hacking core you are effectively complicating core updates. If there are too many or too big hacks then updates might not even be possible once the core is hacked.
  2. Future site maintenance would become difficult as you would be introducing undocumented changes in unknown places. Even if the changes are documented it would still be difficult to maintain the system.
  3. Drupal core is heavily tested by hundreds of thousands of users. By hacking core you might inadvertently be introducing security holes or vulnerabilities in the system. At the same time you will not be able to easily use the security upgrades as well.

So the next time you think about hacking core. Think twice. You might be better off creating a custom module to do your job.