I am processing some organic wastes with bacteria and yeasts I want to stop the fermentation after I get the end product, can I depend only on PH, or boiling or add some chemical to stop fermenation to preserve the final product for months.
It all depends on the physico-chemical characteristics of your molecules of interest.
If I understand you carry out solid fermentation, therefore, you can "stop" the fermentation by modifying the pH (pay attention also to the impact of the pH on your molecule of interest but also you risk weakening the microbial walls thus releasing other molecules that you will have to eliminate later). The temperature is another factor also with the same remarks as for the pH.
But if you want my own opinion, I will focus on the first stage of purification in order to recover, in part, your molecule of interest if it is extracellular via solvents for example or salting out. If your molecule is intracellular you will have to consider weakening the membranes of your micro-organisms via physical, mechanical or chemical processes such as solvent, pH, or detergents.