Nothing in cyberspace is sacred
Now that you’ve compressed your whole website from your server, downloaded it – and downloaded the MySQL database and installed it in MAMP using PhpMyAdmin, we turn now to configuring MAMP to handle your WordPress files.
Place the whole-site compressed zip file into the MAMP/htdocs folder. Once that’s done, your zip file will extract itself, and creates the name of the folder together with the files from your side inside that folder that you had on the Internet. Your whole-site compressed file therefore contains all your plug-ins, themes and customizations of your Internet site. After you’ve finished decompressing the zip file, you can trash the zip file to save disk space. Do NOT try to run WordPress yet.
Let’s assume the MAMP server on your computer’s name is localhost (if you got DNS from dyndns.com or no-ip.org, you can use the site name you got through them). For now, it’s “localhost”. So, here is where your WordPress site will be in MAMP: /Applications/MAMP/htdocs/your site’s name.
Now we’re going to add this to your site’s wp-config.php file (add it right at the top of the file, one line after the word “PHP” at the top of the file, add these two lines:
define(‘WP_HOME’,’http://localhost/your site’s folder name‘);
define(‘WP_SITEURL’,’http://localhost/your site’s folder name‘)
Save the wp-config.php file and close it.
So why did we do that? So WordPress knows where to find your site in its new location (link to home page and site url).
Next step: Fix those permalinks. The permalinks used on your Internet site will be different, because they’re now somewhere else: localhost. Don’t freak, though, WordPress will do the work for you.
Run WordPress from its new MAMP directory. If you have to log in (there’s a high chance you will have to), enter the same username and password you used on your WordPress Internet site.
Now for the permalinks. Go to the WordPress admin area and click on “Permalinks.” Since you’ve already told WordPress in your wp-config.php file your new site is in your MAMP directory, you’ll see that WordPress has already filed in the information for your permalinks for you. It is IMPORTANT now for you to click “SAVE” at the bottom of that permalinks configuration page to ensure every link WORKS.
You’re done. You now have the same copy on your hard drive using MAMP that you have on the Internet.
You must be logged in to post a comment.