Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fig

macrumors 6502a
Original poster
Jun 13, 2012
916
84
Austin, TX
Ok devs, I've been generally setting up my WordPress sites on the server then redeploying them to the ACTUAL server when the site goes live and...yeah, that's just a terrible way to do it.

From my looking around and a discussion or two on here it sounds like installing MAMP on my home machine and developing there is the best way to go, unless there's some better options I don't know about? Any recommendations or advice greatly appreciated, thanks.
 

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
What kind of recommendations are you looking for? If you know how to setup a linux server for deploying MySQL/PHP applications, then MAMP is going to be very easy.

General advice. Use GIT to manage your local codebase so that when you want to deploy, all you have to do is push to the actual server.
 

fig

macrumors 6502a
Original poster
Jun 13, 2012
916
84
Austin, TX
Thanks, and as I don't know the first thing about setting up a server I'm looking for whatever sort of advice I can get.

I'm a designer with some minimal backend skills (a bit of jQuery and php manipulation with WordPress) so anything server related is pretty new to me, I do one-click installs for my typical WordPress sites. From what I've found in some searching MAMP or something similar is my best option for hosting my WordPress site on my box for development, but that pretty much sums up my knowledge on the subject :)
 

onerob

macrumors newbie
Mar 25, 2010
12
9
It does the job and is easy to use but I'm getting annoyed by having to type in my admin password every time I start or stop the servers.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA

onerob

macrumors newbie
Mar 25, 2010
12
9
I prefer to use port 80, so I've adapted some of the code from the link above and cobbled together this applescript which launches the MAMP app and then starts Apache and MySQL. If the script is run again after MAMP has been loaded, it stops the server and quits the app.

For my use I've exported it from the AppleScript editor as an application.

You must also have used Keychain Access to add an item named MAMP to the login keychain with your admin username and password, as mentioned in the article.

Code:
set theUserName to do shell script ("security  find-generic-password -gl MAMP | grep \"acct\" | cut -c 19-99 | sed 's/\"//g'")
set thePassword to do shell script ("security 2>&1 >/dev/null find-generic-password -gl MAMP | cut -c 11-99 | sed 's/\"//g'")

tell application "System Events"
	if (exists (process "MAMP")) then
		
		do shell script "/Applications/MAMP/bin/stopApache.sh &" password thePassword user name theUserName with administrator privileges
		do shell script "/Applications/MAMP/bin/stopMysql.sh > /dev/null 2>&1"
		
		tell application "MAMP" to quit
		
	else
		
		tell application "MAMP" to activate
		set frontmost of process "MAMP" to true
		
		do shell script "/Applications/MAMP/bin/startApache.sh &" password thePassword user name theUserName with administrator privileges
		do shell script "/Applications/MAMP/bin/startMysql.sh > /dev/null 2>&1"
		
	end if
end tell
 

iPaintCode

macrumors regular
Jun 24, 2012
142
38
Metro Detroit
I prefer using homebrew for my local dev for PHP5.4, MySQL5.6.1 and a few other handful of awesome tool. I just use Apples built in Apache as it does what I need. The one GUI I do use is called VirtualHostX, but that's mostly due to hating to deal with my vhost and host files.

You can use VHX with mamp to if that is your preference. Far as WP local I'd recommend setting up a vhost as dealing with http://localhost/~User will cause issues at some. The other app I use when dealing with MySQL is Sequel Pro. Good luck!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.