Career
His law firm moved to Louisville in 1852. He was elected to the city council in 1855 and 1857. His firm dissolved when he was elected Circuit Court judge in 1857.
On May 14, 1857 Riley was elected by the council to fill the position of mayor after William South. Pilcher fell too ill to continue on.
Pilcher died on August 14 of that year and Riley served until April 2, 1859. After his term expired, he returned to practicing law from 1865 to 1870.
He died in Bullitt County, Kentucky in 1872.