Neil Harris will sleep a little easier tonight after his side clicked and put in a performance that was too good for Luton Town.
Cardiff were ahead in the fifth minute, Sean Morrison finding space at the back post to meet Harry Wilson's superb corner. The City skipper adjusting his position to find the back of the net with his right boot.
Less than five minutes later and Cardiff were defending a corner. City cleared to Sheyi Ojo and the winger set off down the left and played the ball inside to Mark Harris who controlled well and finished clinically. A classic counter attack and a great moment for Harris.
Wilson almost capitalised on a slip from the Luton keeper but Simon Sluga recovered to block with an injured arm. Sluga then blocked Kieffer Moore's effort when through on goal
Luton found themselves with plenty of the ball for the rest of the half but no real intent and were that out of sorts that Nathan Jones made a double substitution before half time, acknowledging he'd got his tactics wrong. A couple of off target efforts the best they could muster.
But the second half saw Cardiff look in total control and moved the ball well and with confidence. Goals seemed certain to come but with a number of chances missed two more set pieces brought rewards.
Kieffer Moore headed the third. A classic Moore goal as he was too strong for James Bree and met Wilson's corner with a header that Sluga could only deflect into the net.
Another corner, Marlon Pack taking it this time, ended with Ojo rifling in from 14 yards to complete the victory.
Relief for Neil Harris, elation for Mark Harris and joy for the fans who were on their arris after the disaster in midweek.
Little time to reflect as next up Huddersfield come to CCS on Tuesday (ko 7pm), but now City are nearer the play off places than the relegation places and that has to give everyone a lift.
Cardiff City: Smithies, Bacuna, Morrison (C), Nelson, Bennett, Vaulks, Ralls (Pack 67), Wilson (Hoilett 76), Ojo (Murphy 86), Harris (Whyte 76), Moore (Glatzel 67).
Subs not used: Phillips, Bamba, Benković, Bagan.
Luton Town: Sluga, Pearson, Rea, Bradley (C), Norrington-Davies, Tunnicliffe (Lockyer 71), Mpanzu (Nombe 41), Dewsbury-Hall (Morrell 71), Berry (Bree 41), Cornick (Lee 60), Collins
Subs not used: Shea, Cranie, Moncur, Clark.