The latest version of the Pro Pack, 4.2.07, has been released with some new features including a “Recode All Uncoded” and “Load Data CSV Import”.
Recode All Uncoded
The Recode All Uncoded bulk action under Manage Locations will automatically select all of the uncoded (missing latitude and/or longitude coordinates) locations without the need to check the boxes. The process will automatically select all of the uncoded locations and re-submit them to Google for geocoding.
This will not magically fix addresses that Google cannot find. It is meant to assist sites that have more locations than the daily Google geocoding limit will support. The free Google Maps API limits location geocoding requests to 2500 per day per server. On a shared hosting server this can be a few hundred location “lookups” if other sites on the same server are using Google Maps. Recode All Uncoded will help quickly re-run locations that were previously imported but exceeded the geocoding limit for the day.
Load Data CSV Import
from the updated CSV Import documentation:
If you have Pro Pack version 4.2.06+ and Store Locator Plus version 4.2.41+ you can use the Load Data option with CSV Import. This feature uses the MySQL Load Data command is is 10-50x faster than WordPress / PHP CSV file parsing, with the typical Google Geocoding limitations on performance and record counts if you are not supplying the latitude/longitude data. This feature will only import basic location data. It does not import extended data fields or Tagalong category data. If you use this along with having pre-entered latitude and longitude values you can import 100,000 locations in less than 10 minutes on a basic web server. The column headers should be included in the file and should match the basic fields. You do NOT need to include all columns.
You can build a CSV-import ready export directly from MySQL if your MySQL user account has the GRANT FILE privilege on the WordPress Store Locator Plus file. You’ll typically need to login to MySQL from an administrative account to grant file to the WordPress or other user as follows:
#mysql > GRANT FILE ON wordpress.* TO 'wpuser'@'localhost';
You will replace wpuser with your WordPress username and ‘localhost’ with your MySQL server hostname or IP address.
With the file privilege set you can then export a CSV file for import with the following MySQL command:
SELECT * INTO OUTFILE 'geocoded_locations.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM wp_store_locator;
This will create a geocoded_locations.csv file in the default MySQL WordPress files location, typically /var/lib/mysql/wordpress/ on a Linux system. You can specify a fully-qualified URL for the output file. The details on where the file is written by default and how to specify the full URL will depend on your web server settings.
You can now import the basic file using the Store Locator Plus Pro Pack by using the Load Data option with “first line has field names” and “skip geocoding” if you have the following CSV file header:
This will import the primary fields and ignore the secondary data fields that you will want to have re-created automatically.
Export All Hosted CSV
A new experimental feature has also been added. It is deemed “experimental” as it works on some systems but will not work on all systems due to directory security limitations. If this feature gets a lot of interest from the users it will be refined and kept in the product. Export All, Hosted CSV is a new CSV export feature that works much like the Export Locations download feature.
The Export Locations feature that existed in the past, and is now labelled “Export All, Download CSV” fetches the location data in CSV format and sends it to the browser for immediate download. This can be a time consuming process as not only does the server need to process the location list and write the data, but your browser needs to open up a local file on your device and write the data locally. Depending on how much memory you have on your device and the speed of your local drive the direct download process can be slower.
The Export All, Hosted CSV option keeps everything on the server. Your browser connection will remain active as Store Locator Plus reads all of the location records on the server and writes them to a disk file on the same server, however there is no browser download. For SOME users this will be faster, especially if you are on an older laptop or desktop. The file is written the the WordPress temporary storage directory on the server. For most Linux based hosts that will be in the /tmp directory which you may not have access to depending on your host. Some hosts will put temporary files in a local folder under your hosting account with the file name slplus_locations.csv. If there is enough interest, this option will be refined to allow users to specify the destination directory and filename. Site administrators can access the local server file using their hosting solution file manager or standard FTP/SFTP applications, which can be faster than browser-based downloads.