Commercial mushroom production is a tightly controlled, indoor farming process that bears almost no resemblance to foraging in a forest. The most widely grown species, the white button mushroom, moves through a sequence of composting, pasteurization, inoculation, and carefully managed fruiting inside climate-controlled rooms, with the entire cycle from raw materials to first harvest taking roughly six to eight weeks. Other species like oyster mushrooms and shiitake follow related but distinct paths, and the industry is increasingly shaped by automation, food safety regulation, and the push to turn waste streams into inputs.
Building the Substrate
Everything starts with the growing medium, called the substrate. For button mushrooms, the base is typically a mix of wheat straw and animal manure, though corn straw and other crop residues are also used. Growers blend these raw materials with nitrogen supplements and a mineral addite called gypsum, then pile the mixture into long heaps or bunkers to begin composting. Gypsum plays a surprisingly specific chemical role: its sulfate ions react with ammonia in the pile to form ammonium sulfate, which stabilizes nitrogen and prevents it from escaping as gas.1PubMed Central. Nitrogen balance and supply in Australasian mushroom composts Without gypsum, the compost pile runs hotter and more alkaline, releasing more ammonia, which changes the severity of the breakdown process and can affect downstream yields.2PLoS ONE. Potential of a gypsum-free composting process of wheat straw for mushroom production
This initial composting stage, known in the industry as Phase I, is a thermophilic process. In a typical setup, the blended materials sit in a semi-open bunker with aeration trays underneath, composting for about 11 days and getting turned several times to ensure even breakdown.3Environmental Technology & Innovation. Microbial community succession patterns and assembly mechanisms in the white button mushroom (Agaricus bisporus) production with corn straw-based compost The goal is not sterilization but selective decomposition: beneficial microbes break down raw plant fibers into a form the mushroom mycelium can digest, while the heat kills off weed seeds and many competing organisms.
Pasteurization and Conditioning
After Phase I, the compost moves into a sealed tunnel for Phase II, where things get more precise. The material is heated to around 56 °C and held there for about eight hours, pasteurizing it to knock out remaining pathogens and pests without killing all microbial life.3Environmental Technology & Innovation. Microbial community succession patterns and assembly mechanisms in the white button mushroom (Agaricus bisporus) production with corn straw-based compost After that peak-heat step, the temperature is gradually lowered to around 45 °C for a conditioning period. During conditioning, beneficial thermophilic microorganisms convert residual ammonia into microbial protein, making the compost both less toxic to mushroom mycelium and more nutritious for it. The ammonia level at the end of Phase II is a key quality indicator: if it stays too high, the spawn will struggle to colonize.
Oyster mushrooms and other wood-loving species often skip this elaborate composting process entirely. Their substrates are typically straw, sawdust, or agricultural waste that gets pasteurized directly, either by soaking in hot water or by steam treatment. A comparison of methods found that hot water pasteurization produced fresh yields comparable to full autoclave sterilization while using far less energy, and that hot air pasteurization used roughly 75 percent less energy than autoclaving.4Journal of Microbiology, Biotechnology and Food Sciences. Evaluation of different pasteurization and sterilization methods for oyster mushroom substrates This matters for smaller-scale and tropical operations where expensive autoclaves are impractical.
Spawning and Colonization
Once the substrate has cooled to a safe temperature, it is inoculated with spawn, which is grain (usually rye or millet) that has been pre-colonized with the desired mushroom strain. The spawn gets mixed throughout the compost thoroughly. For button mushrooms, this happens in trays or shelves inside growing rooms. For oyster mushrooms, the inoculated substrate is usually packed into perforated plastic bags or bottles.
The colonization period, often called the spawn run, typically lasts two to three weeks. During this time, the mycelium threads its way through the substrate, secreting enzymes that break down cellulose and lignin for nutrition. Growers keep the rooms warm, dark, and humid, with carbon dioxide levels allowed to remain relatively high. The mycelium actually produces CO₂ as it grows, and moderate CO₂ concentrations discourage premature fruiting. Temperature, humidity, and CO₂ all need monitoring throughout this stage. Systems developed for this purpose track these three variables continuously and adjust ventilation and heating automatically.5Indonesian Journal of Electrical Engineering and Computer Science. Internet of Things based Smart Environmental Monitoring for Mushroom Cultivation
The Casing Layer and What Triggers Fruiting
For button mushrooms, the fully colonized compost gets topped with a layer of casing material, usually a blend of peat and limestone. This casing layer does not feed the mushroom; instead, it provides a moist, low-nutrient environment at the surface that triggers the switch from vegetative growth to fruit body formation. The mechanism behind this trigger involves bacteria living in the casing. Research using electron microscopy has shown that bacteria attach to mushroom hyphae in the casing with filament-like structures, and this physical interaction appears to be important for stimulating the formation of tiny mushroom initials called pinheads.6PubMed Central. Scanning Electron Microscope Studies of Interactions between Agaricus bisporus (Lang) Sing Hyphae and Bacteria in Casing Soil
The bacterial community in the casing changes as production progresses. Certain genera that dominate early on give way to others that become more abundant in later cropping stages, and the later community has been found to correlate positively with yield.7PubMed Central. Influence of the casing layer on the specific volatile compounds and microorganisms by Agaricus bisporus This means the casing is not just a passive physical layer but a living microbial ecosystem that actively shapes how the crop develops. Growers who skimp on casing quality or reuse degraded peat tend to see poorer results.
Oyster mushrooms and shiitake typically do not use a casing layer. Instead, fruiting is triggered by environmental shifts: a drop in temperature, an increase in fresh air (lowering CO₂), exposure to light, and sometimes a cold shock. The specifics vary by species, but the principle is the same: the mycelium interprets changed conditions as a signal that it should reproduce.
The Fruiting Room
Once pinheads appear on button mushroom beds, the growing room environment shifts to favor fruit body development. Temperatures drop to roughly 16–18 °C, fresh air exchange increases to bring CO₂ down, and humidity stays high, typically above 85 percent, to prevent the tiny mushrooms from drying out. This is where commercial growing diverges most sharply from backyard hobbyist attempts: industrial operations use sophisticated HVAC systems, computer-controlled louvers, and banks of sensors to maintain these conditions uniformly across rooms that may hold dozens of shelves stacked several layers high.
Energy costs are a real concern. A study of an industrial-scale button mushroom plant found that producing 25,000 kilograms of mushrooms in a single cycle consumed about 5,483 kilowatt-hours of electricity, with cooling accounting for the vast majority of that energy and heating a much smaller fraction.8Journal of Agricultural Engineering. Evaluation of energy requirements of an industrial scale plant for the cultivation of white button mushroom (Agaricus bisporus) That translates to roughly 0.22 kWh per kilogram of mushrooms. Electric power is one of the biggest recurring expenses in mushroom farming, and facilities that can optimize airflow patterns and insulation stand to save significantly.
Harvesting in Flushes
Mushrooms do not ripen all at once. Instead, they emerge in waves called flushes, usually three to five over the life of a crop, with each flush producing fewer mushrooms than the one before. Research has shown that flushing appears to be driven by the depletion of some specific nutrient required by developing primordia: once outgrowing mushrooms use up this resource, the next wave of pinheads cannot start developing until the mycelium replenishes it.9PubMed. Development and growth of fruit bodies and crops of the button mushroom, Agaricus bisporus Picking mushrooms at a smaller size removes competition among developing fruit bodies sooner, which yields more individual mushrooms per flush, though not necessarily more total weight.
Between flushes, growers often “ruffle” the casing layer, which means lightly scratching or disturbing it. This reduces mycelium density at the surface and improves gas exchange, helping to sustain yield in later flushes. This technique becomes especially important for the third and fourth flushes, when productivity naturally declines.10Scientific Reports. Optimization of cultivation techniques improves the agronomic behavior of Agaricus subrufescens Most commercial button mushroom operations harvest by hand, since machine picking can bruise the delicate caps. Workers pick mushrooms by gently twisting and pulling, then trimming the stem base before placing them in punnets.
Robotic Harvesting
Hand harvesting is labor-intensive and represents one of the biggest costs in mushroom production. Automation has been slow to arrive because mushrooms grow at varying heights, in clusters, and bruise easily. But recent advances are changing that. A robotic harvesting system using a bio-inspired gripper and computer vision has demonstrated a picking accuracy of about 99 percent in field tests, with a mushroom damage rate under 3.2 percent and an average throughput of roughly 21 kilograms per hour, which matches the speed of one human worker.11Computers and Electronics in Agriculture. Mushroom (Agaricus bisporus) picking robot based on mimicry of manual harvesting The system uses AI-based image recognition to locate each mushroom, measure its size, and position the gripper within one centimeter of accuracy. The robot can navigate between shelves and reach beds at different heights, tackling one of the main mechanical challenges of multi-tier growing rooms.
This technology is not yet widespread, but the economics are favorable. Labor shortages and rising wages in countries with large mushroom industries have made the business case for automation increasingly strong, and several commercial trials are underway.
Food Safety on the Farm
Mushrooms are a ready-to-eat product for many consumers, and the warm, humid growing environment creates conditions where bacterial pathogens can persist if sanitation lapses. Listeria monocytogenes is the pathogen of greatest concern. In button mushroom production, the pasteurization step in Phase II effectively kills Listeria in the substrate, but recontamination occurs downstream. One study found that while none of the post-pasteurization substrate samples contained the pathogen, 40 percent of samples from the next processing stage tested positive, and the casing production facility showed a 31 percent positive rate.12PubMed Central. Effectiveness of current hygiene practices on minimization of Listeria monocytogenes in different mushroom production‐related environments Floor swabs taken after disinfection still tested positive at significant rates, suggesting the organism can establish persistent reservoirs in growing facilities.
A similar pattern has been documented in enoki mushroom production, where the fungus-scraping stage, when spent mycelium is removed from growing bottles before re-use, was identified as the primary contamination point. Blender blades and cutting knives at that stage harbored identical bacterial strains, indicating cross-contamination from equipment surfaces to finished product.13PubMed. Contamination pathways of Listeria monocytogenes in Enoki mushrooms and their production environment at a commercial farm in South Korea These findings underscore why modern mushroom farms invest heavily in facility design, with segregated clean and dirty zones, positive air pressure in packing areas, and frequent sanitation of all contact surfaces.
Post-Harvest Shelf Life
Fresh mushrooms deteriorate quickly once picked. Without intervention, they begin browning, losing moisture, softening in texture, and developing off-flavors within days. The industry relies on rapid cooling immediately after harvest, typically to around 2 °C, to slow enzymatic browning and microbial growth. Modified atmosphere packaging, which adjusts the ratio of oxygen and carbon dioxide inside the sealed container, can extend retail shelf life further. Newer approaches under investigation include pulsed electric fields, pulsed light treatments, and electrolyzed water rinses, all aimed at reducing surface microbial loads without leaving chemical residues.13PubMed. Contamination pathways of Listeria monocytogenes in Enoki mushrooms and their production environment at a commercial farm in South Korea The challenge is balancing pathogen reduction with maintaining the mushroom’s appearance, since consumers judge freshness by cap color more than almost any other cue.
Boosting Vitamin D Through UV Exposure
One increasingly common post-harvest step has nothing to do with preservation. Mushrooms contain ergosterol, a compound in their cell membranes that converts to vitamin D₂ when exposed to ultraviolet light, in essentially the same way human skin makes vitamin D₃ from sunlight. Commercially, growers expose harvested mushrooms to UV-B lamps or brief sunlight to generate meaningful amounts of vitamin D₂.14PubMed Central. A Review of Mushrooms as a Potential Source of Dietary Vitamin D The effect can be dramatic: untreated button mushrooms contain negligible vitamin D, while UV-B-treated mushrooms reached concentrations of about 410 micrograms per 100 grams on a dry-weight basis, comparable to sunlight-exposed mushrooms at around 374 micrograms per 100 grams.15PubMed. Vitamin D mushrooms: comparison of the composition of button mushrooms (Agaricus bisporus) treated postharvest with UVB light or sunlight
The treatment affects only the vitamin D content; no significant changes occur in vitamin C, B vitamins, amino acids, fatty acids, or other nutritional components. Slicing the mushrooms before UV exposure increases the surface area and raises the yield of vitamin D₂ further. The vitamin D₂ produced this way is reasonably stable through cooking but drops by about half after a week of refrigerated storage.16LWT. Optimizing the production of vitamin D in white button mushrooms (Agaricus bisporus) using ultraviolet radiation and measurement of its stability In several countries, UV-treated mushrooms are now sold with vitamin D claims on the packaging, making them one of the very few non-animal, non-fortified food sources of this nutrient.
Alternative Substrates and Waste Inputs
The traditional substrate recipe of wheat straw and horse or poultry manure works well, but straw prices fluctuate and supply can be regional. This has driven interest in using a wider range of agricultural and food-industry by-products. Rice husks, corn stover, coffee husks, spent brewery grains, and even food scraps have all been trialed as partial or complete substitutes.17Journal of Advances in Biology & Biotechnology. Sustainable Substrates for Mushroom Production: A Review For oyster mushrooms, which are less fussy about substrate composition than button mushrooms, wheat straw is increasingly being replaced by materials from the agro-cereal and nut-fruit waste streams.18Sustainability. Food Waste Originated Material as an Alternative Substrate Used for the Cultivation of Oyster Mushroom (Pleurotus ostreatus): A Review
The appeal goes beyond cost savings. Using waste materials for mushroom production converts low-value organic matter into high-quality protein-rich food, while simultaneously diverting that waste from landfill or open burning. Mushroom farming is one of the few agricultural sectors that can genuinely claim to upcycle waste at industrial scale.
What Happens to Spent Substrate
After the final flush is harvested, the exhausted compost, called spent mushroom substrate, still contains useful organic matter. Globally, mushroom production generates millions of tonnes of this material every year, and disposing of it used to be a headache. It turns out to be a good soil amendment. Because it is rich in nutrients and generally free of heavy metals and synthetic chemicals, spent substrate can be applied directly to agricultural land or composted further. Studies have documented improvements in soil structure and fertility, increased crop yields, and potential for restoring degraded or barren land.19PubMed Central. Spent substrate from mushroom cultivation: exploitation potential toward various applications and value-added products One particularly interesting application involves the residual enzyme activity in the spent material: mushroom species that produce lignin-degrading enzymes leave behind substrate with laccase and manganese peroxidase activity, which can break down certain soil pollutants including polycyclic aromatic hydrocarbons.
More recently, researchers have developed ways to process spent substrate into liquid organic fertilizer containing amino acids and microelements, which can improve both the nutrient content and microbial diversity of rhizosphere soil when applied to crops.20Journal of Cleaner Production. Novel liquid organic fertilizer: A potential way to effectively recycle spent mushroom substrate This closes the loop in a satisfying way: agricultural waste becomes mushroom substrate, which becomes fertilizer for the next round of crops.
How Different Species Change the Process
The description above is anchored in button mushroom production because it dominates global commercial volume, but other species diverge at almost every step. Oyster mushrooms grow on simpler substrates, colonize faster, tolerate a wider temperature range, and fruit aggressively in response to fresh air and light. They are among the easiest mushrooms to cultivate commercially, which is why they are often the species of choice in tropical countries and smaller-scale operations. Their substrates are typically pasteurized rather than composted, and no casing layer is needed.
Shiitake production traditionally relied on natural hardwood logs, which were inoculated with spawn and left outdoors for months to colonize. Modern commercial shiitake farming has largely moved to synthetic log cultivation, where sawdust supplemented with wheat bran or rice bran is packed into bags, sterilized, inoculated, and grown in controlled environments. The cycle is much faster than natural-log cultivation, but the process requires strict aseptic technique because the sterilized sawdust substrate is vulnerable to contamination by molds. King oyster mushrooms, lion’s mane, and enoki follow yet another pattern, typically grown in bottles on sterilized grain-and-sawdust mixtures inside highly automated factory environments common in East Asia, where entire facilities may produce tens of thousands of bottles per day with minimal human handling.
These differences mean there is no single answer to “how are mushrooms grown commercially.” The core principles overlap: prepare a suitable growing medium, inoculate it, give the mycelium time to colonize, then manipulate the environment to trigger fruiting. But the details of substrate, temperature, sterility requirements, and harvest method vary enough that expertise in one species does not automatically transfer to another. A button mushroom farmer visiting an enoki factory would recognize the broad strokes and very little else.