We study high order harmonics generation (HHG) in crystalline silicon and diamond subjected to near and mid-infrared laser pulses. We employ time-dependent density functional theory and solve the time-dependent Kohn-Sham equation in the single-cell geometry. We demonstrate that clear and clean HHG spectra can be generated with careful selection of the pulse duration. In addition, we implement dephasing effects through a displacement of atomic positions in a silicon large super-cell prepared by a molecular dynamics simulation. We compare our results with the previous calculations by Floss et al.