(*) If you are using version 8.x or newer, please set the authentication method of your database so it uses the MySQL native password. The default method (caching_sha2_password) will not work. Thanks to user jellevdbos for pointing this out.
If possible, make sure to have php configured with:
memory_limit set to 128M or more
post_max_size set to 128M or more
If files fail to upload, even small ones, try adding these lines to your config file (includes/sys.config.php) at the top.