It was founded in the 1840s by the land owner countess Yuliya Samoylova as Grafskaya Slavyanka (Гра́фская Славя́нка).
In 1846, it was purchased by the government and renamed Tsarskaya Slavyanka (Ца́рская Славя́нка).
Until 1918, it was also known as the settlement at the Rogers and Peiffer factory (посёлок при фабрике Роджерса и Пейффера).
In 1918, it was renamed Krasnaya Slavyanka.
In the beginning of the 20th century, it was a part of Tsarskoselsky Uyezd of St. Petersburg Governorate (renamed in 1913 Petrograd Governorate and in 1924 Leningrad Governorate).
On November 20, 1918, the uyezd was renamed Detskoselsky.
On February 14, 1923 Detskoselsky and Petergofsky Uyezds were abolished and merged into Gatchinsky Uyezd, with the administrative center located in Gatchina.
On February 14, 1923, Gatchina was renamed Trotsk and Gatchinsky Uyezd was renamed Trotsky Uyezd, after Leon Trotsky.

On August 1, 1927, the uyezds were abolished and Trotsky District, with the administrative center in the town of Trotsk, was established.
The governorates were also abolished and the district became a part of Leningrad Okrug of Leningrad Oblast.
The settlement was made a part of Trotsky District.
On August 2, 1929, after Trotsky was deported from Soviet Union, Trotsk was renamed Krasnogvardeysk and the district was renamed Krasnogvardeysky.
On July 23, 1930, the okrugs were abolished as well and the districts were directly subordinated to the oblast.
On January 28, 1944, Krasnogvardeysk was renamed Gatchina and the district was renamed Gatchinsky.

Kommunar was granted urban-type settlement status on October 8, 1953 and town status on June 28, 1993.
In 1996, the town held a popular vote regarding whether it should become a town of oblast significance.
However, in 2010 the administrative divisions of Leningrad Oblast were harmonized with its municipal divisions, and Kommunar became the town of district significance again.
It was founded in the 1840s by the land owner countess Yuliya Samoylova as Grafskaya Slavyanka (Гра́фская Славя́нка). In 1846, it was purchased by the government and renamed Tsarskaya Slavyanka (Ца́рская Славя́нка). Until 1918, it was also known as the settlement at the Rogers and Peiffer factory (посёлок при фабрике Роджерса и Пейффера). In 1918, it was renamed Krasnaya Slavyanka. In the beginning of the 20th century, it was a part of Tsarskoselsky Uyezd of St. Petersburg Governorate (renamed in 1913 Petrograd Governorate and in 1924 Leningrad Governorate). On November 20, 1918, the uyezd was renamed Detskoselsky. On February 14, 1923 Detskoselsky and Petergofsky Uyezds were abolished and merged into Gatchinsky Uyezd, with the administrative center located in Gatchina. On February 14, 1923, Gatchina was renamed Trotsk and Gatchinsky Uyezd was renamed Trotsky Uyezd, after Leon Trotsky.
On August 1, 1927, the uyezds were abolished and Trotsky District, with the administrative center in the town of Trotsk, was established. The governorates were also abolished and the district became a part of Leningrad Okrug of Leningrad Oblast. The settlement was made a part of Trotsky District. On August 2, 1929, after Trotsky was deported from Soviet Union, Trotsk was renamed Krasnogvardeysk and the district was renamed Krasnogvardeysky. On July 23, 1930, the okrugs were abolished as well and the districts were directly subordinated to the oblast. On January 28, 1944, Krasnogvardeysk was renamed Gatchina and the district was renamed Gatchinsky.
Kommunar was granted urban-type settlement status on October 8, 1953 and town status on June 28, 1993. In 1996, the town held a popular vote regarding whether it should become a town of oblast significance. However, in 2010 the administrative divisions of Leningrad Oblast were harmonized with its municipal divisions, and Kommunar became the town of district significance again.
Kommunar, Gatchinsky District, Leningrad Oblast