I have a plugin that initially was created for version 3.x of Craft, but was updated to be compatible with Craft 4. How can I update the plugin with some new features for Craft 3?

  • Did you look at craftcms.com/docs/4.x/extend/… yet? Commented Aug 18, 2022 at 23:23
  • Is this your own plugin? Or do you mean, that the plugin was made compatible for Craft 4 and new features are now added to the v4 compatible version but not being backported or provided in a separate v3 branch? Commented Aug 19, 2022 at 14:12

1 Answer 1


Easiest way is to have separate branches for the Craft 3 and Craft 4 version of the plugin. Then also increment the major version number of the Craft 4 version, and tag each release separately.

  • Will craft "understand" which branch is for Craft 3 and 4 when installing plugin? Commented Aug 26, 2022 at 8:41
  • Each branch will have a separate composer.json file with different version requirements, so yes. This is how I do it for all of my plugins. Look at the branches here, for example: github.com/nystudio107/craft-retour Commented Aug 26, 2022 at 15:26

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.