Overall, these results suggest that a gut Wnt5A–microbiota axis is intrinsically associated with the maintenance of gut B-cell repertoire and protection from infection. Here, WNT5A is linked to infection.