Lignocellulosic biorefineries can produce numerous biofuels and chemicals via the anaerobic digestion process. Although several works have been recently conducted on this field, the technology is considered new and more research efforts are required towards industrialisation. In this work, wheat straw was digested after hydrolysis with dilute phosphoric acid. The substrate was biologically converted into carboxylic acids and biohydrogen at different OLRs (4.42-17.95 g COD/L.d). The semi-continuous experiments took place at 55 °C, both in reactors with free-cells or mixed free and membrane-encased cells, According to the results, the optimum biohydrogen, acetic and isobutyric acid yields were obtained at OLR of 4.42 g COD/L.d. Moreover, the highest lactic acid production was recorded at OLR of 9.33 g COD/L.d. Furthermore, a reactor containing both free and membrane-encased cells showed 60% higher lactic acid production (at OLR of 13.42 g COD/L.d) in comparison to the conventional free cell reactor. In addition, the production of acetic and isobutyric acid was greatly improved by a two-stage system. The use of both free and encased cells in a flexible membrane system along with the two-stage system for the optimisation of the process is the main novelty of this work.