0

After clearing the cache default_head_blocks.xml doesn't update.

How I clear the cache

1. php bin/magento setup:static-content:deploy

2. Flush Magento Cache in the admin

What is the best way to clear magento 2 cache?

Thanks for your help.

3
  • try php bin/magento cache:flush or php bin/magento cache:clear command. Commented Aug 13, 2019 at 3:52
  • please share your xml file path.
    – Pawan
    Commented Aug 13, 2019 at 4:03
  • If you have run above commands than your file is not being executed. Please check your theme or module have the same file. Like: app/code/Vendor/Module/view/frontend/layout/default_head_blocks.xml Or app/design/frontend/Yourtheme/Yourtheme/layout/default_head_blocks.xml Commented Aug 13, 2019 at 5:46

2 Answers 2

0

If you use custom theme means follow the below steps

1. Open the 'theme' table and update the type=0 for the particular custom theme.

2. php bin/magento setup:static-content:deploy -f

3. php bin/magento c:f

Finally we got the solution.

2
  • Thanks for your help
    – Tora
    Commented Aug 14, 2019 at 6:58
  • @Tora Is it working fine? Commented Aug 14, 2019 at 7:08
0

Doesn't matter either you are clearing cache from admin console or from command line. It will clear all the active cache. Cache:flush will remove both "Active" and "Inactive" cache. The only difference is, when you remove the cache from command line, you need to set the permission back.

Can you show me what are you trying to update in "default_head_blocks.xml" file and where is it located in your theme?

2
  • Thanks, I was able to find the code on another page. it seems it was my browser cache.
    – Tora
    Commented Aug 14, 2019 at 6:59
  • Good to know you found which worked for you. Cheers !!!! Commented Aug 14, 2019 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.