In this research, Zn1−xMnxO (0⩽x⩽0.2) thin films were synthesized by sol–gel technique for ferromagnetic and paramagnetic responses at high and low temperatures. In this respect, the produced films were characterized through X-ray diffraction (XRD), scanning electron microscope (SEM), UV–vis spectrometer and superconducting quantum interference device (SQUID) magnetometer. Based on the characterizations and measurements, the influence of pH on the structural, optical and magnetic properties of a Zn1−xMnxO thin films was scrutinized in detail. The analyzed results indicate that the films possess a good crystal quality and homogeneous, smooth surfaces with a pure hexagonal zincsite syn structure of ZnO without any Mn based phases. By increasing the Mn content, the films exhibited increase or decrease in both the c-axis lattice constant and fundamental band gap energy depending on their respective pH. It is clear that the Zn1−xMnxO (x=0.02 and 0.05) thin films prepared at pH of 4.6 exhibited both a ferromagnetic at high temperatures (100, 200, and 300K) and a paramagnetic response at low temperature (5K), whilst Zn1−xMnxO (0.01⩽x⩽0.2) films prepared at pH value of 7.56 have paramagnetic behavior and antiferromagnetic contributions. The observed room temperature ferromagnetic behavior of the Zn1−xMnxO (x=0.02 and 0.05) thin films at pH of 4.6 may be related to the interaction between Mn doping and the oxygen vacancies, an oxygen-vacancy-stabilized metastable phase Mn2−xZnxO3−d or clustering of Mn ions.