Remember 4 points:
* Correct C:N ratio - 25:1 to 30:1 (The C:N ratio can be adjusted by mixing together organic materials with suitable contents. )
* Correct moisture: (Plants have a liquid rather than a solid diet and therefore the compost pile should be kept moist at all times. On the other hand, a wet compost pile will produce only a soggy, smelly mess. )
* Sufficient oxygen. (A compost pile should be turned often to allow all parts of the pile to receive oxygen.)
* The optimum pH level of the compost is between 5.5 and 8.
For commercial composting, it is better to use compost turner machine for turning piles:
http://organicfertilizermachine.com/product-category/product/compost-turner