In this work, we study the topological phases of the dimerized square lattice in the presence of an external magnetic field. The dimerization pattern in the lattices hopping amplitudes can induce a series of bulk energy gap openings in the Hofstadter spectrum at certain fractional fillings, giving rise to various topological phases. In particular, we show that at $frac{1}{2}$-filling the topological quadrupole insulator phase with a quadrupole moment quantized to $frac{e}{2}$ and associated corner-localized mid-gap states exists in certain parameter regime for all magnetic fluxes. At $frac{1}{4}$ filling, the system can host obstructed atomic limit phases or Chern insulator phases. For those configurations gapped at fillings below $frac{1}{4}$, the system is in Chern insulator phases of various non-vanishing Chern numbers. Across the phase diagram, both bulk-obstructed and boundary-obstructed topological phase transitions exist in this model.