Importing into CiviCRM using an import script
There are occasions where you want to get some data into CiviCRM but there is no quick way of doing it. For example, your existing contacts may all be tagged. You want to get these tag values into CiviCRM so that when you import your contacts your tags work properly.
The CiviCRM interface only allows you to add one tag at a time. So this could be very time-consuming if you have hundreds of tags. This recipe introduces the use of the command-line interface to rapidly add data to CiviCRM.
The recipe can be used to migrate data into most CiviCRM tables. It's not as terrifying as it sounds.
Getting ready
First, you must have a local testing environment.
A local testing environment is a CiviCRM installation that runs on your own computer rather than the Internet.
In this recipe our local testing environment was set up on a Mac using the MAMP software. There are similar setups for Windows-based machines.
Once your local testing environment is set up you need...