Using MAMP with Flux
The abbreviation "MAMP" stands for: Macintosh, Apache, Mysql and PHP. You can read a lot more about MAMP here.
Launch MAMP
First, launch MAMP by simply double clicking it's icon.
Step 1
Make sure both the Apache and the MySQL server are both running, they should both have green dots next to them. If there are red dots, press the 'Start Servers' button to start them.
Step 2
Now the servers are running, we can start creating pages in Flux.
Check where the MAMP 'document root' is set, it's usually
/Applications/MAMP/htdocs
You can check in the
Preferences section of MAMP, under the
Apache tab.
Step 3
Now, drag the 'document root' folder to the Flux icon to open it as a website.
You can now edit this web site like any other site in Flux.
To make sure MAMP is working correctly, create an
index.html file, and add an object to it, just so you will recongnize it when seeing it again.
Step 4
Usually when using Flux, you could switch to
Preview mode to see the page, and although this will still work, you won't be seeing it with a server environment, which would defeat the point of using MAMP.
To see it within the server environment, we need to setup a 'Custom Preview URL', this is done from
Live Preview pop up menu.
Once you have setup the custom preview URL, it will be available from the
Live Preview pop up menu.
Done!
Now, when you preview your page using this technique, any database access, or PHP will run withing the MAMP environment, giving you the correct result!
Check your Preferences
You might want to enable the 'Support content before <HTML> tags', as often PHP pages need to have code outside the usual HTML area.