Troubleshooting WP Go Maps Import and Database Migration Issues
Content
Users of WP Go Maps (formerly WP Google Maps) often encounter challenges when importing map data or migrating their database. These issues can prevent markers, polygons, and other location data from appearing correctly on your site. Based on common community reports, this guide outlines the most frequent problems and their solutions.
Common Import and Migration Problems
The most reported issues fall into two main categories:
- File Import Errors: Users receive errors like "Unexpected File" when trying to import KML, KMZ, or CSV files, or their data fails to appear after a seemingly successful import.
- Database Migration Failures: During site migration, tools like WP Migrate DB Pro fail with errors related to NULL values or invalid geometry data in the plugin's spatial database fields.
Why These Issues Happen
Understanding the root cause is key to finding a fix:
- File Format Support: The core WP Go Maps plugin supports KML (a variant of XML from Google Maps) and CSV imports. It does not support standard XML files. The "Unexpected File" error often indicates an unsupported file type.
- CSV Column Formatting: For CSV imports, the column structure must match the plugin's expected format exactly. A common issue is having address data (street, city, zip) split into multiple columns when the importer expects a single "Address" column.
- Missing Latitude/Longitude: If your CSV file lacks latitude and longitude coordinates, the import will fail unless you select the "Geocode" option, which instructs the plugin to generate them from the address.
- Database Geometry Data: The plugin uses a spatial
GEOMETRYfield to store location data efficiently. During migrations, NULL values or corrupt data in this field can cause fatal SQL errors, halting the entire process.
Solutions and Workarounds
1. Fixing CSV Import Issues
If your locations are not appearing after a CSV import, follow these steps:
- Use the Sample File: Download the sample CSV file from the import screen and use it as a template. Ensure your column headers match exactly.
- Combine Address Data: If you are exporting data from another system, you may need to concatenate separate address fields (street, city, state, zip) into a single column to match the expected format.
- Select 'Geocode': If your file does not have
latandlngcolumns, you must check the "Geocode" option during import. This will automatically generate the coordinates for you.
2. Resolving Database Migration Errors
If your migration fails with errors like "Cannot get geometry object from data" or issues with NULL values, try these solutions:
- Compatibility Mode: Some migration tools, like WP Migrate DB Pro, have a Compatibility mode. Check the settings for any options related to WP Go Maps.
- SQL Query Fix (Advanced): A known workaround for corrupt spatial data is to run a direct SQL query on your database before exporting. Using phpMyAdmin or a similar tool, run:
This command rebuilds the geometry data from the separateUPDATE wp_wpgmza SET lnglat = POINT( lng, lat )latandlngcolumns. Always back up your database before performing any direct queries. - Replace NULL Values: Another solution is to find and replace any NULL values in the
lnglat(orInglat) column with a valid zero-point geometry value:POINT(0 0).
3. Understanding File Type Limitations
It is important to note that import functionality may vary:
- The core plugin supports KML and CSV file imports.
- Standard XML import is not a supported feature.
- Features like Fusion Tables and advanced import capabilities are part of the Pro add-ons, and support for them is handled separately by the WP Go Maps team.
By methodically checking your file formats, using the correct import options, and applying database fixes if needed, you can resolve most common import and migration problems with WP Go Maps.
Related Support Threads Support
-
importing Polygon/Multipolygonhttps://wordpress.org/support/topic/importing-polygon-multipolygon/
-
Import a KML or KMZ filehttps://wordpress.org/support/topic/import-a-kml-or-kmx-file/
-
XML Import setup?https://wordpress.org/support/topic/xlm-import-setup/
-
Inglat NULL value causing migration problemshttps://wordpress.org/support/topic/inglat-null-value-causing-migration-problems/
-
Exporting from Concrete 5 and Importing Into WordPresshttps://wordpress.org/support/topic/exporting-from-concrete-5-and-importing-into-wordpress/
-
Fusion Tables Purchased Pro Version No Help!https://wordpress.org/support/topic/fusion-tables-purchased-pro-version-no-help/
-
Cant migrate data table due to corruption.https://wordpress.org/support/topic/cant-migrate-data-table-due-to-corruption/
-
Database table data import issue for sql file formathttps://wordpress.org/support/topic/database-table-data-import-issue-for-sql-file-format/
-
Problem with Import locationshttps://wordpress.org/support/topic/problem-with-import-locations/
-
Import from FusionTablehttps://wordpress.org/support/topic/import-from-fusiontable/
-
Fusion Tablehttps://wordpress.org/support/topic/fusion-table/