Big Sam started with a strong side and it didn’t take them long to hit the front against a weakened Cork City line-up when Alou Diarra rose unmarked to power home Joe Cole’s inswinging corner inside five minutes.
The Premier League side went further in front in the 18th minute when Kevin Nolan’s through ball split the City defence and Cole finished well.
The home side forced their way back into the game seven minutes before the break when Adam Rundle’s first home after his first effort had been blocked by Titus Bramble.
Allardyce played an entirely different 11 for the second half, with City boss Tommy Dunne changing all but three of his starting side.
City keeper Kevin Burns had his moment of glory when he saved Mark Noble’s spot kick in the first minute of the second half.
However, it was only a brief reprieve for the home side as goals from Matt Taylor, Paul McCallum, a Noble penalty and Ravel Morrison made it 6-1 to the Hammers
Rob Lehane pulled a late goal back for City.
CORK CITY (First Half): Burns; Dunleavy, Spillane, Buckley, D Murphy; Kenny, Duggan, A Browne, Rundle; Behan, Furlong.
CORK CITY (Second Half): Burns (Browne 88); K Kavanagh, Dunleavy, E Murphy, D Murphy (Forde 77); Turner, O’Connell (Darren Murphy 77), G Morrissey (Dineen 83), D Horgan (R Lehane 77); Kilduff, D Kavanagh.
WEST HAM (First Half): Jaaskelainen; Demel, Bramble, Collins, Potts; Cole, Collison, Nolan, Diarra, Jarvis; Maiga.
WEST HAM (Second Half): Adrian; Potts, Reid, Tomkins, Rat; Whitehead, Morrisson, Noble, Taylor; McCallum, Vaz Te.
Referee: P Sutton (Clare).