Complete Geek Boutique

Nothing in cyberspace is sacred

WordPress: From server to MAMP subdirectory – Part 2 of 2

mamp-pro-logo-bigmamp-pro-logo-bigNow 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.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

Information

This entry was posted on November 14, 2015 by in Content Management Systems and tagged , , , , , , .
%d bloggers like this: