In the late 18th century AD Welsh agriculture suffered because of the poor quality of the soil and also the absence and negligence of landlords. Most smallholders lacked the resources to invest and raising cattle and sheep were the main farming activities.
Food shortages resulting from the Napoleonic Wars led to agricultural improvements and better use began to be made of the upland commons. The ideas of the Agrarian (farming) Revolution gradually began to influence landowners. The Act of Enclosure in 1801 transformed the countryside and dispossessed many smallholders. Land which had previously been Common Land where people could let pigs or sheep forage and graze was turned into private land to be farmed for profit.
However, the growing urban markets of the mid-19th century meant that for some, farming was profitable once more. Improvements in transport, especially the railways, enabled farmers to get their produce quickly to the towns. As a result, many farmers invested in agricultural improvements like increased mechanisation, drainage and fencing.
By 1880, competition from abroad, especially America, brought about a severe agricultural depression. There was a massive population shift as many people left the land and moved to industrial areas, a movement which continued in the 20th century.

