Skip to content

Instantly share code, notes, and snippets.

@raamdev
raamdev / nginx-mamp-macports.txt
Last active February 24, 2023 08:02
These are the steps to get Nginx running alongside MAMP on a Mac.
# These steps will get nginx installed on your Mac for local development and
# testing purposes, to be used alongside MAMP (which already includes Apache).
# The following steps assume that you're running MAMP and that you already
# have php-cgi in /Applications/MAMP/bin/php/php5.4.10/bin/php-cgi.
# The start-nginx and stop-nginx scripts created at the end do not
# start or stop MySQL because it is assumed that you normally run MAMP
# with Apache + MySQL turned on and that you occasionally want to switch
# your web server to Nginx for testing purposes and that you leave MySQL running.
# This process was tested successfully on OS X 10.9.
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => '5'
'no_found_rows' => true, // turn off pagination information
'update_post_meta_cache' => false // don't do anything with post meta cache
);