Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Setup Your Local Development Environment

i think XAMPP better and FREE, why i can use MAMP

my question is why i can use MAMP , i love XAMPP

9 Answers

XAMPP is available for Windows, Linux, and Mac. I have used it on Windows and Linux and like it. I have not used MAMP, but one student was trying MAMP and had problems. They installed XAMPP and it worked fine. But many other students use MAMP also.

Alena Holligan
STAFF
Alena Holligan
Treehouse Teacher

First off, if you already have a dev environment or prefer one way over the other, by all means use that. This workshop is meant to provide beginners with a simple means to run their PHP sites directly on their machines.

Second, thank you all for chiming in and sharing what works well for you. YOU are what make our community awesome! :)

I spent quite a bit of time when considering what to show people since there are many great options that may be a better choice depending on your personal need. The goal of this workshop is to get complete beginners up and running as soon as possible so they can learn PHP without having to learn anything else first. Here are some things I considered when deciding what to use:

  1. if you're on a Mac, setting up a local dev environment directly on your machine is fairly strait forward, PHP and Apache are install right out of the box, so you just may want to upgrade those. Then that just leaves a database like MySQL which isn't too tough to install. There are some easy to follow tutorials online if you just do a google search. This CAN BE a good option for the speed, as it CAN have the smallest impact on your computer. Windows on the other hand.... I just wont go there :) a few things to think about
    • It's not as easy for beginners and you'll have quite a bit of command line work to do.
    • If you don't actually shut down apache and mysql, you're actually bogging down your computer ALL THE TIME instead of when you want to test out your site.
    • If you mess something up, it's not easy to revert. With MAMP, you just delete the folder (or uninstall MAMP Pro) and you're done. The support is what really makes this hard for us to justify at Treehouse.
  2. There are quite a few *AMP packages available for both Windows and Mac, including Bitnami which is similar to xampp and I would choose it over xampp specifically for being able to test out PHP 7 and HHVM, so if that interests you, please check out bitnami.
  3. If you're going to work for a large company they will probably have some sort of virtual image for you to use that matches their production environment. This is probably done using something like docker or vagrant. This is more complicated and more to learn just to get started with PHP (we don't cover git until the end of the PHP track). However, it does NOT have to be HARD, as Lewis Cowles points out, and since this IS something that can help you in your career, we will probably cover this at some point either as a workshop, blog post or both. You can also test PHP 7 and HHVM with this option as well! WIN!

Some of the main reasons I chose MAMP

  1. MAMP itself is free and you can easily use it without having to upgrade to Pro.
  2. With MAMP Pro you can access everything in one place, including:
    • Setting up virtual hosts
    • Switching to multiple versions of PHP for testing. This can be extremely helpful when testing out an upgrade or new server, or testing things like WordPress plugins on multiple versions. But it can also get complicated, buggy and easily messed up.

I hope this helps to clarify things a little bit for you. Here at Treehouse we work hard to give you the best experience we can, so thank you for your feedback and stay tuned for more :) For now, like I said before, feel free to use whatever system works for you, just PLEASE TEST YOUR CODE BEFORE YOU DEPLOY TO PRODUCTION :)

Lewis Cowles
Lewis Cowles
74,902 Points

Here at Treehouse we work hard to give you the best experience we can, so thank you for your feedback and stay tuned for more :)

As a student I appreciate it, and would personally like to say thanks!

Is there a way off-forums, not on twitter, to directly feed back to the team in a less public way?

i was first use bitnami next falling love XAMPP its was recommend lynda.com teacher , thank you for share your experience

Alena Holligan
Alena Holligan
Treehouse Teacher

There are many options for contacting the team, a couple of the best include:

  1. Many of the courses will have follow up emails and you can simply reply to those.
  2. Contact support, and they can make sure you're feedback gets sent to the appropriate team member https://teamtreehouse.com/support
Kevin Korte
Kevin Korte
28,109 Points

My .02 echo's Ted's. I'm patiently waiting for treehouse to start getting more in depth advanced courses. I think for the majority of users, Virtualbox and Vagrant may be over most people's head. I know Virtualbox and Vagrant are skimmed over in the Laravel course, but I wish it would go into more advanced config, what each is actually doing, and advanced troubleshooting techniques.

Those courses would take treehouse to another level.

Lewis Cowles, I certainly see your point, but I think it is also important to remember where most students start, myself included. Most have little experience with programming. So Treehouse starts with the very basics. When I reached the point where I wanted a local environment, it was because I needed something that ran PHP well. I did not care about anything else. Later I cared about MySQL. XAMPP does that well, even if it is a simple solution. The problem I developed was only with the latest release for XAMPP where they changed the dashboard for Localhost. My solution is above. I was actually happy that I was able to 'hack' their page on my local environment and add what I wanted. It was a good test of what I have learned.

I think I would have been put off with learning Vagrant when I really just wanted to test my PHP and MySQL codes. I would have had to install VirtualBox, then Vagrant. Then I have to configure Vagrant at least one time. Only then could I think about my project. And for every project, I have to configure Vagrant at the beginning (I think). I don't have to do that with XAMPP. If it is on, then I am good to go. So while it may be a simple, maybe antiquated solution, it seems there are more places for beginners to go wrong. Now that I am more advanced, I may check out Vagrant, but XAMPP still works perfectly well for me.

Some courses on these more advanced environments may be a good thing.

You don't have to use MAMP specifically, or even XAMPP really. I believe XAMPP is OS independent while MAMP is OSX only, correct me if I'm wrong - I believe it was simply a recommendation on their end, but even more so why not use the natively pre installed systems in place for your development?

Jason Anders
Jason Anders
Treehouse Moderator 145,623 Points

Correct. MAMP is Mac specific and XAMPP is Windows specific.

Kevin Korte
Kevin Korte
28,109 Points

Actually, MAMP was Mac specific, but now if you check out their page, they have an Windows version of MAMP. Just a friendly update.

Jason Anders
Jason Anders
Treehouse Moderator 145,623 Points

Thanks Kevin :)

I wasn't aware... I guess both are now available for both.

Kevin Korte
Kevin Korte
28,109 Points

Yeah, I don't know when that happened. But it did...lol :)

Kevin Korte
Kevin Korte
28,109 Points

You can use either. I use XAMPP on Windows and MAMP on my MBP. I have no reason, it's just what I originally set up. My interaction with both of these software programs is so small, and they both work, I don't really care which one I use.

Lewis Cowles
Lewis Cowles
74,902 Points

You can also use Apache, or NginX directly with MariaDB, or MySQL, and PHP at any version you like; but if we are going to nit-pick, my main problem with this video, is that this is not using Vagrant, or similar modern-solution that requires virtualization of the tech-stack, and may have been setup by Ops to allow you a consistent environment between dev, staging and production; rather than risking having options, extensions configured differently.

In life diversity is awesome, in technology, we need to reduce potential for change, so we can spend our time more effectively avoiding troubleshooting. MAMP and XAMPP are both incredibly amateur solutions to these problems, and represent being tied into a brand, rather than learning the technologies behind their flimsy front-end.

Lewis Cowles
Lewis Cowles
74,902 Points

Sorry Kevin Korte and Ted Sumner; but downloading XAMPP, is equally as hard as downloading two windows installers where you click next until they are done. Okay so maybe you reboot your machine and type a few shell commands; again I'm not bashing the video, I was responding to earlier questions over the tech stack used; that I would consider spinning up Vagrant is easier than XAMPP / MAMP, especially as the boxes for LAMP are plentiful, and cater to more diverse use-cases.

Your use of down votes is interesting in this context. I had never considered using them when it was a matter of opinion. While I don't think you are considering my opinion, i will not down vote your posts because there is validity in them even if I disagree.

My personal experience with XAMPP was easy. When I look at the instructions for Vagrant, it looks more complicated. It is certainly more steps. At the time I first installed XAMPP I was interested in getting it up quickly to continue with my PHP education.

Now, I would be interested in looking at Vagrant. As I am now using Linux Mint on my computers and have a virtual box installed on my desktop, I have to disagree with the setup effort for install. It may not be too much more, but it is more.

Then you have to set up every project at the beginning of the project. At some point you have to install a box. That box has to be configured. Now that you have installed Vagrant, set up the project, set up the box (maybe only one time, but there appear to be different boxes, so you have to pick the right one), you can use vagrant up.

These steps are not unreasonable, but I would not have wanted to do all of that when I first installed XAMPP. I was working had to understand PHP and really didn't want to have to add learning that to the process.

At this point, I will agree to disagree with your opinion because of the target audience.

Kevin Korte
Kevin Korte
28,109 Points

And I'll agree with Ted on all points made. Having used both, I can not agree Vagrant is as easy as XAMPP for beginners

Lewis Cowles
Lewis Cowles
74,902 Points

It's clear many people still have a lot to learn about vagrant work-flow, and it's complexity for the use case of "Setup your local development environment".

I would say that reading the docs, although admirable is a long way round to get to know tooling; which as developers, you would not be expected to learn the intricacies of, as you are a developer; not ops, not architect!

If I were suggesting a course in learning vagrant in it's entirety; versus getting a working knowledge of using VM's to provide a standard development basis, then I could see your point, but to expand my comments in this way is unfair, does not show good-faith, and is one of the reasons, I believe merits the down-voting, along with the mis-information and the way this was conducted...

I Know that in small companies, for freelancers, Ops, dev, account handling, billing, etc, can often be slammed into one-thing; or put on one person, but they are not, and should not be. There are very well written books, podcasts and blog-posts about why developers should not be performing ops and dev, as there is a clear need for separation, but I also know it's not something that has been at the forefront of everyone's work-flow, but it is, and should be now; even for the new people.

As a developer, you would only be expected to

  • Install the tools (vagrant, virtualbox, git). Git you should have anyway!
  • Git clone a repo, which would have the vagrantfile pre-filled, mapping of synced folders setup
  • vagrant up (start the machine)
  • vagrant halt ( stop the machine )

That's it! There is no switching documents folders, checking apache is running, mysql is running, playing with config files. You would benefit from using git (great for work-flow), and you can spin up more than one LAMP instance, all on one machine without port conflicts, learning vagrant, or MAMP, or XAMPP.

Even if you don't have an ops department, or like treehouse are just teaching people who are new, and may not know much hashicorp has this search utility, and here is one for LAMP specifically provide these boxes, and they are as reliable as MAMP, who have a commercial agenda, and XAMPP, EasyPHP, many others that have been doing this for some time.

I hope this answers any questions anyone might have, but to be honest, I'm not interested in discussing this any further, the information is here, and I feel better than anyone that wants to read it can...

Kevin Korte
Kevin Korte
28,109 Points

Lewis, I'm also not working for an argument, and I can agree with everything you just said in your reply. I just can't get over the idea that this might all be too much at once for someone new.

MAMP, WAMP, and XAMPP are of course GUI applications. They are familiar, they install in a familiar way to someone new to web development but not a computer.

CLI tools like vagrant, git, etc are far more intimating when new. They are a part of my work flow today, but I wouldn't touch them 2-3 years ago. I wouldn't have had the courage to fire up the command line

That's my only hangup. Other than that, a fantastic response.

I've also been happy with XAMPP. It runs nicely in Visual Studio Code the PHP Server extension.

Alena Holligan
Alena Holligan
Treehouse Teacher

XAMPP is also a good choice :)