Floodplain and riparian ecosystems are noteworthy for their biodiversity conservation value as well as for their widespread conversion to agriculture. Recent evidence indicates that the conversion of remaining habitat may be accelerating because of a new threat: on-farm practices meant to promote food safety. Nationwide, US fruit and vegetable farmers report being pressured by commercial produce buyers to engage in land-use practices that are not conducive to wildlife and habitat conservation, in a scientifically questionable attempt to reduce food-borne illness risk. We measured the extent of impacts from some of these practices in a leading produce-growing region of California. Over a 5-year period following an outbreak of toxic Escherichia coli from spinach, a crop grown extensively in the region, 13.3% of remaining riparian habitat was eliminated or degraded. If these practices were implemented statewide, across all crops, up to 40% of riparian habitat and 45% of wetlands in some counties would be affected. This study highlights the importance of managing farms for both food safety and ecological health through the use of an evidence-based, adaptive management approach. Ongoing biodiversity loss and global integration of the food supply make these findings relevant wherever produce is grown.