Piglets in commercial husbandry are weaned abruptly and at a rather young age. Many weanling piglets are poorly adapted to ingest solid food, often resulting in a period of underfeeding. The underfeeding generally leads to a poor growth, diarrhoea occurrence and the development of damaging behaviours such as belly nosing, indicating reduced welfare, in the immediate postweaning period. Weaning problems are multifactorial, but an early intake of solid food and reduced stress around weaning are major determinants of a quick adaptation of piglets to the new postweaning situation. In this paper we focus on improving welfare of piglets around weaning by allowing piglets to interact more with the sow during lactation, as would occur under more natural conditions. Besides providing piglets with more opportunity to learn from the sow about what, how and where to eat, we also discuss information transfer already before birth, perinatal flavour learning, and the merits of learning in an enriched environment. Being able to interact more with the sow is important to reduce the reluctance of piglets to eat novel foods, to increase preweaning solid food intake, and to reduce the development of damaging behaviours and increase play behaviour after weaning. Perinatal flavour learning reduced stress around weaning and increased postweaning performance and welfare. Preweaning enrichment of the environment, by providing substrates and a larger pen, can increase preweaning growth and development of feeding-related behaviours before weaning as well as food intake after weaning. Postweaning enrichment increased growth and play behaviour, and reduced the occurrence of diarrhoea and damaging behaviours. When enrichment is provided before weaning it is important to also provide enrichment after weaning. Learning from the sow and environmental enrichment are important for piglets to more easily adapt to being weaned. We conclude with recommendations for application of these results in current and future pig husbandry systems to improve welfare of newly weaned piglets.