CSV Import & Export

Pretty Links can export all your links to a CSV file and import them back. This is the right tool for backups, site migrations, and bulk edits in a spreadsheet.

When to Use CSV

  • Backups — Keep a copy of your links separate from your WordPress database;
  • Migrations — Move links between two WordPress sites in minutes;
  • Bulk edits — Open the CSV in Excel, Google Sheets, or Numbers, change dozens (or thousands) of target URLs at once, and import the changes back;
  • Reporting outside WordPress — Pull your link list into other tools for analysis.

Go to Dashboard > Pretty Links > Options > Tools and click Export Links to CSV.

Pretty Links generates a CSV file containing every link in your site (excluding trashed links) with these columns, in this order: id, slug, url, name, description, redirect_type, param_forwarding, track_me, nofollow, sponsored, new_window, source, created_at, updated_at, clicks, uniques. (created_at, updated_at, clicks, and uniques are exported for archival value but ignored on import.)

Save the file somewhere safe. That’s your backup.

From the same Dashboard > Pretty Links > Options > Tools screen, click Import Links from CSV and upload your file.

Pretty Links processes the file in your browser, 50 rows at a time. Large imports therefore upload in several small batches automatically.

Pretty Links reads each row and creates a new link for it. You can use this to:

  • Restore links from a backup;
  • Move a batch of links from one site to another;
  • Add many new links at once from a spreadsheet you’ve prepared.

What’s Preserved

The import keeps all the standard fields: target URL (url), name, description, redirect type, tracking (track_me), nofollow, sponsored, new window (new_window), and query forwarding (param_forwarding).

Pretty Links resolves each row in this order:

  1. If id is present and matches an existing link, that link is updated.
  2. Otherwise, if slug matches an existing link, that link is updated.
  3. Otherwise a new link is created.

Importing your own export back into the same site is therefore an in-place update — slugs are not renamed and duplicates are not created. If you want to force fresh creates with the same slugs on a destination site, delete the conflicting links first.

Sample CSV Template

The most reliable way to get a properly formatted template is to:

  1. Create one or two test links in Pretty Links the way you want them.
  2. Export your links to CSV.
  3. Open the file and use it as your template — keep the header row exactly as it is, and add your own rows below.

The header row tells the importer which column means what. Don’t rename or reorder the columns; fill in your values underneath.

Editing in a Spreadsheet

When you open the CSV in Excel or Google Sheets, watch out for two common gotchas:

  • Long numbers — Some link IDs may be displayed in scientific notation. Format the column as plain text before editing;
  • Special characters — If your titles or descriptions contain commas, quotes, or non-Latin characters, save the file as CSV UTF-8 (not plain CSV) when you’re done editing. This keeps everything intact on import.

Warning: If your titles or descriptions contain commas, quotes, or non-Latin characters, save the file as CSV UTF-8 rather than plain CSV. Saving as plain CSV can corrupt those characters on import.

Once you’re happy with your edits, save the file and import it back into Pretty Links.

Migrating Between Sites

To move links from Site A to Site B:

  1. On Site A, export your links to CSV.
  2. On Site B, install and activate Pretty Links.
  3. Go to Dashboard > Pretty Links > Options > Tools and import the CSV.

Your links will be re-created on Site B with the same slugs (assuming none collide). Click history and reports do not transfer — only the link definitions themselves.

Table of Contents

    Docs Didn’t Solve It?

    Send us a message and someone from our Support Team will be in touch shortly.