MAGENTO 2 THEME DOES NOT SHOW UP IN FRONT END?

2018-05-12 06:47:58   Magento

  Magento 2  

WHAT TO DO WHEN YOUR MAGENTO 2 THEME DOES NOT SHOW UP IN FRONT END?

Reson One:

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.

  1. INSERT INTO `theme` (`theme_id`, `parent_id`, `theme_path`, `theme_title`, `preview_image`, `is_featured`, `area`, `type`, `code`) VALUES
  2. (1, NULL, 'Magento/blank', 'Magento Blank', 'preview_image_57bd8ff1e41f4.jpeg', 0, 'frontend', 0, 'Magento/blank'),
  3. (2, 1, 'Magento/luma', 'Magento Luma', 'preview_image_57bd8ff21a0b0.jpeg', 0, 'frontend', 0, 'Magento/luma'),
  4. (3, NULL, 'Magento/backend', 'Magento 2 backend', NULL, 0, 'adminhtml', 0, 'Magento/backend'),
  5. (5, 1, 'themename/title', 'themename - title', 'preview_image_57bea4ad73a91.jpeg', 0,
  6. 'frontend', 0, 'themename/title');

Reason Two:

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.

Tony's blog image

to
Tony's blog image

Once you have made the above changes, you need to run the below commands in our SSH terminal.

  1. php bin/magento setup:upgrade keep-generated
  2. php bin/magento setup:static-content:deploy
  3. php bin/magento cache:clean
  4. php bin/magento cache:flush

From: dckap