MAMP Elephants

MAMP Elephants

Recently I struggled a little with un-publishing my public WordPress Blog to a local MAMP environment, for local testing purposes before I apply big changes (as it should be). There are actually only some minor things to consider, in order to properly get a WordPress installation running locally.

    1. Install MAMP (Mac Apache, MySQL & PHP) and start it *
    2. Download all WordPress files into MAMP’s /htdocs/ folder (or a subfolder to it, f.eg. “/htdocs/blog/”)
    3. Now gather the MySQL database data of your Blog and import it into the MAMP-MySQL Server
      (I love using Sequel Pro for this job, login is directly to the socket with U: & P: “root”)
      MAMP MySQL Connection Data
    4. After the successful Database-import, open the table “wp_options” and find the line with option_name “home” – adjust it to your local IP with MAMP’s Apache Port (default: 8888)
      (it’s important you use the IP address and not values like “localhost” or “my-computer.local” – check the official MAMP forum here for the reasons)
      WP local database - home address
    5. Do the same for the option_name “siteurl”
      WP local database - siteurl address
  1. As a last step, you have to change the configuration file of your WordPress installation – therefore open the file named “wp-config” from your MAMP /htdocs/ folder and adjust the database connection information to match your MAMP MySQL Server.
    WP local - wp-config file
  2. That’s it – you should now be able to connect to your Blog via http://localhost:8888/

* If MAMP won’t start it’s MySQL Server, use the Terminal command

sudo mysqld -9 killall

and try to start it again… (Source)

Share:
  • 0
  • 0

Questions? Suggestions? Let us know with a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.