Agriculture is a major industry in the U.S. commonwealth of Pennsylvania.  As of the most recent United States Census of Agriculture conducted in 2012, there were 59,309 farms in Pennsylvania, covering an area of 7,704,444 acres (3,117,878 hectares) with an average size of 130 acres (53 hectares) per farm.  Pennsylvania ranks first in the United States in Agaricus mushroom production (63.8% of U.S. sales volume during 2015–16),  fourth in apple production,  fourth in Christmas tree production,  fifth in dairy sales,  fifth in grape production, and seventh in winemaking. 
Historically, different geographic locations in Pennsylvania were centers for different forms of agricultural production, with fruit production occurring in the Adams County region, fruit and vegetables in the Lake Erie region, and potatoes in the Lehigh County region.  Modern agricultural production in Pennsylvania includes corn, wheat, oats, barley, sorghum, soybeans, tobacco, sunflowers, potatoes, and sweet potatoes. 
Since the founding of the commonwealth of Pennsylvania in 1682, agriculture has been a major part of the economy thereof, beginning with the Lenape and Monongahela Native American peoples. The former, occupying the Delaware Valley, primarily grew corn, while the latter grew beans, corn, and squash in the Upper Ohio Valley. German immigrants, upon settling in Lancaster County and York County in South Central Pennsylvania, continued the development of agriculture in the commonwealth. 
As the settlement period in Pennsylvania's history continued from the commonwealth's founding until about 1840, agriculture became part of rural living in the region as utilizing one's land as an income source became common practice among settlers after large-scale acquisition of land from Native Americans from 1682 until the addition of the remainder of modern-day Erie County in Northwestern Pennsylvania in 1792. Although settlement of the region continued throughout this period, it became slower during the French and Indian War and the American Revolutionary War, both in the second half of the 18th century, owing to political uncertainty during the period. 
Settlers from England largely controlled the Delaware Valley by 1674, although some settlers from the Netherlands and Sweden settled in the region. Several areas in present-day South Central and Southeastern Pennsylvania (including present-day Bucks County, Chester County, Lancaster County, Delaware County, and Philadelphia County) were home to European settlers by 1730. As the 18th century continued, settlers spread both northward and westward. Although formal marketplaces for agricultural goods were scarce during this period, settlers often exchanged goods, crops, labor, and other products to provide for themselves and their families. In addition to exchange with other farms, goods were traded in the global market, especially during the Napoleonic Wars in Europe, when demand for these goods increased significantly. With many roads suitable for shipping of goods only on a seasonal basis, the Susquehanna River and Allegheny River were often used to transport goods to more suitable routes for transport to the coast for trans- Atlantic shipping. 
The period of 1830–1850 saw the increased prominence of sheep-raising and wool production as a part of southwestern Pennsylvania agriculture (with Washington County leading the nation's counties in sheep production by 1860), as well as an assortment of other diverse crops across the commonwealth. The onset of the American Civil War in 1861 saw a spike in demand for wool-based products to supply the Union Army. Although sheep-raising was on the rise, livestock and mixed grain were still the base of the regional agricultural economy. Despite the surge of sheep-raising in southwestern Pennsylvania, its increasing prominence had halted and began to decrease by the beginning of the 20th century. 
In Pennsylvania, the second half of the 19th century saw the passage of agricultural legislation and the creation of governmental agencies pertaining to agriculture. The Pennsylvania Board of Agriculture was established in 1876 to provide oversight for scientific advances in the agriculture industry. Subsequently, in 1895, the Pennsylvania Department of Agriculture was created. The Department of Agriculture, as the Board of Agriculture's successor, assumed the roles of agricultural education, law enforcement, and disease control. Legislation passed by the Pennsylvania General Assembly during the period included the Commercial Fertilizer Law of 1879, the Butter and Cheese Act of 1883, and the Animal Disease Control Law of 1887. 
Industrialization during the late 19th century and early 20th century had a lasting effect on agriculture in Pennsylvania. Food production and packaging by companies including the H. J. Heinz Company based in Pittsburgh improved. Technological developments—including tractor-drawn implements, truck refrigeration, and the increasing availability of electricity—contributed to the evolution of techniques employed by Pennsylvania farmers. During the Great Depression, many Pennsylvania farmers were afflicted with financial hardship akin to much of the United States. Various aspects of President Franklin D. Roosevelt's agricultural programs passed as part of the New Deal (with the exception of the Agriculture Adjustment Act of 1933) were met primarily with support from farmers in Pennsylvania. Urbanization following World War II precipitated a decreased prominence of agriculture in Pennsylvania as many moved from farms and into cities in search of employment. In response, many farms employed migrant workers to compensate. The construction of the Interstate Highway System and development of once-rural areas during the mid-20th century contributed to a decreasing availability of land suitable for farming. Despite this, however, Pennsylvania's rural population remains one of the largest in the United States. 
Dairy farming is the largest agricultural industry in Pennsylvania. Farming is prominent in the rural areas of the commonwealth, the southeast in particular (including Berks County, Lancaster County, and York County). Nationally, Pennsylvania ranks fourth in both milk production and ice cream production. Edible mushrooms, fruits, vegetables, tobacco, maple sugar, and Christmas trees are all produced in Pennsylvania. Livestock raising, which comprises approximately 68% of commonwealth farm income, continues to be a major part of the Pennsylvania agriculture industry as well. Food production and packaging (including the H. J. Heinz Company) are also parts of the industry. 
|Crop||Farms Producing||Acres ( km2)||Volume|
|Corn for grain||16,800||998,376 (4,040.28)||125,500,345 bushels|
|Corn for silage or greenchop||9,752||412,695 (1,670.12)||7,205,366 tons|
|Wheat for grain||4,053||144,725 (585.68)||9,037,847 bushels|
|Oats for grain||4,524||65,158 (263.69)||3,802,765 bushels|
|Barley for grain||2,626||52,853 (213.89)||3,816,281 bushels|
|Sorghum for grain||75||2,170 (8.8)||165,396 bushels|
|Sorghum for silage or greenchop||510||9,475 (38.34)||106,654 tons|
|Soybeans for beans||7,718||519,718 (2,103.22)||25,008,038 bushels|
|Dry, edible beans (excluding Lima beans)||21||608 (2.46)||14,617 cwt|
|Tobacco||1,312||9,532 (38.57)||22,119,230 lbs|
|Sunflower seed||30||657 (2.66)||593,682 lbs|
|Vegetables (total, harvested for sale)||3,968||49,397 (199.90)||–|
|Sweet potatoes||93||50 (0.20)||–|
- "Agriculture in Pennsylvania". Pennsylvania Historical & Museum Commission. Archived from the original on 5 February 2013. Retrieved 12 December 2016.
- "Historical Highlights: 2012 and Earlier Census Years" (PDF). U.S. Agricultural Census. USDA. Retrieved 12 December 2016.
- "Agaricus Mushroom Value of Sales a Record High in Pennsylvania" (PDF). USDA National Agriculture Statistics Service. Retrieved 12 December 2016.
- "Apple Industry Statistics". United States Apple Association. Retrieved 12 December 2016.
- "Quick Tree Facts". National Christmas Tree Association. Retrieved 12 December 2016.
- "Dairy Cattle and Milk Production" (PDF). 2012 Census of Agriculture. USDA. Retrieved 12 December 2016.
- "About Pennsylvania Wine". Pennsylvania Wine & Wineries. Retrieved 12 December 2016.
- "Pennsylvania's Historic Agricultural Regions". Pennsylvania Historical & Museum Commission. Retrieved 12 December 2016.
- "Agriculture in the Settlement Period, c1700-1840" (PDF). Agricultural Resources of Pennsylvania, c1700-1960. National Park Service. Retrieved 12 December 2016.
- "Southwestern Pennsylvania Diversified Agriculture and Sheep Raising, c1840-1960" (PDF). Agricultural Resources of Pennsylvania, c1700-1960. National Park Service. Retrieved 23 January 2013.
|Wikimedia Commons has media related to Agriculture in Pennsylvania.|