If a person who has been guilty of the practices and beliefs you have mentioned follows this course and examines his beliefs and practices in the light of the guiding principles included in the declaration of belonging to Islam, and then repents of what he had done in the past, gives it all up and starts to conduct his life according to the Prophet's teachings, he is sure to earn Allah's forgiveness. He should then go to pilgrimage as part of his duties as a Muslim. When he offers the pilgrimage with sincerity and dedication, he is forgiven all his past sins. As you realize, pilgrimage is a duty of all Muslims who can afford to undertake the journey, physically and financially. What this means is that forgiveness of the aforementioned beliefs and practices can be earned through repentance and the rectification of one's beliefs.
Pilgrimage brings about the forgiveness of lesser sins.