Medicinal plants are considered as one of the most important sources of chemical compounds, so preparing a suitable culture media for medicinal plant growth is a critical factor. The present study is aimed to improve the caffeic acid derivatives and alkylamides percentages of Echinacea purpurea root extract by optimizing the NO3-/NH4 + ratio in new hydroponic culture media. Perlite particle size in the growing media was varied as very coarse perlite (more than 2 mm), coarse perlite (1.5-2 mm), medium perlite (1-1.5 mm), fine perlite (0.5-1 mm), and very fine perlite (less than 0.5 mm) with a mixture of peat moss at 50:50 v/v and 30:70 v/v peat moss to perlite ratios. Two NO3-/NH4 + ratios (90:10 and 70:30) were tested in each growing media. All phytochemical analyses were performed according to standard methods using high performance liquid chromatography (HPLC). It was found that the E. purpurea grown in the medium containing very fine-grade perlite with 50:50 v/v perlite to peat moss ratio had the maximum caffeic acid derivatives, including chicoric acid (17 mg/g DW), caftaric acid (6.3 mg/g DW), chlorogenic acid (0.93 mg/g DW), cynarin (0.84 mg/g DW), and echinacoside (0.73 mg/g DW), as well as, alkylamides (54.21%). The percentages of these phytochemical compounds increased by decreasing perlite particle size and increasing of NO3-/NH4 + ratio. The major alkylamide in the E. purpurea root extract was dodeca-2E, 4E, 8Z-10 (E/Z)-tetraenoic acid isobutylamide in all treatments, ranging from 31.12% to 54.21% of total dry weight. It can be concluded that optimizing hydroponic culture media and nutrient solution has significant effects on E. purpurea chemical compounds.