<p>I was hoping to have my module create a few fields, sections, and entries after the Craft 3 CMS has completed it's installation.</p>

<p>Is there a callback I can listen to that triggers after the CMS is installed? Or maybe there's a <code>onAfterInstall</code> equivalent I can run? </p>

<p>I've been poking around the <a href="https://github.com/craftcms/cms/blob/develop/src/controllers/InstallController.php" rel="nofollow noreferrer">InstallController</a>, but I'm really not sure what I'm looking for. </p>

CC BY-SA 4.0
2018-09-02T12:27:58.387Z
Can't you just create a normal migration and run it? Plugins have such an ability but modules not by default. That's why I would just create a normal migration
Robin Schambach
CC BY-SA 4.0
2018-09-12T15:22:17.960Z
Thanks Robin. I've taken a good look in content migration and was ready to create a detailed and complex migration. Then Craft's 3.1 'Project Config' was announced. This will do everything and more on it's release. https://craftcms.com/support/craft-3-1-dev-preview-notes
Mark Notton
<craft3><installation><modules>
Is there a callback for post Craft 3 CMS installation I can use?
# Is there a callback for post Craft 3 CMS installation I can use?

(Asked by: username_0 on 2018-09-02)

I was hoping to have my module create a few fields, sections, and entries after the Craft 3 CMS has completed it's installation.

Is there a callback I can listen to that triggers after the CMS is installed? Or maybe there's a `onAfterInstall` equivalent I can run?

I've been poking around the [InstallController](https://github.com/craftcms/cms/blob/develop/src/controllers/InstallController.php), but I'm really not sure what I'm looking for.

**Tags:** craft3, installation, modules
> **Comments:**
> **username_1**: Can't you just create a normal migration and run it? Plugins have such an ability but modules not by default. That's why I would just create a normal migration  
> **username_0**: Thanks Robin. I've taken a good look in content migration and was ready to create a detailed and complex migration. Then Craft's 3.1 'Project Config' was announced. This will do everything and more on it's release. https://craftcms.com/support/craft-3-1-dev-preview-notes  

---

## 0 answers

