Hi,
Are we supposed to delete entire PUB Folder to regenrate the static content in Magento V 2.3 ?
or Just the pub/static.
Solved! Go to Solution.
@rajiv_varma n1You should not be deleting the folder unless it is a show stopper. If you have correct permission in place things should work for you. Just think if you are deleting those folders on production? Why would you do that?
I am agree with the @Vimal Kumar suggestions. But make sure to not delete the .htaccess file inside the pub/static directory. If you are removing this directory manually.
Thanks
I agree to all your responses. My initial thought was the same, there is no reason to delete the whole PUB directory.
For some reason, someone pointed out to delete the PUB, VAR and GENERATED folders, and run the commands to generate them again. To test that the site was developed correctly.
As far as i know, mostly pub/static is one folder that can be deleted and then deployed again to run or test the development site.
i was just making sure, if what i was thinking was right. thats why i asked this question to verify my thoughts if i was in rightdirection.
Also, to test this, i had installed a Stock Magento 2.3, once installed and working fine, i deletd the PUB, VAR and GENERATED folders, like the XXXX person was doing to my development site to test if the development that was done was correct. But after i did that, the site stopped loading the CSS, Images and JS. Which confirmed my question, that PUB folder is not to be deleted at all, because apart from static files it also contains other important files to run.
Thanks