Uninstall (and reinstall) a Magento 2 custom theme
Sadly there is not a really simple way in Magento 2 for uninstalling a custom theme that it is not a Composer package. A CLI’s command would be useful.
Removing only the theme’s code doesn’t seems to be enough.
Anyway, we can uninstall a custom theme with the following steps.
Uninstall
- Remove the theme folder from
app/design/frontend/<Vendor>/
. - Clear the content of
var/view_preprocessed/
- Clear the content of
pub/static/frontend/
- Open the Magento’s database, go to the
theme
table then search and delete the theme row. - Clear the cache with
php bin/magento cache:flush
.
Reinstall
- Add the theme folder to
app/design/frontend/<Vendor>/
. - From the admin panel go to Stores > Configuration > Design, select the theme and save.
- Clear the cache with
php bin/magento cache:flush
.
References
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-apply.html
http://magento.stackexchange.com/questions/99620/magento2-remove-custom-theme-not-composer
http://magento.stackexchange.com/questions/100164/how-to-delete-a-theme