Farmville is a town in Prince Edward and Cumberland counties in the Commonwealth of Virginia. The population was 7,473 at the 2020 census. It is the county seat of Prince Edward County.
 Farmville developed near the headwaters of the Appomattox River in central Virginia; the waterway was long its main transportation access to other markets.  In the 19th century, a railroad was constructed here. Since the late 20th century, the former railway has been converted to the High Bridge Trail State Park, a more than 30-mile-long (48 km) rail trail park.  US 15, VA 45 and US 460 now intersect at Farmville. The town is the home of Longwood University and is the town nearest to Hampden–Sydney College.
 Near the headwaters of the Appomattox River, the town of Farmville was formed in 1798 and incorporated in 1912.
 Between 1795 and 1890, Farmville was the end of the line for the Upper Appomattox Canal Navigation System, built to improve navigation on the river. Enslaved African Americans built the canal system that allowed commodity crops of tobacco and farm produce to be loaded on a James River bateau in Farmville and shipped to Petersburg, Virginia.  The canals were used until railroads were constructed in this area.
 Many of the boatmen who worked near Farmville were free people of color. They lived in the Israel Hill community. Israel Hill was home to both White people and free African-American laborers, craftsmen, and farmers freed from the end of the Revolutionary War to around 1810. People of African and European descent worked for the same wages, built a church together, and could have resort to the court of law within the 350-acre town.
 John Flournoy was the first to mine coal near Farmville.  He started in 1833 working on a seam, which was two feet thick. In 1837 the General Assembly granted a charter to The Prince Edward Coal Mining Company to mine and sell coal. This company was still in operation into the 1880s.
 Another coal pit in the 1880s was worked on the W.W. Jackson property. The coal from this small pit was used to fuel his blacksmith shop on the same property." The coal deposits are part of the Farmville Basin, one of the Eastern North America Rift Basins west of modern-day, Virginia State Route 45.
 In the 1850s, the Southside Railroad from Petersburg to Lynchburg was built through Farmville.  The route, which was subsidized by a contribution from Farmville, required an expensive crossing of the Appomattox River slightly downstream, which became known as the High Bridge. This became the Atlantic, Mississippi and Ohio Railroad in 1870; the Norfolk and Western Railway took it over, and now the line is part of the Norfolk Southern Railway.
 The bridge and the rail line from Burkville to Pamplin City was converted by Virginia Department of Parks and Recreation into High Bridge Trail State Park, based on a rail to trail project.
 The Virginia General Assembly chartered the Piedmont Coal Company for John Dalby in 1860. The mine was near Buckingham Plank Road, Virginia State Route 600 in Cumberland, a mile and a half west of Raines Tavern, Virginia.
 Without rail transportation close to Raines Tavern, the transportation cost of getting the coal to Farmville and then by rail to Richmond was too high to sell it at a competitive price. The coal was sold locally to people in the area for heating their homes.
 During the American Civil War, the mines continued to operate but then production fell off.  Coal was still there, though, Daddow and Bannon documented seven or eight coal seams and anthracite in 1866.
 Confederate General Robert E. Lee retreated through Farmville as he escaped the Union Army.  Farmville was the object of the Confederate Army's desperate push to get rations to feed its soldiers near the end of the American Civil War. The rations had originally been destined for Danville, but an alert quartermaster ordered the train back to Farmville. Despite an advance of the cavalry commanded by Fitzhugh Lee, the Confederate Army was checked by the arrival of Union cavalry commanded by Gen. Philip Sheridan and two divisions of infantry. General Robert E. Lee's Army of Northern Virginia found itself soon surrounded. He surrendered at Appomattox Court House on April 9, 1865.
 The Prince Edward county seat was moved from Worsham to Farmville in 1871.
 The Independent Order of Odd Fellows Cemetery, also known as the Odd Fellows Cemetery, is in Farmville, Virginia. Several prominent state legislators and civil rights advocates who were African American are buried in the cemetery. The cemetery also has approximately 31 headstones from World War I.
 There was a brick-making industry in Farmville, using the clay of the Farmville Basin.  In 1874, M.R. Murkland built a kiln for his hand-formed bricks. He made around 600,000 bricks each year. The Triassic clay of the Farmville Basin was mixable and plastic enough and would not shrink too much, which made it suitable for bricks.
 Rail Transport from Cumberland County helped Cumberland farmers sell fruits, vegetables and timber to Farmville markets.  From 1884 to 1917, the Farmville and Powhatan Railroad, later named the Tidewater and Western Railroad, was important to Cumberland County residents for markets and transportation and the telegraph.  The owners hoped that the line could ship products all the way to the end of the line in Chester, Virginia and docks in the Tidewater region to  make the railroad profitable.  The line had trouble competing with the Standard gauge Southside Railroad.
 It was rumored that the coal near Farmville would draw the Orange & Keysville Railway which was chartered, graded and the right of way was purchased, between Farmville and Hampden Sydney.  However, the rails were never laid down.  The coal field was idle until 1891 when the Farmville Coal and Iron Company began leasing land, selling stock and reopened the Piedmont mines. The company built a one and a half mile spur rail line from the Farmville and Powhatan Railroad to the mine. This railroad provided transport from the mine to the docks at Bermuda Hundred in the Tidewater region. On Jan. 24, 1891, an editor of “The Financial Mining Record” suggested that the Farmville Coal & Iron Company, did not have enough coal production to justify a fraction of its stock price.  The Norfolk and Western Railway, since 1883, had been bringing in coal from a new coal mine.  The Pocahontas Coalfield which could provide coal more cheaply and ship the coal on a larger standard gauge, class one railroad.  This decreased to the economic viability of mining coal in the Richmond and Farmville Basins. The Farmville Coal and Iron Company went bankrupt a few years later, possibly before any coal was mined.
 The Farmville Coal & Iron Company did bring positive change.  They requested that the town build an electric power plant and a waterworks.  Designation of the power plant was established in 1890 and the water works were designated in 1893.
 Farmville Lithia Springs bottled and sold mineral water from Farmville from 1884 to 1901. The lithia springs were considered as a possible destination for tourists but the investors decided to bottle the water and ship it. The water was tested and found to be superior to waters from Carlsbad, Germany. Lithia Springs Water from Farmville was shipped domestically and internationally for water cure. The springs were just north of the Appomattox River from Farmville.
 Lithia Springs water contained the following minerals naturally occurring in the water.
 In 1897, economic conditions were different for African-Americans, and white people in Farmville.  Even though there were twice as many black people as white people, white people owned ten times the value of real estate. Without land or inherited wealth, black people found it difficult to get established.  There were black shop keepers, bricklayers, tobacco workers, the shop keepers got money to buy their stores as laborers in New York. Many black men left to go north to make money leaving women behind.  Among the black community, Israel Hill Hamlet was more stable, than other places because they owned their land.
 Farmville and Prince Edward County Public Schools were the source of Davis v. County School Board of Prince Edward County (1952–54), a case incorporated into Brown v. Board of Education (1954), the landmark case that overturned school segregation in the United States. Among the cases consolidated into the Brown decision, the Davis case was the only one involving student protests.
 R.R. Moton High School, an all-black school in Farmville named for Robert Russa Moton, suffered from terrible conditions due to underfunding by white officials in the segregated state. The school did not have a gymnasium, cafeteria, or teachers' restrooms. Teachers and students did not have desks or blackboards, and due to overcrowding, some students had to take classes in a school bus parked outside. The school's requests for additional funds were denied by the all-white school board. Students had protested against the poor conditions.
 As a result of the Brown decision, in 1959 the Board of Supervisors for Prince Edward County refused to appropriate any funds for the County School Board; in massive resistance, it effectively closed all public schools rather than integrate them. Wealthy white students usually attended all-white private schools (segregation academies) that formed in response. Black and poorer white students had to go to school elsewhere or forgo their education altogether. Prince Edward County's public schools remained closed for ten years. When they finally reopened, the system was fully integrated.
 Prince Edward Academy was the longest-surviving of the segregation academies, still teaching students in 2019.  Although technically integrated at that point, the school had few students of color. Prince Edward Academy was renamed the Fuqua School in honor of J. B. Fuqua, a wealthy businessman who was raised nearby and who has endowed the school.
 The former R.R. Moton High School building was designated as a National Historic Landmark in 1998 for its significance to the Civil Rights Movement. It houses the Robert Russa Moton Museum, a center for the study of civil rights in education. In 2015, Longwood University and Moton Museum entered into a formal affiliation to advance understanding of the history of the struggle for civil rights.
 The First Baptist Church, Farmville Historic District, Longwood House, Robert Russa Moton High School, Sayler's Creek Battlefield, and Worsham High School are listed on the National Register of Historic Places.
 Farmville made headlines in September 2015 after being selected by the Commission on Presidential Debates to host the 2016 vice-presidential debate. The debate was held at Longwood University on October 4, 2016.
 The town is crossed by the High Bridge Trail State Park which extends 4 miles (6 km) east to the historic High Bridge.
 Farmville is located in northern Prince Edward County, with the town center situated south of the Appomattox River. A portion of the town extends north across the river into Cumberland County.
 According to the United States Census Bureau, the town covers a total area of 7.3 square miles (19.0 km2), of which 7.2 square miles (18.7 km2) is land and 0.12 square miles (0.3 km2), or 1.77%, is water.
 Farmville is located between Petersburg and Lynchburg on U.S. Route 460. Petersburg is 67 miles (108 km) to the east, and Lynchburg is 48 miles (77 km) to the west.
 The climate in this area is characterized by hot, humid summers and generally mild to cool winters.  According to the Köppen Climate Classification system, Farmville has a humid subtropical climate, abbreviated "Cfa" on climate maps.
 As of the census of 2010, there were 8,216 people, 2,634 households, and 1,162 families residing in the town. The population density was 1,140.3 people per square mile (x379.2/km2). There were 2,885 housing units at an average density of x329.3 per square mile (x127.1/km2). The racial makeup of the town was 72.3% White, 23.8% African American, 0.4% Native American, 1.2% Asian, 0.1% Pacific Islander, 0.6% from other races, and 1.5% from two or more races. Hispanic or Latino of any race were 2.3% of the population.
 There were 2,634 households, out of which 19.7% had children under the age of 18 living with them, 26.0% were married couples living together, 3.5% had a male householder with no wife present, 14.6% had a female householder with no husband present, and 55.9% were non-families. 49.2% of all households were made up of individuals, and 26.9% had someone living alone who was 65 years of age or older. The average household size was 2.18 and the average family size was 2.90.
 The age distribution, strongly influenced by the presence of Longwood University, is: 12.9% under the age of 18, 46.1% from 18 to 24, 14.9% from 25 to 44, 14.1% from 45 to 64, and 11.9% who were 65 years of age or older. The median age was 22 years. For every 100 females there were 68.9 males. For every 100 females age 18 and over, there were 64.9 males.
 The median income for a household in the town was $26,343, and the median income for a family was $33,000. Males had a median income of $30,974 versus $20,764 for females. The per capita income for the town was $13,552. About 19.9% of families and 22.0% of the population were below the poverty line, including 25.8% of those under age 18 and 11.7% of those age 65 or over.
 Since 2016 there has been an Amish community living in the Farmville area. Just three years after its founding it had already two church districts. These Amish come from the Lancaster Amish settlement in Pennsylvania and its daughter settlements and thus belong to the Lancaster Amish affiliation. In 2020 there were 195 Amish living there.
 The Heart of Virginia Festival happens in Farmville the first weekend in May and has grown every year since it was established in 1978. "Heart of Virginia" refers to Farmville's location in the central part of the state. (The actual geographic center of the state is 20 miles (32 km) north at the intersection of Route 24 and 60 outside of Dillwyn in Buckingham County). The festival includes all the traditional fare and concludes with a fireworks show at the Farmville airport.
 First Fridays, held on the first Friday of every month from May to September, features bands and family events at Riverside Park.
 Services include the Farmville Police Department, Prince Edward County Sheriff's Office, and Longwood University Police Department. The Virginia State Police also has a strong presence in the town of Farmville. Piedmont Regional Jail, serving a six-county area, is located in Farmville.
 The Farmville Volunteer Fire Department is designated as Company 1 in Prince Edward County after being the first fire department established in the county in 1870. The FFD provides services to nearly 10,000 people in their first due, which comprises the entire town of Farmville, and into the immediately surrounding area of Prince Edward County, Buckingham County, and Cumberland County.
 Firefighting apparatus include an engine, ladder truck, and a rescue-squad. The department's fleet also contains an Emergency Medical Services quick response pick-up truck, and a support pick-up truck, along with a hazmat, decontamination, and spill/leak supply trailer.
 Farmville's water and sewer services are publicly owned and operated by the Town of Farmville work crew. The town's water treatment plant draws its water supplies from the Appomattox River. Water from the river is treated to kill any waterborne pathogens. After that process all sedimentation is removed through a series of filtration tanks. The water plant sells a portion of this removed sedimentation to be mixed with topsoil and then to be made ready for farm use. The excess sedimentation is recycled back into the Appomattox. The water plant can store 200,000 gallons of fresh water which can be transferred to Farmville's water towers when needed. Currently Farmville averages 1 million gallons of water usage per day, and its water plant is capable of producing up to 3 million gallons. The water is used by the majority of the town and the Prince Edward schools.
 The town of Farmville is located within the Piedmont Region and has many tributaries which filter into the Appomattox River. After the water reaches the Appomattox River it drains into the James River and then is distributed into the Chesapeake Bay. Within Farmville there are several different areas which are a concern due to high amounts of heterotrophic bacteria and Escherichia coli, classified as coliform bacteria they live within the intestines of warm blooded animals. The strain of E. coli which is of most concern is the 0157 H7 strain because it can produce dehydration, vomiting, diarrhea, and in extreme cases even death. There are a couple of drains which are located within Farmville and its neighboring counties which are of concern, including Gross Creek, which usually exceeds the standards of the Environmental Protection Agency (EPA).
 The wastewater plant covers a more extensive area which includes all residents of Farmville, Prince Edward schools, Hampden Sydney and north to the Cumberland County Court area. The plant treats approximately 1.7 million gallons a day and is capable of handling 2.4 million gallons. The wastewater undergoes an extensive treatment process based on parameters set by the Virginia Department of Environmental Quality before being released back into the Appomattox River downstream of Farmville. All residents of Farmville are required to use the public sewage line. The only exception is granted to residents who have been using a private septic system prior to being annexed to the town. Both the water plant and the water treatment plant undergo a consumer confidence test every spring and have never received any violations. Contamination levels in the town's waterways are currently being checked bimonthly to monitor the water quality of creeks and streams leaving Farmville. Tests are conducted to see if the town's water pipes are leaching any pollutants into the environment and to detect any other sources of contamination. The information from test results is available at the Virginia DEQ website.