The most favourite candidate to explain visible photoluminescence (PL) of porous silicon (PS) is quantum confinement. It has been shown theoretically that decreasing size of silicon particles leads to the widening of the gap (physical confinement). According to calculations, red luminescence requires particle sizes that are too small to be directly observed in PS. On the other hand, chemical effects, other than etching, seem to affect the PL frequency. These effects indicate similarities to the PL of siloxene which is due to isolation of Si 6 rings by oxygen atoms (chemical confinement). Using self-consistent semi-empirical calculations, we have shown that the observed correlation between shift of the PL and Raman bands in PS can only be explained by chemical effects. Therefore, we suggest a surface recombination model of PL in PS, where the emission is determined primarily by physical confinement in features with nanometer dimensions on the surface of microcrystallites, while chemical substitutions tune the PL into the red. Empirical tight binding calculations on such particles show quantitative agreement with observed PL energies.