Applying the theme

As you learned in the previous chapter, it's time to activate the new theme. Activate the CompStore Electronics theme in the Admin area (http://localhost/packt/admin_packt) to see the following result:

Applying the theme

Sometimes, when you update in the Magento structure or activate a new theme, you need to deploy the theme and module changes. If you want to deploy your changes, follow these steps:

  1. Open the terminal or command prompt.
  2. Delete the packt/pub/static/frontend/<Vendor>/<theme>/<locale> directory.
  3. Delete the var/cache directory.
  4. Delete the var/view_preprocessed directory.
  5. Then, access the packt/bin directory.
  6. Run the php magento setup:static-content:deploy ...

Get Magento 2 Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.