We have developed a multi-well format polyacrylamide-based assay for probing the effect of extracellular matrix stiffness on bacterial infection of adherent cells. This assay is compatible with flow cytometry, immunostaining, and traction force microscopy, allowing for quantitative measurements of the biomechanical interactions between cells, their extracellular matrix, and pathogenic bacteria.