In one of our recent projects, we installed a new Magento 2 theme. Even after the theme was installed, the theme’s content was not displayed in the front end. At other times, the theme’s content like the home page design, the product page design may not show up in the front end.
The screenshot below highlights the above problem
There are two scenarios in which the theme may not show up in the front end.
Theme record may not have been inserted in the Theme table.
- Check the theme table to ensure if the new theme has been inserted.
- If not,then insert the new theme in the Theme table using following SQL command.
Insert Data in Theme Table
If the theme record is already available in the Theme table, then there are chances that the ‘Theme Type’ would not have been set to 0, which is Physical.
There are 3 theme types – 0–Physical, 1-Virtual and 2–Staging.
Ensure that the ‘Theme Type’ is Physical (i.e.) 0.
In the screenshot below the ‘Theme Type’ is set as 1-Virtual
In the screenshot below the ‘Theme Type’ has been changed to 0-Physical
Once you have made the above changes, you need to run the below commands in our SSH terminal.
- php bin/magento setup:upgrade –keep-generated
- php bin/magento setup:static-content:deploy
- php bin/magento cache:clean
- php bin/magento cache:flush
Hope the blog helped you to resolve the issue. Get back to us if you have any comments or feedback.