Hello i have made a simple change to the theme.css file of a magento them for a layout issue and i cannot get it to show on the site
Steps to reproduce
added css does not show in the css file when using chrome/firefox inspect tool ie it seems to be looking at an old cache/file
I have done the following aswell, and ran flush magento, and ran php bin/magento indexer:reindex and refreshed index management blocks etc
Flushed Catalog Images Cache Pregenerated product images files
Flushed Static Files Cache Pre processed view files and static files
i also went into cpanel/filemanager and deleted all of the merged files in /pub/static/_cache/merged and then ran all the reindex and flushes again and still does not show in inspection tool -
I suppose you develop in not the developer mode, so you can try the following:
remove content of the next directories:
-(magento root path)/pub/static/_cache/
-(magento root path)/pub/static/frontend/
-(magento root path)/pub/static/adminhtml/ (not necessary but I do it anyway)
-(magento root path)/pub/static/deployed_version.txt
After that execute command in the terminal from the magento root directory:
php bin/magento setup:static-content:deploy (if you are using magento version < 2.2.*). If higher, php bin/magento setup:static-content:deploy -f
Oh, actually I see, that it is live site. So you should better not do that.
Change file theme.css under the app/design folder. After that run above commands and then clean the cache:
php bin/magento cache:clean
php bin/magento cache:flush
(but you should test it first on the dev- or test-site)
hello dmoisej thanks for your reply, your reply says run php bin/magento setup:static-content:deploy (if you are using magento version < 2.2.*) but im using 2.1.2
it also says If higher, php bin/magento setup:static-content:deploy -f -
but im on the lower version 2.1.2?
also i recognise that static deploy function and last time i ran it i had to have my whole site rebuilt as it got a http 500 error so im reluctant to running that command
with regards to the css file to update i see more than one - ie ....
i changed the css in these files
then flushed all caches and ran reindex in ssh but still it does not show
actually i think that did work but i thought it had nto as there must of been a few minutes delay somehow!
thanks for the tip
If you are using version 2.1.2 you should run
php bin/magento setup:static-content:deploy
You must not hesitate about using this command. Do not just change pub/static files, cause if some other developers will be working with your website, then I think they might clean pub/static/.. folder and redeploy all files in order to make their extensions or customization work.
One more tip. In order not to see 500 error on the live site, set your website to the production mode. But if the site runs in the production mode, you will definitely have to run setup:static-content:deploy.
So have you managed to fix your problem?