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

  1. Remove the theme folder from app/design/frontend/<Vendor>/.
  2. Clear the content of var/view_preprocessed/
  3. Clear the content of pub/static/frontend/
  4. Open the Magento’s database, go to the theme table then search and delete the theme row.
  5. Clear the cache with php bin/magento cache:flush.

Reinstall

  1. Add the theme folder to app/design/frontend/<Vendor>/.
  2. From the admin panel go to Stores > Configuration > Design, select the theme and save.
  3. 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

Categories

Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow

Comments

Developed and designed by Netgloo
© 2019 Netgloo