The photoelectrocatalytic technology has attracted significant attention for effectively eliminating organic matter and microbiological pollutants in the environment, owing to its remarkable efficiency and low power consumption. The major goal of this research is to develop and determine the optimal conditions that will facilitate the photoelectrocatalytic technique's enhancement of E. coli eradication. The WO3/BiVO4 photoanode was fabricated on a conductive glass substrate using the automatic dip coating process, employing a layer-by-layer deposition method. Subsequently, the WO3/BiVO4 photoanode was calcinated at 550 °C for 60 minutes. The produced WO3/BiVO4 electrodes were employed as working electrodes to investigate and determine the optimal parameters for enhancing the eradication of E. coli process. The primary factors investigated in this study were the concentration of KCl electrolyte solution and the applied potential. These parameters were examined to identify the best circumstances that would result in the highest efficiency for the degradation of E. coli in a photoelectrochemical system. The study also aimed to comprehend the catalytic mechanism implicated in eliminating E. coli by implementing three different processes: photocatalysis, electrocatalysis, and photoelectrocatalysis. We discovered that the key factors directly influencing E. coli eradication effectiveness under the photoelectrocatalytic process were applied potential and electrolyte solution concentration. The optimum conditions eliminated 99.99% of E. coli in 150 minutes with an initial concentration of 106 CFU/ml, an electrolyte concentration of 0.01 M KCl, and an applied potential of 2.0 V. The study confirmed photoelectrocatalytic cells' efficacy in removing microorganisms and recommended their application in a wider range of wastewater treatment systems.