This version of the tutorial works with macOS Mojave (10.14), and versions going back to Mavericks (10.9) and uses Homebrew as a package manager. I streamlined this tutorial in August 2014 to make it even easier to set up your development environment. I’ve archived the. In January 2016, I added support for, which is a DNS redirecting service. This allows you to access your local sites from any device on your network.
RSS Latest Web Development Software. Amazing Slider for MAC 1.0. Website Auditor for Mac 3.2.1. Discover the sure-fire way to optimize your website and secure rock-solid top Google rankings.
I’ve been using this particular configuration, or one quite like it, for several years, but when I picked up a new laptop recently, I decided to start from scratch. There were a ton of settings, scripts, and programs installed on my old machine that I no longer used, and I wanted them gone. Feel free to use this guide on any Mac, but you may find that there are differences on your machine if it’s not a fresh install of OS X. These are the exact steps I used to get things running on my machine, and it’s been tested on many machines. Why Not Just Use MAMP? Is a package that will install MySQL, PHP, and Apache on your Mac all with one download, and a quick install.
It’s a great option and MAMP Pro, the paid version, will provide most of the features you need to run multiple web sites on your machine. I don’t use it because most of what it offers is already a part of OS X, and I prefer to customize my environment beyond what MAMP provides out of the box. If I’m already going to be playing around with the config files, I may as well go the distance. The main benefit of MAMP is that it leaves all your default system settings alone, sandboxing your development environment. I don’t get any benefit out of that. It also allows you to easily turn on and off services. I don’t ever turn them off, so that’s not any help to me either.
Housekeeping Mac OS X is a great operating system for developers, but many of the features important to us are turned off to make the OS more easy to use for everyday tasks, and more secure. Many of the configuration files we need to edit are hidden away in directories that do not show up in the Finder by default. I’m not going to tell you how to edit files here.
Some people prefer command-line tools like. For most of my code editing needs, I use. It’s not free, but I find the features well worth the price. If you’re going to be using a text editor every day, you’re going to want to pay for a good one. Sublime Text can open files like any other GUI text editor, and can also be invoked from the. Make sure you’re familiar with editing config files in the text editor of your choice before continuing.
Everything we’ll be installing here is free, and you can certainly go a long way without having to pay a cent for any of your software. However, don’t be afraid to pay actual money for great apps. If you’ve bought a Mac, you already understand that spending money on a well designed product usually saves you time in the long run.
Software works the same way. Xcode First, you need to have installed for a few of these tools to work. You can get by without it if you try really hard, but if you’re a developer, you’re probably going to need to have it at some point. It’s massive, so start downloading it now. Grab it from the App Store, and then grab a coffee or play with your kid or dog. For OS X 10.9 (Mavericks) and up, the developer command line tools can be installed by running the following command within terminal.
Xcode-select -install This will trigger a software update dialog box. Click install and wait for it to complete.
If this does not work,. You will need an Apple developer account to do this.
Once Xcode is installed, start it up. The tools we need will not work unless the app has run once, and you’ve accepted the licence agreement. You don’t need to do anything with the app. Just start it up (It can take a while to run the first time, even on a fast machine) click agree, and shut it down.
Homebrew is a popular and amazing package manager for OS X. Package managers keep all the big and small tools that we need to install on our machines tidy and up-to-date. It could not be easier to install. Switch over to your terminal, and type in this one command: ruby -e '$(curl -fsSL It can take a while for the install, but that one command is all you need for Homebrew. MySQL This is optional. You may prefer another kind of database, or no database at all.
Feel free to skip this if you don’t need it, but really, you probably do. MySQL no longer comes pre-installed as of Mountain Lion (10.8) as it did with previous versions or OS X. You can try the latest version of MySQL for the latest version of OS X. The latest version is currently for 10.11.
Choose the 64bit “DMG Archive” one. Dnsmasq This is a great little tool to that allows us to use wildcard subdomain names. With the default apache settings, you can add as many sites as you like in subfolders of the web root. You can have sites like this: However, that creates a problem. When you have each site in a folder, it’s more difficult to manage the settings for each site.
Each one must then have a different absolute root. The solution is to create a subdomain for each site, and use URLs like these: We can accomplish this by placing all three sites in our /private/etc/hosts file, but then we need to keep adding entries every time we add a new site. Dnsmasq allows us to do this by interrupting each request that ends with.test and forwarding it to a designated IP address (127.0.0.1 in our case). Previous versions of this tutorial used.dev as a local TLD but.dev has been registered for use by Google and forced by Chrome to use SSL, so it is no longer an option for local development. The.test TLD is now reserved for development use. You can also use.localhost or.example. You can even make up your own as long as it’s not a real TLD in use.
To install dnsmasq, we use the previously installed Homebrew. The following commands will install dnsmasq, configure it to point all requests to the.test top-level domain to our local machine, and make sure it starts up and runs all of the time.
Brew install dnsmasq cd $(brew -prefix); mkdir etc; echo 'address=/.test/127.0.0.1' etc/dnsmasq.conf sudo cp -v $(brew -prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist sudo mkdir /etc/resolver sudo bash -c 'echo 'nameserver 127.0.0.1' /etc/resolver/test' We’re now done with dnsmasq, and if all goes well, you’ll never need to think about it again. Now, to get Apache going.
Your Local Web Root Apache has a default location for storing website files, but I prefer to create my own web root that is independent of Apache. You can place your files anywhere you wish, but I prejust put them in a directory called /www on my main hard drive. Put yours wherever you wish. In that folder, I have a few subfolders.
/www/home is a main website that I use to list all my local sites (I’ll show you how to make that site dynamic later on). /www/sites is the folder in which I place each of my other sites. Each of those site folders has a webroot ( /www/sites/client1/wwwroot), and an assets folder ( /www/sites/client1/assets), where I keep source files or other documents related to the site. Apache Step one is easy. It’s actually almost done.
Mountain Lion (10.8) was the first version of OS X without Apache in the “sharing” section of the preferences pane. No big deal though, since you just need to start it up once using the terminal. Open up the Terminal app, and enter the following command.
You’ll be asked for your administrator password. Sudo apachectl start That’s it. Test it out by visiting in your browser. You should see a simple page that says “It Works”. Apache is up and running, and is ready to serve your sites. It will stay on until you turn it off (I never turn it off), and will start up automatically each time you start your computer.
Don’t worry about taxing your computer’s resources by running Apache. It won’t be a problem. You should also try, which should work since dnsmasq is pointing all.test domains to the local IP. You can try as well. Apache will serve up sites as is, but there are a few quick changes we need to make to the configuration files before we are ready to go.
Using your favorite text editor, open up /private/etc/apache2/httpd.conf If you’re going to be using PHP, you need to tell Apache to use the PHP module to handle.php files. On line 169 (line 117 before 10.10 (Yosemite) but could be different on your system), you need to uncomment this line (remove the “#”) 168 #LoadModule perlmodule libexec/apache2/modperl.so 169 #LoadModule php5module libexec/apache2/libphp5.so 170 LoadModule hfsapplemodule libexec/apache2/modhfsapple.so becomes 168 #LoadModule perlmodule libexec/apache2/modperl.so 169 LoadModule php5module libexec/apache2/libphp5.so 170 LoadModule hfsapplemodule libexec/apache2/modhfsapple.so. Yosemite (10.10) and later only Starting with OS X 10.10 (Yosemite), Apple moved from Apache 2.2 to Apache 2.4, and that means there are a few additional changes we need to make.
First, there is a directive that helps secure your machine by denying access to the entire file system by default. I’ll show you how to remove this directive, since I find that easier on a machine meant for development. The section of code runs from line 220 through 223. You can comment out (place ‘#’ in front of each line) or just remove this section. 220 221 AllowOverride none 222 Require all denied 223 Then, the modvhostalias module needs to be activated.
We must uncomment line 160, so: 159 #LoadModule davlockmodule libexec/apache2/moddavlock.so 160 #LoadModule vhostaliasmodule libexec/apache2/modvhostalias.so 161 LoadModule negotiationmodule libexec/apache2/modnegotiation.so becomes 159 #LoadModule davlockmodule libexec/apache2/moddavlock.so 160 LoadModule vhostaliasmodule libexec/apache2/modvhostalias.so 161 LoadModule negotiationmodule libexec/apache2/modnegotiation.so. And on line 509 (line 500 in Yosemite and El Capitan, and line 477 before Yosemite), in order to allow us to add multiple websites to Apache: 508 # Virtual hosts 509 #Include /private/etc/apache2/extra/httpd-vhosts.conf 510 becomes 508 # Virtual hosts 509 Include /private/etc/apache2/extra/httpd-vhosts.conf 510 This tells apache to load the information in the httpd-vhosts.conf file in the /private/etc/apache2/extra/ directory. We need to edit that file. You can delete or comment out everything in that file, and replace it with the following: Options Indexes MultiViews FollowSymLinks AllowOverride All Require all granted VirtualDocumentRoot '/www/sites/%1/wwwroot' ServerName sites.test ServerAlias.test UseCanonicalName Off VirtualDocumentRoot '/www/sites/%-7+/wwwroot' ServerName xip ServerAlias.xip.io UseCanonicalName Off Then run the following to force Apache to load your new config files: sudo apachectl restart This configuration allows you to use the URL on your local machine with your site files stored in /www/sites/client1/wwwroot. It also allows you to use the service to use the URL IP.xip.io to access your sites from another machine (or device) on your local network.
So, if your machine’s local IP address (not your public IP address), is 192.168.1.10, the URL for a site might be You can find your local IP address in your network preferences. Is offered for free by Basecamp and provides one of the simplest services on the internet. They run a simple DNS server that redirects all traffic to.xip.io back to the IP address indicated by the subdomain. Now you don’t need to update config files every time you add a new site. Simply add the necessary folders to your “sites” directory, and the site will work locally with its own subdomain. A Custom Home Page Now that you have a bunch of local sites running on your machine, you can bookmark them all, or you could do something fancy, and create your own custom home page that lists all the sites currently available on your machine.
If you’ve got the development chops to build this yourself, go right ahead. All you need is some kind of script that can analyze your sites directory, and a way to output it. I have a PHP script that I’ve used for years to do this.
Disclaimer: I do not use PHP very much, and my code is rough. If you’re better at PHP than me, which is likely, and have suggestions for improvement, by all means let me know, or submit a pull request. The small site I use for my local home page is. Hopefully this has been of some use to you. If you have any comments of better ways to do things, you can occationally find me on. If you want to throw a little love (and money) my way by using one of these affiliate links for three services I’ve found to be awesome, we both win.
DigitalOcean Hosting I switched all my sites to DigitalOcean and noticed a huge improvement in speed. They have amazing tutorials and pre-built servers that will make you feel like a seasoned sysadmin in no time, or you can configure your server using. Dedicated fast virtual servers start at only $5 per month (plus only $1 a month for weekly backups), and you’ll get $10 credit using this link. ServerPilot If you’ve signed up for DigitalOcean, ServerPilot is a great way to configure your machine for one or many sites.
They hook up to your fresh server, and handle all the setup and updates. They’ll do it for free, but offer multiple user systems for $10 per month if you want to use it to manage client sites and provide them all separate logins. They now include free SSL for each domain.
That’s awesome. You get $10 credit for using the link. Setapp I saw Setapp advertised a few months back. It’s subscription for a great collection of Mac apps. I decided to try the free trial because there were a couple of apps that immediately interested me.
Since subscribing, I’ve converted to a paid account, simply because I was able to replace three apps I was using with great alternatives, and a lower cost. I’ve also found awesome new apps that I use all the time, and some cool stuff that I didn’t know I needed. They also add new apps all the time. 2018 UPDATE: I still love Setapp – At least once a month they add an app that I’ve always wanted to have, and every time in the last few months that I’ve needed an app that does a specific thing, they have one, and it’s great. Backblaze This is the right way to back up all your files. You need to sign up for this right now. Stop reading and do it.
$5 per month for as much stuff as you can send them. Install it and forget about it. In addition to having the ability to get all of your files back if you lose your computer, their mobile apps allow you to access any file on your computer from anywhere.
You can restore single files, or if you lose your computer they will courier you all your files on a drive. Get a free month when you use this link, then use your referral link to sign up all of your friends. You’ll get backups for free and your friends will thank you. You can’t lose.
Apple is well known for its simple design and excellent performance. Simplicity and high performance are the main reasons that all web designers prefer MACs as their working computer. They are many tools that are built to stay entertained and being high productive.
Mac acts as a great platform for making a great development because of its popular apps that are easily available to download. Here is a list of some popular applications that are beneficial for web designers and developers. Streamline Your Workflow With Must-Have Mac OS X ApplicationsWebsite development is a time taking process, and creating even a single one requires dedication and time. And so, web developers offering iPhone Application Development Services usually have to make more deliberate efforts and spend a lot of time, in order to successfully complete the development process. Fortunately, there are numerous applications available on the web that help web developers to better web development productivity for every platform. In this post, we will discuss about some of the must-have OS X Applications that developers should consider about adding to their web development toolbox. Xcode has everything that you'll need to build great applications for Apple's devices.
You can download it for free from the Mac App Store. It's a must-have application for developers who're serious about app development. Xcode enables developers to design, code, test and debug their apps in a unified workflow.
It boasts exemplary features Xcode IDE, Swift language, iOS Simulators and many more. Whether you're working on a small or a large-scale project, Espresso can boost your workflow with the help of its rich set of features. It's a web editor that provides developers with a better development environment. It boasts a Navigator that sketch out your documents hierarchical structure. No matter, how complex your code may be Espresso can help you manage it without any hassle. This application comes packed with several programmer-centric features that helps web professionals to have better control over complicated documents. It's available for a 15 day trial period, and after the trial period is over you can choose to purchase it for $75.
MySQL is one of the most popular open-source database, which is used by a number of websites for storing their databases. In case you're a MAC OS X developer and want to manage databases in MySQL (on your local or remote server), then Sequel Pro is the right application for you. This is an easy-to-use, native Mac OS X application, built with Cocoa. In lets you create, export, import, filter databases, and execute MySQL queries via your app. Sometimes the size of your app can become pretty heavy – when it comprises of plenty of images.
ImageOptim is a great application that makes it easy for the developers to cut down the app's size. Additionally, you can also use ImageOptim to shrink down the size of your images. This will eventually help to lessen the time that images take to load. If you're a developer and working on any project, then you might want to share your work with your team. Cloud application makes it extremely easy for the web professionals to share their files online in the fastest way. Once you've uploaded this application, you can easily share anything like the screenshots, documents, code snippets and so much more for free.
It even help you keep a track of how many people have viewed your file. While working on your site's web page design, Firebug renders the ability to make changes to your code and view what happens once the changes are made instantly. With the Firebug extension added into your browser, you can find the defined elements, style them and then tweak them to perfection. Next on our list is Dropbox, an ideal application for storing or keeping a backup of your files. Often when working on Mac OS X web development project, there are chances that you might accidentally modify or deleted a file. But, what if you need the file for reference again? A viable option is to sync your documents and files with Dropbox.
And so, in case you got any of your file or document deleted, you can easily restore it (remember that the deleted files are kept for 30 days). Most of the file packages that we want to download are often compressed either in zip, or rar formats. Though, Mac system comes with a built-in feature that help extract the different file formats, but it is limited.
Keka is an open-source Mac OS X app – that can be used for the compression and extraction of any files. It primarily supports three main file formats such as zip, rar and tar. Other than that, the Keka application also compresses several other file formats like Gzip, DMG, ISO etc., and can extract EXE, PAX and ACE file formats as well. Nowadays, the need for developing mobile-optimized website has become inevitable. More and more people today are using their mobile devices to access the web, and thus you certainly require some tool that test your site optimization on mobile platforms.
You can test your site by accessing it via a mobile phone and tablet, or just use a simulator application such as the iPhone Simulator. If you're a developer and want to save your time that you otherwise spend on finding files and information on your Mac, then Alfred is the perfect application for you. It's a highly recognized Mac OS X productivity app that makes finding files and information become a breeze. That's not it! It even helps to make you more productive, by bringing up hotkeys, and several essential file actions easily accessible. Every web project involves a lot of work, and thus remembering color values may make you rack your brains, especially when you're using diferent color schemes in your project.
This is where Panic’s developer color picker comes to your rescue. It lets you copy the declaration of a color in formats such as “NSColor” and “UIColor”.
This is the most popular image editor that completely uses Mac OS X's Cocoa Framework. This fully fledged image editor, which offers Photoshop a run to for gaining money, renders loads of features to all its end users. The characteristics include Gradient, Textures and other anti-aliasing options for tools like brush and text. Other than those options, it also supports alpha channel and editing over multiple layers. This impressive image editor is on budget for all Mac users. Coda is the major reason for web designers to switch over to Mac.
This intuitive app of Mac makes the web development workflow to move like a breeze. The main purpose of this application is to partition website building process for better team collaboration. This comes for an affordable cost only. This broad text editor application is purposely designed for Mac Computers.
This clearly explains the working functionality of text editors. It is the must have application of all web designers. This remarkable application let to focus on the task that is in current process.
The “Illumination Panel” of this application replaces Mac OS dock by creating a numerous application, which is preferred by the user to focus on. This is a perfect application for those who get easily distracted by other applications like Facebook, Twitter, Emails, Instant messaging, Instagram. This basic tool of Mac OS X enables the user to capture screenshots of whole web pages without any external editing. Paparazzi rely on Webkit Framework and Cocoa API and written in C. This application acts as a great tool for web designers who frequently need to seize the web page for representing design mockup presentation or to fix simple web graphics on the web page they are crafting. Aquamacs Emac is a robust text editor of Emac and also an extended version of Original Emac text editor.
This comes with a new look of Aqua and renders a look-and-feel comfort in order to make the application blend right into Mac OS UI (User Interface). This Aquamac Emac editor is great to the web designers who repeatedly work with HTML, Java, Python, C, C, PHP, Ruby, Perl, LaTeX and many more. This is a high performance WYSIWYG editor, which offers better What You See Is What You Get effect. This application is built around rendering engine of Mozilla based browsers called Gecko. Also, this application runs over Mac X 10.2.8 and other higher versions which can make the web design even better for beginner level web designers. This straightforward Mac application let people to browse images directly with ease.
This is the best replacement for existing Image viewer applications that are pre-installed on Mac Operating system. It works in a smooth and fast manner by using very little system resource as well. The application offers load of shortcuts and also a streamlined user interface to represent list of available features. This gratuitous text editor is the best substitution for default text editor that comes along with Mac OS in default. Smultron is easy to use and also this text editor is versatile. This application is meant to use in Mac OS X Leopard 10.5 and can also be used as basic text editor to complete Script and HTML editors.
This is the open source application for crafting high quality page layouts for Linux and Mac users. Scribus is the most intensive aspect set of impressive and clean GUI. The publishing features of this colossal application includes Editing, Separations, CMYK color, ICC Color Management and stretchy PDF Authoring characteristics. If you're a developer and looking for Mac OS X applications that enables you to streamline your workflow and increase your productivity, then the aforementioned list of top Max OS X applications will definitely help you accomplish your objectives.
Do you have any Mac application that you can’t live without? Have you tried any of the above listed applications? Please do share your experience with us! We would love to hear your comments!! This is article is contributed by Addison Cohen & Raji Chidu.
Addison Cohen is blogger cum iPhone app developer. At present, he is employed with, a renowned company delivering top-notch mobile apps development services. He loves sharing latest information on mobile app development processes.
Raji Chidu is a web content writer in and all time blogger who loves to expose her thoughts and information founded by her day to day life as well as surfing from the internet. She enjoys writing content for famous blogs.