I spent last weekend setting up a LAMP server on an old PC. I used web-design-lab/learn/ at udemy as a guide. As well as the command line tutorial found on codecademy There was a lot of trial and error but I got there in the end.
A LAMP server is a web server with a Linux distro as its operating system (I used Ubunto server edition) Apache web server, MYSQL and PHP installed on it. I also installed an FTP server.
After I did that I installed another LAMP server this time as a virtual machine (I used Oracle VM VirtualBox) on my windows desktop. It seems to operate flawlessly, and is much more convenient for me to use as a web testing server.
Although I have some online web hosting, my LAMP setup will be useful for testing and I feel more confident with the command line than I used to be.