I tried the above solutions. But it didn't help me. Despite, I used the same commands which they mentioned with the changes of sequence. They are,

1. **clear cache, composer_home, generation, log, page_cache, tmp and view_preprocessed** from **var** directory

2. run the following commands one by one. 

> php bin/magento indexer:reindex
> 
> php bin/magento c:f
> 
> php bin/magento setup:static-content:deploy

I hope this may help to someone like me.