Worldwide responses to urbanization, expanding populations and climatic change mean biodiverse habitats are replaced with expensive, but necessary infrastructure. Coastal cities support vast expanses of buildings and roads along the coast or on "reclaimed" land, leading to "armouring" of shorelines with walls, revetments and offshore structures to reduce erosion and flooding. Currently infrastructure is designed to meet engineering and financial criteria, without considering its value as habitat, despite artificial shorelines causing loss of intertidal species and altering ecological natural processes that sustain natural biodiversity. Most research on ameliorating these impacts focus on soft-sediment habitats and larger flora (e.g., restoring marshes, encouraging plants to grow on walls). In response to needs for greater collaboration between ecologists and engineers to create infrastructure to better support biodiversity, we show how such collaborations lead to small-scale and inexpensive ecologically informed engineering which reduces loss of species of algae and animals from rocky shores replaced by walls. Adding experimental novel habitats to walls mimicking rock-pools (e.g., cavities, attaching flowerpots) increased numbers of species by 110% within months, in particular mobile animals most affected by replacing natural shores with walls. These advances provide new insights about melding engineering and ecological knowledge to sustain biodiversity in cities.