He exported the SQL for the blog in MySQL on his machine and zipped his entire WAMP server folder (usually the c:\wamp folder). I downloaded both, ensured my local WAMP server was running, and then ran the exported SQL on MySQL. Then I copied his uploaded WordPress blog instance, wpblog, from his WWW folder into mine.
I went to http://localhost:8080/. The WAMP server came up just fine (running on port 8080 to not conflict with IIS 7, which uses port 80 by default); however, I couldn't load the blog -- clicking it in the list of apps just brought up an error that it couldn't be found. What could be missing?
Well, a look into MySQL showed that it didn't have the wpblog database at all. Even though the exported SQL ran without error, it was run against the wrong database; the wpblog didn't exist. But this was only the tip of the iceberg, so to speak.
The WordPress data had hard-coded URLs (http://localhost/wpblog/) that wouldn't work with the port 8080 on my machine's WAMP setup (http://localhost:8080/wpblog/). To change these links on the data would have been quite a chore. I decided to stop IIS, so I could change WAMP to run on the default port 80 and address the issue with the links.
These were the steps to address the issues:
- Opened MySQL admin in the browser.
- Created the wpblog database manually via the UI.
- Clicked on the new database and opened the SQL tab.
- Pasted and ran the exported SQL from the friend's MySQL database. This created the tables and their data for WordPress to function (this included all the posts the friend had entered in WordPress).
- Went to Start button and typed cmd into the search box.
- This brought up cmd.exe at the top of the Start menu.
- Right-clicked cmd.exe and selected "Run as administrator".
- Clicked Yes on the User Access Control popup.
- In the elevated command window, typed net stop WAS to stop IIS. (You can use net start W3SVC to restart IIS later.)
- Opened the Apache configuration file (usually stored at C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf) with Notepad and changed the ports to ensure they pointed to port 80 and not 8080: Listen 0.0.0.0:80 and Listen [::0]:80
- Ensured I had successfully copied the wpblog folder (the WordPress blog instance in this case) from the uploaded wamp\www\wpblog ZIP file and placed it into my local wamp\www\ to make it an active app under the WAMP server.
- Restarted all the services on the WAMP server. Its icon turned green in the System Tray. (If it's yellow/orange, there's more than likely a port conflict.)
Note that you don't need the entire WAMP server folder (which can be huge -- a GB or more). You just need the blog folder under the WAMP server's WWW directory. In this case, we didn't know so we copied the whole thing!
In addition to the above steps, you can use a migration plugin such as Duplicator to successfully move a WordPress blog, data and all, from one Windows machine to another. Additional help for the plugin can be found here. In our case, we didn't know about the plugin, so we used a more brute-force technique!