Blog

Use Mac OSX Inbuilt PHP Web Server

Sometimes, you need to have a local PHP web server available for previewing your project. Of course, you could use MAMP therefore, but most of the time (when you do not need .htaccess rules for example) it is sufficient to use the local PHP web server, which is inbuilt in Mac OSX.

Here are the simple steps to do that.

1. Export Project

Export your whole project to a local folder of your choice. This could be a folder on your desktop, or a subfolder in your documents folder. I am using always a Sites folder in my users home directory.

Export

Export

2. Start PHP Server

2) Open terminal and enter there php -S localhost:8080 -t ~/Sites. This will tell the inbuilt PHP functionality to start a server under localhost:8080, and the document root will be /Users/your username/Sites. ~ (Alt + n) is a shortcut for your home directory.

PHP Server

3. Open Browser

3) Open a browser and navigate to http://localhost:8080. That's all, you should see your project.

Browser

Back
< Previous Post
Next Post >
inStacks Software

The place for innovative Stacks for RapidWeaver, which are focusing on integration and effectiveness.
All Stacks require RapidWeaver 8 from RealMac Software and the Stacks 4 Plugin from YourHead.

Imprint
Privacy Policy
Contact
Twitter
BlocsAddons / Volt CMS

© Futural UG (haftungsbeschränkt)

Wir benutzen Cookies / We use cookies. Info: Datenschutzerklärung / Privacy Policy