This is a rough guide, since I don’t have a specific project to test it on. When we get there, I’d like to test it out myself to improve this document. That said…
1) Download and Install MAMP/XAMPP
There are XAMPP downloads for both Mac and Windows, although I’ve never used it on the Mac; I use MAMP instead.
I’m pretty sure MAMP is a drag & drop installation. With XAMPP you may get some scary security warnings, but you’ll be ok with the defaults.
If you’re feeling adventurous, you could try WAMPServer or EasyPHP or something. I don’t have any prior experience with XAMPP: I just picked it out because quick googling suggested it was currently the most popular. There are lots of alternatives (http://en.wikipedia.org/wiki/Comparison_of_WAMPs)
2) Download a copy of your WP application and database
You’ll probably need to use phpMyAdmin to pull the database. Depending on how the project’s set up, you can get the WP application either via git clone + git pull, or via FTP.
3) Tell MAMP/XAMPP to serve up your application
In MAMP you can set any directory you want to be your site root. Set it to wherever you downloaded the WP application. In XAMPP, as far as I can tell, the siteroot is hardcoded to \xampp\htdocs, so put your files there (XAMPP recommends working in a subdirectory: http://www.apachefriends.org/en/xampp-windows.html#1168. If this seems lame to you, you might want to try WAMPServer or something to see if it’s better.)
And don’t forget to turn on Apache and MySQL via your MAMP/XAMPP control panel.
4) Import the database
In MAMP, when you start the server it opens a web browser which takes you to another control panel. XAMPP does the same thing when you click the “Admin…” button. That interface should have a link to your local phpMyAdmin, where you can import the export you generated from the presumably live application, or make an export if you’re trying to move your data in the other direction.
5) Does it work?
As of now, your application should theoretically be working at http://localhost, or whatever URL MAMP/XAMPP is giving you. There are a bunch of things which could go wrong, however:
- Links in your application may be broken if you’re running in a subdirectory. You can put your WP site in the place of \xampp\htdocs, and swap the old directory back in place when you need it.
- WordPress, particularly the admin area, may not let you use it if you aren’t visiting from the original domain. See here: