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.

  • try php bin/magento cache:flush or php bin/magento cache:clear command. – Sweety Masmiya Aug 13 at 3:52
  • please share your xml file path. – Pawan Aug 13 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 – Dinesh Rajput Aug 13 at 5:46
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.

  • Thanks for your help – Tora Aug 14 at 6:58
  • @Tora Is it working fine? – Soundararajan m Aug 14 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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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