We measure the real-space galaxy power spectrum on large scales at redshifts 0.5–1.2 using optical colour selected samples from the Canada–France–Hawaii Telescope Legacy Survey. With the redshift distributions measured with a preliminary ∼14 000 spectroscopic redshifts from the VIMOS Public Extragalactic Redshift Survey (VIPERS), we deproject the angular distribution and directly estimate the three-dimensional power spectrum. We use a maximum likelihood estimator that is optimal for a Gaussian random field giving well-defined window functions and error estimates. This measurement presents an initial look at the large-scale structure field probed by the VIPERS. We measure the galaxy bias of the VIPERS-like sample to be bg= 1.38 ± 0.05 (σ8= 0.8) on scales k < 0.2 h Mpc−1 averaged over 0.5 < z < 1.2. We further investigate three photometric redshift slices, and marginalizing over the bias factors while keeping other Λ cold dark matter parameters fixed, we find the matter density Ωm= 0.30 ± 0.06.