DeAndre Hopkins had to dodge punches like they were Iggy Azalea dating rumors Wednesday ... 'cause 49ers cornerback Jimmie Ward tried to mess up his face during practice!!
It all went down in Houston -- where the Niners are in town for a joint workout with the Texans -- when Hopkins didn't like that Ward ripped off his helmet during a 1-on-1 rep.
The superstar wide receiver shoved the DB ... took a swing -- and then had to FIGHT FOR HIS LIFE as the whole 49ers squad swarmed.
D-Hop was eventually taken to the ground and a pig pile formed ... but when it all unfolded, everyone was alive and practice carried on.
We're sure Iggy's relieved ... maybe.