How to add a development copy of a live WordPress website to a local MAMP installation
Using an offline testing website has many advantages. Search Engines won’t crawl and rank a website on a local computer and development is sped up by not needing a fast internet connection. In fact, you don’t need to be online at all when using MAMP, as the program comes fitted with its own database servers. We’ll take it for granted that you have already installed MAMP.
So lets get stuck in and you will see how easy it is.
- You will need a complete backup of the live websites files (all of them) and the database.
- Copy all the WordPress files into your MAMP website folder. For me its in Applications > MAMP > htdocs > TheWebsiteYouAreWorkingOn
- Open MAMP software and start the servers (Apache and MySQL)
- Create a database for your WordPress install. When you start the MAMP servers, a webpage will open in your browser where you can go to phpMyadmin (access the databases). It is assumed you are already familiar with using phpMyAdmin.
- Once you have created a new database, Import the database backup (from the live website)
- Change the options table siteurl (normally in wp_options) to reflect the local website (eg http://localhost:8888/TheWebsiteYouAreWorkingOn/) otherwise you will go to the live website once you click any link.
- Change the database information in wp-config.php to:
Database name – whatever you called it in phpmyadmin