Last Wednesday, I gave a quick demo on how to set up WordPress on your Mac at the Tampa WordPress User Group Meeting. I’m going to show you here what I showed them!
Firstly, we need to install MAMP. For some reason I can’t find the official site, so I’m going to link you here to download it.
Unpackage it, and install it as you would a normal application on your Mac computer.
What MAMP is going to do is install a server environment right on your computer so you can develop your WordPress site or application locally, and not have to push changes or images or anything else to a remote server. Macintosh, Apache, MySQL, PHP. That is what MAMP stands for. Macintosh being your operating system, Apache being what will serve your web pages, MySQL being the open-source database that powers many applications, including WordPress, and finally PHP, the open-source language that WordPress is run by.
Like I said at the WordPress Meetup, Apache is by default, installed in every Mac. You can go the “hard” route and install MySQL and phpmyadmin, but let’s just go ahead and do this easily with MAMP, which includes phpmyadmin (a popular open-source web based MySQL administration tool).
Let’s go ahead and open up MAMP after you’ve dropped it in the application folder.
You should be greeted with this image once you open the application.
Alright, stop/start server, pretty self explanatory there. The open start page is where your command center will be. It is web based, so clicking this button will launch the browser. You will be greeted with your passwords and navigation that takes you to your php info, phpmyadmin, etc.
Let’s go ahead and click on phpmyadmin and create your first database here. Name it ‘wordpress’ or whatever you like. For collation, we usually use latin_swedish_ci or latin_general_ci, (ci=case insensitive). Click create.
At this time, you should download WordPress from wordpress.org. Let’s go back to the MAMP application as well, and click the third menu, ‘Preferences…’
Click on the ‘Apache’ tab– here you can define where your files will go. I just drop mine in the default ‘Sites’ folder o my Mac, but you can put the default folder anywhere you like.
Since I have mine in ‘Sites’, I created a folder in their called wordpress and dropped my WordPress files right in there. With your browser, go to http://localhost:8888/wordpress/ Depending if you still have port 8888 by default, which I’m assuming you do, this URL should be good to go and you should be greeted with the famous WordPress 5 minute install.
Here you will need the following:
- Database name
- Database username
- Database password
- Table prefix (can leave default)
Your database name is ‘wordpress’ or whatever you named it earlier. Your username and password is on the main start page of MAMP, and by default is root (user) and root (pass). Hostname is localhost. Table prefix can be the standard wp_, but sometimes you may have more than one WordPress install in your database. In this case you cal name it local_ or wp_local_ or however your naming convention suits your fancy!
Move forward from this page and if everything went correctly, you should be greeted to make your title of your site, description, username and password. Don’t make your username admin, or something similar since that is a security vulnerability. Just as securing a car, securing WordPress or any application, you need to have layers. This is just one.
Uncheck to allow the site the be indexed. This won’t matter anyway since your server isn’t online. Move forward with the installation, log in, and you’re done! From here you can test away on your new local WordPress installation for Mac!