ABSTRACT Solar flares will cause the change of the photospheric magnetic field and sunspot structure. However, the exact physical processes involved remain unclear. Here, we study the changes of photospheric magnetic field before and after an X1.5 flare caused by a circular filament eruption in the active region NOAA 13006. The magnetic field structure of this active region is a fan-spine structure with a circular polarity inversion line (PIL). We found that the sunspot structure contracted towards the PIL as a whole after the flare. The penumbra away from the PIL gradually disappears, and the umbra and penumbra near the PIL gradually enhances. By analysing the local magnetic field, the Lorentz force (LF), and the photospheric velocity field in these three regions, we find that the magnetic flux in the region of the disappearing penumbra converges and contracts towards the PIL, leading to an enhancement of the umbra, while the enhancement of the penumbra potentially indicates that this region may be the footpoint of a reconnected magnetic field system. We suggest that this contracting motion is driven by the horizontal LF.