Praise be to Allah.
You can do wudu with socks on if you apply these four conditions:
- That they should have been put on when one was in a state of purity, i.e., when one has wudu. The evidence for that is what the Prophet (peace and blessings of Allah be upon him) said to al-Mughirah ibn Shu’bah: “Don’t worry, because I put them on when I was clean.”
- That the khufuf (leather slippers which cover the ankle) or socks should be pure. If they are impure then it is not permissible to wipe over them. The evidence for that is that the Messenger of Allah (peace and blessings of Allah be upon him) led his Companions in prayer one day wearing shoes, which he took off whilst he was praying. He said that Jibril had told him that there was something dirty/impure on them. This was narrated by Ahmad from the hadith of Abu Sa’id al-Khudri (may Allah be pleased with him) in his Musnad. This indicates that it is not permissible to pray wearing anything that is impure, because if the impure thing is wiped over, the person will be contaminated by that impurity, so he cannot be considered to be pure.
- They may be wiped over when one is purifying oneself from minor ritual impurity (i.e., doing wudu after passing wind, urine or stools), not when one is in a state of major ritual impurity following sexual activity or when ghusl is required. The evidence for that is the hadith of Safwan ibn ‘Assal (may Allah be pleased with him) who said: “The Messenger of Allah (peace and blessings of Allah be upon him) commanded us, when we were travelling, not to remove our khufuf for three days and three nights, except in the case of janabah. But we could keep them on and wipe over them in the case of stools, urine and sleeping.” This was narrated by Ahmad from the hadith of Safwan ibn ‘Assal (may Allah be pleased with him) in his Musnad. So the condition is that wiping the socks may be done when purifying oneself (doing wudu) from minor ritual impurity, and it is not permissible in the case of major ritual impurity, because of the hadith which we have mentioned here.
- That the wiping may be done within the time specified by Shari`ah , which is one day and one night in the case of one who is not travelling , and three days and three nights in the case of one who is travelling. This is because of the hadith of ‘Ali ibn Abi Talib (may Allah be pleased with him) who said: “The Prophet (peace and blessings of Allah be upon him) stated one day and one night for the one who is not travelling, and three days and three nights for the one who is travelling, i.e., for wiping over the khufuf.” This was narrated by Muslim. This period starts from the first time one wipes over the socks when doing wudu after some minor ritual impurity, and it ends twenty-four hours later for the one who is not travelling, and seventy-two hours later for the one who is travelling. So if we assume that a person purifies himself for Fajr prayer on Tuesday and remains tahir (pure, i.e., keeps his wudu) until ‘Isha prayer on Tuesday evening, then he sleeps and wakes up to pray Fajr on Wednesday, and he wipes his socks at five o’clock zawali time , then the period begins from 5 a.m. on Wednesday and lasts until 5 a.m. on Thursday. If we assume that he wiped his socks before 5 a.m then he can pray Fajr on Thursday with this wiping and pray as much as he wants as long as he remains tahir, because according to the most correct scholarly opinion, wudu is not broken when the time period for wiping over the socks expires. That is because the Messenger of Allah (peace and blessings of Allah be upon him) did not set a time limit for taharah, rather he set a time limit for wiping over the socks. Once that time limit expires, one cannot wipe over the socks again, but if a person remains in a state of taharah then his taharah is still valid, because this is what is implied by the shar’i evidence, and whatever is proven by shar’i evidence cannot be invalidated unless there is further shar’i evidence to that effect. There is no evidence to suggest that wudu is broken when the time limit for wiping over the socks expires, because what the basic principle is that he remains as he is (i.e., tahir) until it becomes apparent that this is no longer the case.
These are the conditions which apply to wiping over the khufuf . There are other conditions which were mentioned by some of the scholars, but some of these are subject to further debate.
For more, please see this category: Wiping Over the Socks
And Allah knows best.