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. [arXiv:1705.10707] [Phys. Rev. A 97, 011401(R) (2018)] on Diamond at 800 nm and by Tancogne-Dejean et al. [arXiv:1609.09298] [Phys. Rev. Lett. 118, 087403 (2017)] on Si at 2000 nm.