tar -czf yourfile.tar.gz .
The . dot is the crucial part, normally many will use * and that will exclude hidden files by default which is very undesirable as many hidden files are important such as .htaccess and conf files in your home directory etc.. It seems the default behavior of tar should be the opposite but these are all very old tools.
tar, solutiontar, czf, yourfile, gz, dot, crucial, exclude, default, undesirable, htaccess, conf, directory, etc,