

Open up your text editor, create a new php file and add the following to its contents and save it as ‘info.php’. You should now have an understanding of the root web directory and its relation to our localhost. Click on “home.html” and your HTML page will load. You should now see ‘home.html’ listed in your directory contents. If you are using XAMPP, your htdocs folder will be located in the XAMPP directory. Now, let’s place our ‘home.html’ file inside our root web directory of our localhost server ‘/Applications/MAMP/htdocs/’ and load up in your browser. Let’s create a new HTML file with the basic HTML5 structure, add some content and save the file as ‘home.html’. xml) that are placed in our ‘htdocs’ or root web directory will then be accessible via the localhost URL i.e. This ‘htdocs’ folder is magic this is the root web directory. So, we have our MAMP applications and a little folder titled ‘htdocs’. Let’s go back and open up our MAMP folder ‘/applications/MAMP/’ and take a bit more of a look inside. So now that we have seen our MAMP homepage and we can see that our servers are running- let’s locate our root web directory! So, basically is saying, “http to localhost via port 8888”. Notice the URL Note: If you are using XAMPP, the localhost url should just be Our MAMP local server, by default uses port 8888 for Apache and port 8889 for MySQL (for the purposes of this tutorial, we won’t be talking about MySQL server ports). Once the servers have loaded (lights turn green), our MAMP home page should load. If you are using XAMPP, you can select ‘Apache Web Server’ and click the ‘Start’ button. We can do this by clicking on ‘Start Servers’. If you are using XAMPP, you should see the Apache web server and MySQL servers under the ‘Manage Servers’ Application tab. On the left we have our server status- Apache and MySQL, these should currently be red, as we have not ‘started our servers’.

Navigate to the MAMP folder and launch ‘MAMP.app’ (don’t worry about MAMP pro).Īs you can see, its a fairly basic, easy to navigate application. We have our MAMP folder located in ‘/Applications/MAMP/’, this is where the good stuff is. Depending on your System Configuration, your localhost URL should be You would also be using the XAMPP control panel.
Give him 15 windows#
Windows and Linux users you should be able to follow along with the MAMP tutorial, your ‘htdocs’ directory should be located in the XAMPP Application directory. Today, I will be running through a default MAMP set-up. Once we have our installation set up we can start to set-up our localhost environment.
Give him 15 free#
If you are using a Mac, I recommend installing MAMP – Mac Apache MySQL and PHP (there is a free version available and is absolutely fine for our intents and purposes).
