參觀我的【 伊生活小舖】

2013年10月13日 星期日

Installing WordPress Locally Using MAMP...

Installing MAMP and running WordPress locally on your Mac is a simple task, however I was unable to find any good documentation while I was attempting to do it for the first time which made it seem really difficult. My goal with this tutorial is to help you download MAMP and WordPress and have them up and running in 15 minutes. Let’s get started…

First of all if you have no idea what I’m even talking about. MAMP is an application that installs Apache, MySQL, and PHP on your Mac. This turns your computer into a server capable of running scripts locally. Macs actually come with most of this pre-installed, but the setup for it is a bit more complicated and using MAMP is far easier. Secondly this tutorial assumes you are using OS 10.4 Tiger, because we rely on a widget to get things rolling. If you are using OS 10.3 Panther you should still be able to follow along.

To start we need to go download the MAMP installer. It’s just like installing any other program on a Mac.
After installation go to your Applications folder and locate MAMP. In the MAMP folder you should see a black icon for installing the widget. Click the widget installer and OS X will ask you if you want to keep it, click keep. Then activate your dashboard by hitting the f12 key and find the widget.

Edit: For those of you not using OS 10.4, you can click on the MAMP application icon in the MAMP folder to get access to the start page and server on/off buttons.
You are going to do two things here. First click the i button on the bottom of the widget to flip it over (this button isn’t visible until you mouse over) and select php 4 on the back. Click done, which takes you back to the front and then click stop servers. When the progress wheel stops click start servers. Once they start, click Open Start Page. The page that pops up can cause your eyes to glass over if you don’t know what you are looking at, but this page contains the info we need to install WordPress.
Write down the host, user, and password which should be localhost, root, and root. However look at the example they provide and you will notice they enter localhost:8889 which will be important later when we install WordPress. Click on the phpMyAdmin link. You need to add a new database for WordPress to connect to. To make things easier we will create a new database named wordpress, however you can call it anything you want. Then click create. That’s it. Now we need to get WordPress.
Go and download WordPress. Once it’s done move the wordpress folder to the htdocs folder which is in the MAMP folder where we found the widget earlier. Now if you open the readme.html file in the wordpress folder you will get some instructions that I’m about to run you through.
Since I know all of you have the program TextEdit that’s what we are going to use for this next step (Edit: If you do use TextEdit make sure it’s set to plain text and not rich text under preferences>format). Locate the wp-config-sample.php file in the WordPress folder and open with TextEdit. We need to modify this file. You need to change the info in this file to the same as what we found on the MAMP start page. Make sure the DB_NAME is wordpress (or whatever you named your DB in the phpMyAdmin panel), Change the DB_USER to ‘root’, DB_PASSWORD to ‘root’, and the DB_HOST to localhost:8889. Save this file as wp-config.php.
Next you need to open http://localhost:8888/wordpress/wp-admin/install.php. Once it’s done you will be given a username and password. Write these down because you will need them to get in to the admin account. Now if you navigate to http://localhost:8888/wordpress/ you should see your default installation of WordPress.
Now you can work on your blog or develop templates on your local machine without changing your online blog. This also allows you to work on your blog development without an internet connection. For some other tips on how to use MAMP check out
- See more at:


Ratings and Recommendations by outbrain