The biggest fire was a result of an earthquake in 1906 but only part of the city was destroyed.
San Francisco burned 7 times between the end of 1849 and the middle of 1851. The city was much smaller then so it is much more likely that the city burned down [completely] then.