Bacteria critically impact our everyday lives, with potentially harmful or beneficial impacts in health, industry, agriculture, and the environment. While bacteria have been studied for over 300 years, most lab studies focus on bacteria in liquid culture or on flat plates; however, most bacteria inhabit heterogeneous porous media, like soils, sediments, and biological tissues and gels. We have developed PoreBiome, a “porous petri dish” that enables studies of microbes in 3D porous habitats. Our platform enables microbial cells to be arranged—in any desired 3D structure, with any community composition—within a porous matrix having tunable properties. This capability has enormous research and applied potential, impacting the study and treatment of microbes in the gut, the lung, the skin, and in soil.