跳到內容

Listdom JSON Import & Export Documentation

本頁內容尚未翻譯。

Listdom supports importing and exporting listing data in JSON format. This is useful for creating a full backup of your directory listings or for migrating listings from one site to another.

To export all your listings to a JSON file:

  1. Navigate to Listdom → Import / Export in the WordPress admin area.
  2. Go to the JSON tab, then select the Export sub-tab.
  3. Click the Export button.

Listdom will generate a JSON file (e.g. listings-YYYY-MM-DD.json) and prompt you to download it. Save this file to your computer. The JSON export includes all listing posts and their related data, such as:

  • Listing title, content/description, status, and other core fields.
  • All custom metadata (price, contact info, location coordinates, etc.).
  • Taxonomy terms associated with each listing (categories, locations, tags, labels, features, etc.), including their names, descriptions, and any term meta (like icons or colors).
  • Gallery images and featured image URLs for each listing (the JSON stores the image URLs).
  • Custom fields (attributes) values for each listing.

This JSON represents a complete snapshot of your listings. You can use it as a backup, or import it into another site running Listdom to duplicate the content.

You can import listings on a site by using a JSON file previously exported from Listdom:

  1. On the target site, go to Listdom → Import / Export and click the JSON tab, then the Import sub-tab.
  2. You’ll see an uploader for the JSON file. Click Choose File (or Browse) and select your Listdom JSON file (the file you exported earlier, which should have a .json extension).
  3. After selecting the file, click the Import button.

Once you click Import, Listdom will read the JSON and begin creating the listings. The process will:

  • Add Listings: Each listing entry in the JSON will be created as a new listing post on the site (with the same title, content, etc.). If a listing from the JSON has the same unique ID as an existing listing, Listdom will update the existing listing instead of duplicating it (to prevent duplicates when importing the same file twice).
  • Recreate Taxonomies: Any categories, locations, tags, labels, or features in the JSON that do not exist on the target site will be created. Listdom will assign imported listings to these terms just as they were on the original site. (If a term with the same name already exists, it will reuse it instead of creating a duplicate.)
  • Import Custom Fields: All custom attributes and metadata values are applied to the new listings.
  • Import Images: The JSON contains URLs for each listing’s featured image and gallery images. During import, Listdom will attempt to download those images from their source URL and add them to the Media Library, attaching them to the listing. This means after import, your listings will have the same images. (Ensure the site where the images are hosted is accessible during import so the files can be fetched.)

After the import completes, you will have all the listings (and related terms) in the JSON file added to your site.

Once the JSON import is done, it’s a good idea to verify a few things:

  • Go to Listings in WP admin and ensure the expected listings appear.
  • Check Listings → Categories/Locations/Tags (and other taxonomies) to see that all terms were imported.
  • Visit the front-end pages for a couple of imported listings to confirm that content and images are showing correctly.
  • If any images failed to download (for example, if the original site was offline), you may need to manually upload those images and set them as the listing’s featured image.

JSON import is a straightforward way to migrate listing content. It does not require any field mapping since it’s a direct export/import of all data. This makes it ideal for cloning your directory content onto another site or restoring a backup.

  • Site Migration: If you are moving your directory to a new WordPress site or domain, exporting to JSON and importing on the new site will recreate all listing content quickly.
  • Bulk Backup of Listings: You can periodically export listings to JSON as a backup of your directory data (in addition to regular database backups). In case something happens to your site’s data, you could re-import the JSON to recover the listing content.
  • Merging Content: Although not common, you could export from one Listdom site and import into another to combine listings. Just be cautious of duplicate entries in such cases.

JSON import/export is part of Listdom’s core functionality (available in Listdom Pro if you have that installed). It complements the CSV import/export by focusing on full-fidelity data transfer specifically for Listdom listings.