Minimal linear codes have significant applications in secret sharing schemes and secure two-party computation. Denote by \(w_{\min }\) and \(w_{\max }\) the minimum and maximum nonzero weights in a q-ary linear code \(\mathcal {C}\) , respectively. Compared to obtaining minimal linear codes by verifying the so-called Ashikhmin-Barg condition \( w_{\min }/w_{\max }>(q-1)/q\) , it is much harder to construct minimal q-ary linear codes violating the Ashikhmin-Barg condition and the latter ones are further called wide in the literature. This paper focuses on constructing wide minimal q-ary linear codes. We first propose general calculation formulas for weights of a generic class of q-ary linear codes and its alternative form, and derive sufficient conditions for such codes to be both minimal and wide. This serves a general method for constructing wide minimal q-ary linear codes. We then construct four classes of wide minimal q-ary linear codes and completely determine their weight distributions by specifically considering several simplicial complexes, sunflowers, and special functions in this general method. Moreover, the parameters of the obtained wide minimum q-ary linear codes are improved compared to some known ones.