After the siege, much of the city was devastated, but it was rebuilt with many of its Georgian style houses intact. The first bridge over the Foyle was built in 1790. The man responsible was Frederick Augustus Hervey, who was the 4th earl of Bristol and bishop of Derry at the time.
During the 18th and 19th centuries, many of the Irish emigrants wishing to sail to America used Derry's port. As a result, it was many of these emigrants who founded the colonies of Derry and Londonderry in New Hampshire.
Derry was thriving by the middle of the 19th century with a shirt and collar making industry resulting in many of Derry's old industrial buildings. Also at this time, Derry had become the point where four railways converged. When Magee College was incorporated into the Royal University of Ireland in 1880, it turned Derry into a university city.
In the early 1920s, during the Irish War of Independence, Derry suffered large amounts of sectarian violence, as a result of the guerrilla war between state forces and the IRA, along with other economic and social problems.
In 1920, several thousand unionist ex British Army servicemen began attempting to drive Catholics out of the jobs they had taken during World War I. This was followed by severe rioting, and an attack was launched on St. Columb's Cathedral by the loyalists, which was resisted by the IRA. Many were killed and many Catholics and Protestants were expelled from their homes.
In 1921, Derry became a border city as a result of the Anglo-Irish Treaty. This had an effect on the city's economy, because County Donegal, which provided Derry with business, had become part of the Irish Free State.
During World War II, the city played an important role in the Battle of the Atlantic with a large number of GIs disembarking there and a substantial presence from the British Navy.