
Explaining the Dynamic Virtual Host definition Save ( Control+O) and exit ( Control+X) the nano editor. VirtualDocumentRoot "/usr/local/var/www/%-2+/public_html" # Dynamic virtual hosts for local development Options Indexes MultiViews FollowSymLinks I’ve decided to use /usr/local/var/Add the following block: # Custom configuration for local dev environment Next, add your own dynamic virtual host definition to the file.

prefix each line with #) or delete the two example virtual host definitions. This file is populated by default with a couple of example virtual host definitions: blocks beginning with and ending with. Now edit that file: sudo nano /private/etc/apache2/extra/nf In the previous step we referenced a nf file in nf.Ĭreate a backup of the original file: sudo cp /private/etc/apache2/extra/nf /private/etc/apache2/extra/-dev-env

Open nf using a text editor such as nano: sudo nano /etc/apache2/nfĮach of the following lines are found at different locations within the file. Backup nfįirst, make a backup copy of apache’s nf file: sudo cp /etc/apache2/nf /etc/apache2/-dev-env Apache configurationĪpple’s default configuration requires several changes to create a suitable development environment. MacOS Sierra and beyond should be running apache 2.4+ and PHP 7+. Pre-checksĬonfirm your system’s apache version with the command apachectl -v, and its PHP version with the command php -v. This brings its own configuration and deployment challenges that may introduce unnecessary effort if Docker doesn’t play a greater role in a given project.
#XAMPP FOR MAC SIERRA DOWNLOAD FULL#
It’s often a better idea to reserve VM tools for better-suited applications.Ī lighter-weight alternative to full VM’s is container virtualization such as with Docker.

However, spinning up an entire virtual server with its own CPU, RAM and disk allocation simply to run WordPress is a huge tax on system resources. Tools such as Vagrant are great and extremely useful for more complex projects where customized server configuration(s) are required. They double up what’s already on your Mac but do have some features that you might find appealing.
#XAMPP FOR MAC SIERRA DOWNLOAD FREE#
Self-contained solutions for running a LAMP environment on a Mac can be found in products like MAMP and the free XAMPP. This guide covers configuring them to support WordPress, as well as installing other dependencies such as mysql/mariadb, and useful tools like sequel-pro and wp-cli. This is a high-performance option for running projects locally on a Mac and is useful for PHP and WordPress development.Īt the end of this guide, you will be able to create new folders within a special virtual hosts directory such as ‘/’ with the sub-folder ‘public_html/’ and the ‘’ will automatically be available with apache serving files out of the ‘public_html/’ folder.Īpple already bundles many of the necessary pieces with MacOS including apache and PHP. This guide covers configuring MacOS High Sierra, Mojave, and beyond as a local development server for LAMP-stack projects.
