This work was undertaken to provide a new potent route for wastewater treatment by developing a hybrid photocatalyst from waste rice straw. On this basis, rice straw-based SiO2 was utilized as a platform to synthesize a ternary β-Ga2O3-TiO2-SiO2 nanocomposite with type-I heterojunction band alignment using the mechanochemical method. The categorical factorial design was employed to optimize the synergistic effect between adsorption and photocatalytic performance of the nanocomposite towards removing p-nitrophenol (PNP) from wastewater under various experimental conditions. The optimization results indicated the negligible impact of catalyst dose (Xc) and total dissolved solids (XTDS) on the photocatalysis with the increase of pre-adsorption time (Xads) from 60 to 180 min. In contrast, the adsorption/photocatalytic performance of ꞵ-Ga2O3-TiO2-SiO2 was found to be dependent on the solution pH (XpH, with a percentage contribution (PC) of 26.1 %) due to its effect on the photocatalyst surface charge and the dissociation process of PNP molecules. At optimum conditions (Xc = 4.0 g/L, XpH = 6.0, XTDS = 1000 mg/L, and Xads = 180 min), the β-Ga2O3-TiO2-SiO2 exhibited high efficiency to degrade 92.4 ± 3.8 % and 68.65 ± 4.3 % of PNP (25 mg/L) after 120 min UV and visible irradiation, with kinetic rates (k) of 0.62 and 0.53 mg/(g.min), respectively. This improved performance was due to the synergism between (i) the high adsorption of PNP (k = 0.017 mg/(g.min)) on SiO2 and (ii) the effective separation of photogenerated charges between ꞵ-Ga2O3 and TiO2. The high-performance stability (up to 3 cycles) of β-Ga2O3-TiO2-SiO2 was also demonstrated towards UV/visible-induced photodegradation of organic contaminants in real petrochemical wastewater.