I have used a few localhost server pre setup packages over the years, currently using XAMPP for MAC. This is installed and used to have your very own web server on your computer. I have enjoyed using it for the past few months, mainly for PHP and MySQL lessons.
- Decently easy to setup
- Works from a central homepage with links to phpmyadmin etc.
- Updated with new versions of php and other environments often.
- Its free to use, honestly I feel guilty using it at times since someone is taking to time to set it all up I generally like to support people with a real like aka $money.
- Privacy of your development, wont need to code on live server exposing potential issues.
- Updating to new version is old school, backup files then databases, uninstall old version (on a mac it leaves settings files in ~/Library so be aware just removing app isn’t a full uninstall), download and install new version. Reason I mention the settings files remaining is say you make some changes to your server and get confused you might just try to remove the app and once you re install it may still have those modified settings you made before. I use a app (App Cleaner and Uninstaller) to make it quick myself plus it has other features I like, fully removes the settings too.
- Some default settings may need changing for your own needs, these are buried deep in some folders in a config file and require searching for. Confusing for new users but can be found in file etc/extra/httpd-xampp.conf. When you first install XAMPP you might get a “Access Forbidden” when clicking on PphMyAdmin, you can configure the file mentioned above. Check this link out for help, just needs a simple edit.
Once you have it setup you just launch the main xampp app, in tabs above start your service, start php/mysql, mount the directory to access files in /htdocs (this is the web directory aka /localhost). You will create files in this directory (website.php etc.) to use php for instance. Just installing this app wont make any website.php file work in your browser, you must load files from within the servers htdocs directory. I make a directory for each test site then bookmark the main directory aka http://192.168.65.8/mysite1/ if no index.php/.html is placed inside by default you will get a directory listing of all your files in site folder, which is useful when making lots of new files or for lessons.
To launch the site the launcher app will show a generated ip like 192.168.65.8 that stays the same for each install, you can use that for the web address in your computers browser like http://192.168.65.8/directoryOfSite/ otherwise the ip by itself is just the /localhost or /htdocs directory. You can also enable (Network/localhost:8080) in the xampp app to use http://localhost:8080/ but I find that weird and use the ip. It has more features in the launcher app too, like using the “terminal” to issue direct commands.
Overall I love XAMPP and definitely recommend it for web developers to use on local computer.