The scholars unanimously agree that if a child performs ḥajj before reaching puberty, he must repeat the pilgrimage once he comes of age and is able to do so; the earlier pilgrimage does not fulfill the obligatory ḥajj of Islam, and the same rule applies to ʿumrah.
If the child has not yet reached the age of discernment, his guardian enters the state of iḥrām (consecration) on his behalf by making the intention for him, keeps him away from the prohibited acts, carries him while performing ṭawāf (circumambulation) and saʿy (the walk between Ṣafā and Marwah), accompanies him at ʿArafah, Muzdalifah, and Minā, and casts the pebbles for him.
If the child has reached the age of discernment, he makes the intention for iḥrām himself with his guardian’s permission and carries out whatever rites he can. Whatever he is unable to do—such as throwing the pebbles—his guardian performs on his behalf; and if he cannot walk, he may be carried or allowed to ride during ṭawāf.
Everything a child, whether discerning or not, is capable of doing himself—such as standing at ʿArafah or spending the nights at Muzdalifah and Minā—he must do personally; it is not valid for another to do it for him when he is able, and he must avoid during his pilgrimage the same prohibitions that apply to an adult.
A person is considered able to perform ḥajj when he is capable both physically and financially: he can remain seated securely, endure the journey, possesses funds sufficient for the round trip, and has enough to maintain his children and anyone else he is obliged to support until he returns. This must be after settling all debts and obligations, and the route to ḥajj must be safe for his life and property.
If he possesses the financial means but lacks physical ability—because he is very elderly, incapacitated, or afflicted with a chronic illness from which recovery is not expected—he is required to appoint someone to perform one ḥajj and one ʿumrah on his behalf.