I use XAMPP heavily on Windows. It’s my primary development environment because XAMPP is easy to use and cheaper then using dedicated hosting for testing sites and blogs. I don’t need anything to do a lot of heavy lifting and XAMPP handles everything I throw at it. Is XAMPP on Mac OS X? I was about to find out.
Recently I received a new MacBook for Christmas and I wanted to move all of my develpment stuff over to Mac OS X. I am going to keep my Windows system as my gaming machine, since I love computer gaming. It’s a hobby, and doesn’t take up as much time as it did years ago, but I want to move my “professional hobby” to my Mac and keep the Windows XP system as my gaming rig since it was built for that purpose.
I digress.
I started looking for solutions on how to run Apache and MySQL on OSX. There are plenty of articles out on the Internet to do so but I didn’t want to run Apache natively. Not really any particular reason, I just didn’t want to install it as a daemon.
First I ran across MAMP, which looked good, but they want you to PAY for MAMP Pro. No thanks. I’d rather not fork over money when I can save it for food.
XAMPP On Mac OS X
I decided to check if XAMPP works on OSX and it does! Yes, yes, my precious, it does. I downloaded the .dmg for XAMPP on Mac OSX and proceeded to mount the image and run the install. In minutes I was up and running. I copied my web folder over for my latest development WordPress blog, edited the wp-config.php file and fired up the install.php page.
Boom. Error. Gnashing of teeth, I hacked at it for a few minutes and realized that when I copied the files I didn’t do it as “nobody” of the “admin” group.
If you have this problem, simply go to the directory that has incorrect permissions and use the “chown” command to change the owner.
> chown -R nobody:admin “/Applications/xampp/xamppfiles/htdocs/website_folder”
Now, that issue was quickly fixed but when I would access the install.php URL (http://sitename/wp-admin/install.php) I still could not connect. I searched for hours, reviewed the configuration in phpMyAdmin and got really frustrated. I took an afternoon to think.
After looking at it again, I realized that it was properly database permissions still, so I fired up phpMyAdmin again and looked. The user account for the database was allowed to connect from “%” which is a wildcard in MySQL that means any host can connect with the user ID. On a whim I changed this to “localhost” and it worked like a champ. I changed it back to “%” and failed.
Now maybe this is a bug, but I verified my Windows XAMPP load and it was setup using “%” for all of the test databases. I’m chalking this up to a “feature” on Mac OSX for now. Other than those issues, I’ve had no problems running XAMPP on OS X. It works great.







{ 2 comments… read them below or add one }
Hello Jason,
I’d like to know if you had encountered an issue preventing you from seeing any page besides the home one while running locally a previsously existing wordpress. I’m experiencing it and have no clue as how to solve it :/ Any idea ? Thanks !
Sure. Most likely your issue is permalinks. You’ll need to check your .htaccess file in your web docs directory and ensure it has something similar to the following:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]