# How to use deploy_after hook?

**URL:** https://discourse.roots.io/t/how-to-use-deploy-after-hook/20811
**Category:** trellis
**Created:** 2021-05-20T00:22:47Z
**Posts:** 3
**Showing post:** 2 of 3

## Post 2 by @strarsis — 2021-06-09T14:34:26Z

Discussion and solutions for removing the default themes from WordPress core package:

> [@Remove Default WP Themes From Core](https://discourse.roots.io/t/remove-default-wp-themes-from-core/3611/14):
>
> PS, if you want to also remove them from sites that already have them downloaded, then you would need to use not the post-root-install-package callback, but also the post-update-cmd. So in that case, rather than the code in the Github PR, the Scripts section of your composer.json would look something like this "scripts": { "post-root-package-install": ["php -r \"copy('.env.example', '.env');\"", "composer run remove-old-wp-themes"], "post-update-cmd": [ "composer run remove-old-wp…

---

_[View the full topic](https://discourse.roots.io/t/how-to-use-deploy-after-hook/20811)._
