{"id":15972,"date":"2015-06-11T12:57:58","date_gmt":"2015-06-11T12:57:58","guid":{"rendered":"https:\/\/docs.wpgeodirectory.com\/?p=15972"},"modified":"2018-10-02T13:15:44","modified_gmt":"2018-10-02T13:15:44","slug":"core-export","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/core-export\/","title":{"rendered":"GD Core Plugin \u2013 Export &#038; Import"},"content":{"rendered":"<h4>These are the sections\u00a0you will find when you install the GeoDirectory Core (free) plugin only:<\/h4>\n<p><a href=\"\/docs\/core-overview\/\">Overview<\/a> &#8211; <a href=\"\/docs\/core-general\/\">General<\/a>\u00a0&#8211; <a href=\"\/docs\/gd-core-plugin-google-analytics\/\">Google Analytics<\/a> &#8211; <a href=\"\/docs\/core-design\/\">Design<\/a> &#8211; <a href=\"\/docs\/core-permalinks\">Permalinks<\/a> &#8211; <a href=\"\/docs\/core-notifications\/\">Notifications<\/a> &#8211; <a href=\"\/docs\/core-location\/\">Set Default Location<\/a> &#8211; <a href=\"\/docs\/core-place-settings\/\">Place Settings<\/a> &#8211;\u00a0<a href=\"\/docs\/core-theme\/\">Theme Compatibility<\/a> &#8211;\u00a0<strong>Import &amp; Export<\/strong> &#8211; <a href=\"\/docs\/core-tools\/\">GD Tools<\/a><\/p>\n<h4>On this page:<\/h4>\n<p><a href=\"#important\">Important things to know<\/a> &#8211;\u00a0<a href=\"#import\">GD Listings \u2013 Import CSV<\/a> &#8211; <a href=\"#mandatory\">Mandatory fields for listings<\/a>\u00a0&#8211; <a href=\"#other\">Other fields<\/a> &#8211; <a href=\"#images\">Uploading images<\/a>\u00a0&#8211; <a href=\"#import-tips\">Import tips<\/a>\u00a0&#8211;\u00a0<a href=\"#export\">GD Listings \u2013 Export CSV<\/a>\u00a0&#8211;\u00a0<a href=\"#import-cats\">GD Categories \u2013 Import CSV<\/a>\u00a0&#8211; <a href=\"#mandatory-cat\">Mandatory fields for categories<\/a>\u00a0&#8211;\u00a0<a href=\"#export-cats\">GD Categories \u2013 Export CSV<\/a>\u00a0&#8211; <a href=\"#tips\">Tips and Tricks<\/a> &#8211;\u00a0<a href=\"#resources\">Useful resources<\/a><\/p>\n<h3>GeoDirectory &gt; Import &amp; Export<\/h3>\n<p>The<em><strong> Import &amp; Export<\/strong>\u00a0<\/em>page allows you to upload listings or categories via a CSV file.<\/p>\n<p>Go to your WordPress Dashboard and navigate to <strong>GeoDirectory<\/strong> &gt; <strong>Import &amp; Export\u00a0<\/strong><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-23329\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/importexport.png\" alt=\"\" width=\"1165\" height=\"604\" srcset=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/importexport.png 1165w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/importexport-300x156.png 300w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/importexport-768x398.png 768w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/importexport-1024x531.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>You can also download your listings.<\/p>\n<h4><a id=\"important\"><\/a>Important things to know !<\/h4>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\"><strong>CSV files should only be edited with OpenOffice or LibreOffice Calc.<\/strong> This is because Microsoft Excel has auto-formatting built in which can not be disabled; we have seen many cases where this leads to broken phone numbers, addresses and 90% of the time wrong GPS information.<\/span><\/p>\n<p>Download <em><strong>OpenOffice<\/strong><\/em> here:\u00a0<a href=\"https:\/\/www.openoffice.org\/download\" target=\"_blank\">https:\/\/www.openoffice.org\/download<\/a><\/p>\n<p>Download <em><strong>LibreOffice<\/strong><\/em> here: <a href=\"http:\/\/www.libreoffice.org\/\" target=\"_blank\">http:\/\/www.libreoffice.org<\/a><\/p>\n<ol>\n<li>Do <em><strong>not<\/strong><\/em> change the order or the names of the columns of the CSV files.<\/li>\n<li>Do <em><strong>not<\/strong><\/em> delete any columns.<\/li>\n<li>Data separator for the CSV file MUST be comma (,) and delimiter MUST be double-quote (&#8220;)<\/li>\n<li>When adding a listing in a <a href=\"\/docs\/places-categories-and-listings\/\">subcategory<\/a>, you should also add the main category. Separate category names with a comma<\/li>\n<li>Categories may not contain commas. Categories with commas will make your import fail.<\/li>\n<li>You may import any UTF-8 characters from any language, but your spreadsheet must be UTF-8. If your CSV is not UTF-8 it will probably fail, so, save CSV as UTF-8.<\/li>\n<\/ol>\n<h3><a id=\"import\"><\/a>GD Listings &#8211; Import CSV<\/h3>\n<p>The<em><strong>\u00a0Import CSV <\/strong><\/em>\u00a0section allows you to upload listings via a CSV file.<br \/>\nYou also can download a sample CSV file to get you started.<\/p>\n<h5>post_id<\/h5>\n<ul>\n<li>The first column in the CSV file is for the <em><strong>post_id<\/strong><\/em>.<\/li>\n<li>This field should be left blank, unless you want to update (overwrite) a listing.<\/li>\n<li>You can get the post_id of existing listings by exporting your GD listings.<\/li>\n<li><i class=\"fa fa-exclamation-triangle\" style=\"color: red;\"><\/i> Do <strong>NOT<\/strong> add a post_id when importing <strong>new<\/strong> listings; WP needs to create its own post_id to avoid database conflicts.<\/li>\n<\/ul>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\"><strong>Your CSV listings file needs to have data for all mandatory fields for the listings you want to upload.<\/strong><\/span><\/p>\n<h4><a id=\"mandatory\"><\/a>These are the mandatory fields for listings:<\/h4>\n<ul>\n<li><strong>post_title<\/strong>: title or heading<\/li>\n<li><strong>post_author:<\/strong> the WordPress ID of the WP user, for example you can use <em><strong>1<\/strong><\/em> for the first admin account created<\/li>\n<li><strong>post_content:<\/strong> description<\/li>\n<li><strong>post_category:<\/strong> use the name of the category or the slug;\n<ul>\n<li><strong>this category has to be created for the <em>post_type<\/em> before you import!<\/strong><\/li>\n<li>if adding the listing in a sub-category, also add the parent category<\/li>\n<\/ul>\n<\/li>\n<li><strong>post_type:<\/strong> for example <em><strong>gd_place<\/strong><\/em> or <strong><em>gd_event;<\/em><strong> this CPT\u00a0<strong>has to be created in WP admin before you import!<\/strong><br \/>\n<\/strong><\/strong>Keep reading for mandatory fields for gd_event post types.<\/li>\n<\/ul>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\">The following fields <strong>(also mandatory)<\/strong> all relate to the location of your listings.<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Note 1:<\/strong> If you are using the <a style=\"color: #ff0000;\" href=\"https:\/\/wpgeodirectory.com\/addons\/custom-post-types\/\">Custom Post Type addon<\/a> and have disabled the requirement to use a physical location for\u00a0a CPT, then you can leave these fields blank.<\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Note 2:\u00a0<\/strong>We strongly suggest to add a few listings from the frontend, and then export those listings first. That will show you the type and format of the data required to be imported. Also, review the<a style=\"color: #ff0000;\" href=\"https:\/\/wpgeodirectory.com\/docs\/definitions\/#location\"> location notes<\/a> if you have not done so already.\u00a0<\/span><\/p>\n<p><i class=\"fa fa-lightbulb-o fa-2x\" style=\"color: green;\"><\/i> <span style=\"color: #008000;\">If you want to add locations outside your default location, you will need to install the <a href=\"https:\/\/wpgeodirectory.com\/addons\/multilocation\/\">MultiLocations addon<\/a> before you can import your data.<\/span><\/p>\n<ul>\n<li><strong>post_address:<\/strong> Street address [This can be\u00a0the actual street address, or the name of the Business, etc &#8211; it just cannot be blank]<\/li>\n<li><strong>post_city:<\/strong> City, town etc<\/li>\n<li><strong>post_region:<\/strong> state, province etc<\/li>\n<li><strong>post_country:<\/strong> country<\/li>\n<li><strong>post_latitude:<\/strong> latitude in signed degrees format, for example<em><strong> -20.97625669<\/strong><\/em><\/li>\n<li><strong>post_longitude:<\/strong> longitude in signed degrees format, for example<em><strong> 162.45444<\/strong><\/em><\/li>\n<\/ul>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\">The following fields <strong>(also mandatory)<\/strong> all relate to the date and time of your <em><strong>events<\/strong><\/em>.<\/span><\/p>\n<ul>\n<li><strong>event_date:<\/strong>\u00a0This is the first date of the event &#8211; use this format <strong>19\/07\/2015<\/strong> even if the display of your dates is set different in your WP admin.<\/li>\n<li><strong>event_enddate:<\/strong>\u00a0Must be completed unless the event is recurring.<\/li>\n<li><i class=\"fa fa-lightbulb-o fa-2x\" style=\"color: green;\"><\/i> For recurring events, we suggest you add at least one using the frontend or backend of your site, and then export the CSV file do review the requirements for the various fields.<\/li>\n<\/ul>\n<h4><a id=\"other\"><\/a>Other fields<\/h4>\n<ul>\n<li><strong>post_author:<\/strong>\u00a0Enter the ID of the user you want to assign the listing to. If left blank, then the post will be assigned to the user with ID 1, usually the administrator.<\/li>\n<li><strong>post_status:<\/strong> Enter either <em><strong>publish<\/strong><\/em> or <em><strong>draft<\/strong><\/em>. If left blank, then the listing\u00a0will be set to draft.<\/li>\n<\/ul>\n<h4><a id=\"images\"><\/a>Uploading images<\/h4>\n<ul>\n<li>The CSV file has columns for any images you want to add to your listings, look for the <em><strong>IMAGE<\/strong><\/em> columns,<\/li>\n<li>You can add additional columns if you want to add more images to your listings, they all should be named <em><strong>IMAGE<\/strong><\/em>.<\/li>\n<li>You only need to add the <em><strong>filename<\/strong><\/em> of the image, for example <em><strong>photo.jpg<\/strong><\/em>. The extension should be in lowercase, ie: .jpg, not .JPG. Uppercase file extensions will result in the image not being recognized when viewed in the site.<\/li>\n<li>When you finished uploading your CSV file, you need to\u00a0upload your images by FTP into the upload folder for the current month; the folder location will be in this format:<br \/>\n<em><strong>\/wp-content\/uploads\/year\/month<\/strong><\/em>, for example <em><strong>\/wp-content\/uploads\/2014\/11<\/strong><\/em><\/li>\n<li>The filename of the image will be used for the <em><strong>title attribute<\/strong><\/em> of the image, for example <em><strong>My_Photo.jpg<\/strong><\/em> will give a title attribute of <em><strong>My_Photo<\/strong><\/em>.<\/li>\n<li>The optimum image size is 800 x 600 pixels.<\/li>\n<li>Make sure your WordPress settings are set as follows: <em><strong>Settings<\/strong><\/em> &gt; <em><strong>Media<\/strong><\/em> &gt; <em><strong>Organise my uploads into month- and year-based folders, <\/strong><\/em>and<em><strong> Save changes &gt; Yes.<\/strong><\/em><\/li>\n<\/ul>\n<h4><a id=\"import-tips\"><\/a>Import tips<\/h4>\n<ol>\n<li><i class=\"fa fa-lightbulb-o fa-2x\" style=\"color: green;\"><\/i> It is possible that your category counts in the popular category or the CPT categories widget needs fixing after importing new listings. To do that go to <em><strong>GD &gt; GD Tools<\/strong><\/em> and run <em><strong>Location category counts<\/strong><\/em>.<\/li>\n<\/ol>\n<h3><a id=\"export\"><\/a>GD Listings &#8211; Export CSV<\/h3>\n<p>Exporting your listings gives you the opportunity to edit listings and re-upload them.<\/p>\n<p>Exporting is also very handy after you have created extra custom fields or categories; just create one finished listing with the custom fields etc, and then export to get your very own sample CSV you can then use to upload your other listings.<\/p>\n<h3><a id=\"import-cats\"><\/a>GD Categories \u2013 Import CSV<\/h3>\n<p>You can import your categories and subcategories using a CSV file instead of adding your categories one by one from the admin area.<\/p>\n<p>Download the sample file to check out the required structure and data.<\/p>\n<p><i class=\"fa fa-exclamation-triangle\" style=\"color: red;\"><\/i> Do <strong>NOT<\/strong> add a cat_id when importing <strong>new<\/strong>\u00a0categories; WP needs to create its own cat_id to avoid database conflicts.<\/p>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\"><strong>Your CSV categories file needs to have data for all mandatory fields for the categories you want to upload.<\/strong><\/span><\/p>\n<h4><a id=\"mandatory-cat\"><\/a>These are the mandatory category fields for categories:<\/h4>\n<ul>\n<li><strong>cat_name<\/strong>:\u00a0the name of the category<\/li>\n<li><strong>cat_slug:<\/strong>\u00a0the slug to be used in your URLs<\/li>\n<li><strong>cat_posttype:<\/strong>\u00a0for example <em><strong>gd_place<\/strong><\/em> or <strong><em>gd_event;<\/em><strong> this CPT\u00a0<strong>has to be created in WP admin before you import!<\/strong><\/strong><\/strong><\/li>\n<li><strong>cat_icon:<\/strong>\u00a0the map marker\u00a0to be used on\u00a0your maps<\/li>\n<\/ul>\n<h3><a id=\"export-cats\"><\/a>GD Categories \u2013 Export CSV<\/h3>\n<p>Exporting your categories gives you the opportunity to edit them\u00a0and re-upload them.<\/p>\n<h3><a id=\"tips\"><\/a>Tips and Tricks<\/h3>\n<p><i class=\"fa fa-folder-open fa-2x\" style=\"color: orange;\"><\/i> See also <a href=\"https:\/\/wpgeodirectory.com\/docs\/csv-tips-and-tricks\/\">CSV Tips and Tricks<\/a><\/p>\n<h4>Moving posts from one post type to another<\/h4>\n<ol>\n<li>Create the new Custom Post Type and its categories<\/li>\n<li>Export the listings from the old CPT<\/li>\n<li>Change the post_type and post_category in\u00a0the exported file<\/li>\n<li>Check the following import option: <em><strong>Update listing if post with post_id already exists<\/strong><\/em>.<\/li>\n<li>This\u00a0will move all the listings from the gd_place table into the new CPT\u00a0table, changing the categories.<\/li>\n<\/ol>\n<h4><a id=\"batch\"><\/a>Adding\u00a0latitude and longitude in bulk to your CSV import file<\/h4>\n<p><i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\">The\u00a0<a style=\"color: #ff0000;\" href=\"http:\/\/www.findlatitudeandlongitude.com\/\" target=\"_blank\">Find Latitude and Longitude<\/a>\u00a0website is currently offline while they are changing their site from a free tool to a paid version.<\/span><\/p>\n<p>Go the the batch code page at the\u00a0<a href=\"http:\/\/www.findlatitudeandlongitude.com\/batch-geocode\/\" target=\"_blank\">Find Latitude and Longitude<\/a> website.<\/p>\n<p><strong><span style=\"color: #ff0000;\">Step 1:<\/span><\/strong> Input one address per line in the input field:<\/p>\n<ol>\n<li>The easiest is to add the addresses to the CSV file first, and then copy and paste into the <em><strong>input<\/strong><\/em> field.<\/li>\n<\/ol>\n<p><strong><span style=\"color: #ff0000;\">Step 2: <\/span><\/strong>Adjust the\u00a0<em><strong>Batch Geocode Output Fields settings<\/strong><\/em> (optional)<\/p>\n<p><strong><span style=\"color: #ff0000;\">Step 3:<\/span> <\/strong>Click the <em><strong>Geocode<\/strong><\/em> button in the\u00a0<em><strong>Batch Geocode Settings box<\/strong><\/em>.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Step 4:<\/strong><\/span> Copy the list that appeared in the <em><strong>output<\/strong><\/em>\u00a0field with all the lat and long coordinates and paste it directly into your\u00a0CSV file.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-21650\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/export1.png\" alt=\"\" width=\"646\" height=\"413\" srcset=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/export1.png 646w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/06\/export1-300x192.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/p>\n<h3><a id=\"resources\"><\/a>Useful resources<\/h3>\n<ol>\n<li><a href=\"http:\/\/mygeoposition.com\/\" target=\"_blank\">myGeoPosition.com<\/a><\/li>\n<li><a href=\"http:\/\/www.findlatitudeandlongitude.com\/\" target=\"_blank\">Find Latitude and Longitude<\/a><br \/>\n<i class=\"fa fa-exclamation-triangle fa-2x\" style=\"color: red;\"><\/i> <span style=\"color: #ff0000;\">The\u00a0<a style=\"color: #ff0000;\" href=\"http:\/\/www.findlatitudeandlongitude.com\/\" target=\"_blank\">Find Latitude and Longitude<\/a>\u00a0website is currently offline while they are changing their site from a free tool to a paid version.<\/span><\/li>\n<li><a href=\"https:\/\/geocod.io\" target=\"_blank\">geocodio<\/a>: convert US and Canadian street addresses only into map coordinates and vice versa.<\/li>\n<li><a href=\"http:\/\/adresse.data.gouv.fr\/csv\/\" target=\"_blank\">G\u00e9ocoder un fichier CSV<\/a>: convert French street addresses only into map coordinates<\/li>\n<li><a href=\"http:\/\/www.gpsvisualizer.com\/geocoder\/\" target=\"_blank\">GPS Visualizer&#8217;s Address Locator:<\/a> you will need to use your own API key<\/li>\n<li><a href=\"https:\/\/www.doogal.co.uk\/BatchGeocoding.php\" target=\"_blank\">Batch geocoding<\/a><\/li>\n<li><a href=\"http:\/\/geoservices.tamu.edu\/Services\/Geocode\/BatchProcess\/ target=\"_blank\">Batch geocoding &#8211; US only<\/a><\/li>\n<\/ol>\n<h3><a name=\"troubleshooting\" id=\"troubleshooting\" href=\"#troubleshooting\">Troubleshooting<\/a><\/h3>\n<h4><a name=\"debug\" id=\"debug\" href=\"#debug\">Enable Debugging to Generate Error Logs for Imports<\/a><\/h4>\n<p>If, after reading the document above, the import is still encountering errors, you can enable debugging in WordPress so that the import will create error logs that will contain more details about the issues with the import.<\/p>\n<ol>\n<li>Enable debugging: <a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-set-up-wordpress-error-logs-in-wp-config\/\" rel=\"noopener\" target=\"_blank\">https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-set-up-wordpress-error-logs-in-wp-config\/<\/a><\/li>\n<li>Re-run the import.<\/li>\n<li>Review the WordPress error log.<\/li>\n<li>Address problems with the import file.<\/li>\n<li>Re-run the import.<\/li>\n<li>Review the WordPress error log.<\/li>\n<li>If additional questions remain about how to remedy errors with the import file, <a href=\"https:\/\/wpgeodirectory.com\/support\/forum\/geodirectory-core-plugin-forum\/plugin-support\/\" rel=\"noopener\" target=\"_blank\">create a support request<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>These are the sections\u00a0you will find when you install the GeoDirectory Core (free) plugin only: Overview &#8211; General\u00a0&#8211; Google Analytics &#8211; Design &#8211; Permalinks &#8211; Notifications &#8211; Set Default Location &#8211; Place Settings &#8211;\u00a0Theme Compatibility &#8211;\u00a0Import &amp; Export &#8211; GD Tools On this page: Important things to know &#8211;\u00a0GD Listings \u2013 Import CSV &#8211; Mandatory &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpgeodirectory.com\/docs\/core-export\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;GD Core Plugin \u2013 Export &#038; Import&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1676,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/15972"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1676"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=15972"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/15972\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=15972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=15972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=15972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}