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

magento 2 themes

There are two scenarios in which the theme may not show up in the front end.

Scenario 1

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
Scenario 2

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

magento 2 themes

In  the screenshot below the ‘Theme Type’ has been changed to 0-Physical

magento 2 themes

 

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.

Be the first to Know

Subscribe to our blog to get the latest articles directly to your inbox.

READY TO DRIVE SALES?

Request a Quote Today

Request a Quote

Leave a Reply

6 Comments on "What To Do When Your Magento 2 Theme Does Not Show Up in Front End?"


Guest
Niru
1 year 1 month ago

Hi,

From where do we query the theme table?

Vishnu Priya
Author
1 year 1 month ago

Hi Niru,
You can run the querry using phpmyadmin or from the terminal using ssh mysql login.
Let me know if this resolved your issue.
Thanks..

Vishnu Priya
Author
1 year 1 month ago

Hi Niru,

Thanks for your comments. I am looking into this. Will reply to you soon.
Have you subscribed to our blogs.

Guest
Mike
1 year 1 month ago

Nice post! It helped me to understand the problem. When I make the change in the database and then deploy the theme type value is automaticly changed back to 1 after reloading the page. Any clue on this issue?

Vishnu Priya
Author
1 year 1 month ago

Hi Mike,

Thanks for your comments. I am looking into this. Will reply to you soon.
Have you subscribed to our blogs.

Vishnu Priya
Author
1 year 1 month ago

Hi Mike,

Physical themes
Physical refers to the fact that those themes are defined by files. For example, the blank and luma theme are physically defined under app/design/frontend/
Virtualtheme :
This is yet unclear but I think virtual themes refer to themes you can create in the backend which extends existing physical themes but it seems like it’s not fully implemented yet.

Have you created the physical theme in app/design/vendor/,if not then it will automatically update as virtual theme whenever you deploy…
You might not have created the physical theme that’s why it may be changing.

Please let me know if this resolved your issue.
Thanks.
Please subscribe to our blogs.