1

I'm new to PHP and everything, so I'm trying to learn some things.

I'm currently developing my first PHP site in Dreamweaver using MAMP and Localhost.

I have already bought my domain name, and built a smaller html site just to act as a "holding site" before the PHP one gets put up. I'm wandering if instead of using localhost, that I could use a subdomain of that domain. So instead of going to localhost/mysite I could go to test.mysite.com.

Tell me if I'm wrong, but I shouldn't have to upload any files to GoDaddy because I'm using MAMP as the server. Right?

Keep in mind, this isn't permanent. I'm not planning on hosting my site on my computer using MAMP. I'm just wandering if it's possible and how to do it if it is.

Any suggestions, comments, or answers are greatly appreciated.

Thanks. - Ryan

Ryan Fitzgerald
  • 425
  • 4
  • 9
  • 20
  • you might want to set up a subdomain as a local vhost http://foundationphp.com/tutorials/vhosts_mamp.php – gherkins Feb 03 '13 at 16:33

2 Answers2

2

MAMP is not the server. MAMP adds server capabilities to your computer, but you can't use MAMP to mimmic any server.

What I recommend you is working on your computer, with MAMP and using localhost as the "test address". After the page is finished in your localhost, and everything work fine, you can upload your page to your server (with FTP). This way you avoid having to upload your files via FTP every time you make a change in your code.

And welcome to the PHP World. Countless mugs of coffee and restless night await you.

  • Thank you for this answer. That's exactly what I was looking for. I will continue using localhost. I just wanted to see if it was posible. Thanks again! – Ryan Fitzgerald Feb 03 '13 at 16:49
0

You can create some folder on web server(on your paying hosting) and upload all files from your test localhost folder. Everyting would work perfectly if you type: https://yourwebsite.domain/yourfolder. If you want to set it to view like http://yourfolder.yourwebsite.domain you must from Control Panel set up an some subdomain. Subdomain is make something like this: you enter name of subdomain and folder which is mapped to that subdomain. For example, you set up subdoman http://test.web.com and map that to http://web.com/testfolder.

I hoppe that I help you.

mrakodol
  • 1,143
  • 3
  • 12
  • 41
  • I probably should have said that I didn't necessarily code the html site. To build the smaller site, I used something a little easier. I used Weebly to build the small html site to act as the "holding site." So, I don't have access to adding folders to that site. I will have to use a subdomain, because instead of uploading the site to www.mysite.com I would be uploading it to test.mysite.com. I hope I'm making sense. – Ryan Fitzgerald Feb 03 '13 at 16:41