Running WordPress installations could not be easier with MAMP, WordPress and a Browser. The installation is very quick and should take you only minutes to have a working WordPress site available in your browser and local network.

Snow Leopard OS X is a treat to work with and the system works very well with MAMP. To install MAMP head to their website at: www.mamp.org and get the latest version.

  1. Install MAMP – Download Here and install by dragging the application into the applications folder (Not a subfolder). The standard version is FREE and the one used on this post.
    MAMP Snow Leopard Installation

    During the installation your browser will open and give you your configuration settings.

    MAMP-Installation-Screen

    If you do not see this screen put this link into your browser: file:///Applications/MAMP/bin/mamp/English/index.php.

    You will need this information for your WordPress configuration

  2. Download the latest version of WordPress – Check the latest version page. Unzip the download and a safe place.
  3. Create a local folder where you want to build your WordPress blog. Copy your unzipped new WordPress installation to this folder.
    MAMP-Location-1

    Configure MAMP to look at your new WordPress folder. Open the MAMP preferences – Apache – Then edit the Document Root to be the location you have placed your WordPress files.

    MAMP-location-2

  4. Make sure that MAMP is up and running with green lights
    MAMP-Location-1
  5. Go to the PHP My Admin screen to configure yourself a new database. It will be located in your MAMP Apache root directory which by default is http://localhost:8888/phpMyAdminForPHP5/index.php. Then create a database. For this example I am using wp-database:Create-WordPress-DB
  6. No head to your WordPress folder where you placed your WordPress files and folders. In the root folder you will see a file called: wp-config-sample.php open this file in a text editor.The first part of the file looks like this:The next section of the file is the one which you are about to edit with your new database and MAMP configurations:
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'putyourdbnamehere');
    
    /** MySQL database username */
    define('DB_USER', 'usernamehere');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    Replace this code with this new code with the information we have taken from the MAMP configuration screen and the new WordPress database that you have created in PHP My Admin

    // ** This is my new MySQL settings ** //
    define('DB_NAME', 'wp-database'); // The name of the database we just made
    define('DB_USER', 'root'); // Your default MAMP MySQL username
    define('DB_PASSWORD', 'root'); // Your default MAMP and password
    define('DB_HOST', 'localhost:8889'); // Your default MAMP SQL port
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    Now save this file with the file name: wp-config.php – Not wp-config.php !!! (Common mistake)

  7. Now open your working WordPress site and finish the configuration.

    Welcome-To-WordPress

    Add your new WordPress site name and working email address

    Welcome-WP-2

    Now record the admin username and password.

    Welcome-WP-3

  8. Your new WordPress site will now be up and running and visible at your local MAMP location: http://localhost:8888/

    Your WordPress administration login will be accessable at: http://localhost:8888/wp-admin/

I hope that you find this information useful. We would love to hear your feedback and comments.

 Mail this post

Technorati Tags: , , , , , , , , , , , , , , , , , , , , , ,

7 Responses to “Mac OS X Snow Leopard: Install Local WordPress using MAMP”

  1. logfarm says:

    excellent tutorial. got it up and running in 5 minutes.

    question : is there a way for other people in my office to see my site or is it just for me? i know localhost is my computer but is there a way for people on my local intranet to see it? i thought by computer name, but that doesn’t work.

    thanks again!

  2. Colonel Martin says:

    There sure is a way to let the local nodes (computers) on your local network to see your websites. With MAMP the root of your website will be on port 8888. What this means is that you are already broadcasting you webpages to anyone that looks for your IP address with :8888 on the end.

    So if you open a Terminal by going to your Applications then your Utilities folder. Then double-clicking on the Terminal.app you can then type in:

    ifconfig -a

    This will list something like this:

    lo0: flags=8049 mtu 16384
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0×1
    inet 127.0.0.1 netmask 0xff000000
    inet6 ::1 prefixlen 128
    gif0: flags=8010 mtu 1280
    stf0: flags=0 mtu 1280
    en0: flags=8863 mtu 1500
    ether 00:1e:c2:01:21:fa
    media: autoselect status: inactive
    supported media: autoselect 10baseT/UTP 10baseT/UTP 10baseT/UTP 10baseT/UTP 100baseTX 100baseTX 100baseTX 100baseTX 1000baseT 1000baseT 1000baseT none
    fw0: flags=8822 mtu 4078
    lladdr 00:1e:52:ff:fe:5a:1b:98
    media: autoselect status: inactive
    supported media: autoselect
    en1: flags=8863 mtu 1500
    inet6 fe80::21e:52ff:fe71:c77c%en1 prefixlen 64 scopeid 0×6
    inet 192.168.0.20 netmask 0xffffff00 broadcast 192.168.0.255
    ether 00:1e:52:71:c7:7c
    media: autoselect status: active
    supported media: autoselect
    en2: flags=8923 mtu 1500
    ether 00:1c:42:00:00:08
    media: autoselect status: inactive
    supported media: autoselect
    en3: flags=8923 mtu 1500
    ether 00:1c:42:00:00:09
    media: autoselect status: inactive
    supported media: autoselect

    End of Terminal output!!!!!

    So now work up from the bottom looking for inet and you will see an IP address which contains 4 sets of numbers. For my Mac it is displayed on this line:

    inet 192.168.0.20 netmask 0xffffff00 broadcast 192.168.0.255
    So the inet number is my IP address. Which is 192.168.0.20
    For people to see my websites they need to put in their browser:
    http://192.168.0.20:8888/
    So even if you did not know it, your websites were already visible to the world, even if that world was only your local network.
    We hope this helps and best of luck with all your developments.

  3. I read it, but think that doesn’t work that way…

  4. I dont know If I said it already but …Cool site, love the info. I do a lot of research online on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks, :)

    …..Frank Scurley

  5. Hey, I found your blog while searching on Google. I have a blog on online stock trading, I’ll bookmark your site.

  6. Savannah says:

    Awesome blog!

    I thought about starting my own blog too but I’m just too lazy so, I guess Ill just have to keep checking yours out.
    LOL,

  7. Your blog is so informative … ..I just bookmarked you….keep up the good work!!!! :)

Leave a Reply