Homegardens are small-scale agroforestry systems consisting of parcels of land on homesteads in which diverse plant species are cultivated in several strata, often integrating herbaceous, tree, vine, crop, and animal components. Among the vines in Mayan homegardens in Yucatán is the pitahaya (Hylocereus undatus), a cactus with edible fruit. We use this species as a model to identify changes in the level of knowledge and management of homegardens due to modernization (increased tourism, paved roads, and urban expansion) in order to propose conservation strategies. Structured interviews were carried out in 100 homegardens; information regarding economics, language, school attendance, and the distance to cities were gathered. Currently, pitahaya is mostly eaten as a sorbet, and women harvest its fruit more often than men do. It is the elderly who teach the next generations about the use and care of pitahayas. The model that best explained the level of knowledge and management about pitahaya included variables such as the location of homegardens; their distance to the nearest city; as well as language, gross domestic product, and school attendance rate of home gardeners. We found that there is less traditional knowledge about pitahayas when home gardeners have higher school attendance and that not only pitahayas but also homegardens near cities are being neglected. We suggest that conservation planning for pitahayas and homegardens should include education programs on their ecological, nutritional, and economic importance. Homegardens, whose owners have the highest level of knowledge about their management and biodiversity, should be interactively conserved, and the knowledge of home gardeners should be acknowledged.