What is the recommended way to automate application of patches after updating core or contrib modules? For now, I'm doing this manually but it gets tedious for sites with a large number of modules that need to be patched. There seems to be a myriad of methods one can do this but I was wondering if there is a particular method which is the "industry-standard"?

1 Answer 1


If you find yourself doing this often then it might be beneficial to use a make file for the project. Then you can have your make file contain all the patches and just rebuild the codebase instead of updating in place.

Also, be sure to mark patches that you are using in production as "Reviewed and tested by community" this will make them more likely to be committed to the next release which will stop you from having to include that patch in the future.

  • So every time I update my site, I would be running the make file that recreates the codebase for the site? Sorry if I sound dense, I haven't had experience using a make file to spin up my sites before.
    – huijing
    Dec 1, 2014 at 8:02
  • That is the idea. Another option is to create a patch for all you modifications before you update the code. Then update the code and run this site patch afterward. It is easier, however, it will end up less manageable as patches make their way into releases. Dec 1, 2014 at 21:33

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.