---
title: "Import and Export Snippets - Tassos Code Snippets"
description: "Tassos Code Snippets lets you export snippets to a file and import them back on the same or a different Joomla installation. This is useful for backin"
url: "https://www.tassos.gr/docs/code-snippets/functionality/import-export"
date: "2026-04-29T06:04:35+00:00"
language: "en-GB"
---

[ Home ](https://www.tassos.gr/index.php?option=com_content&view=category&layout=blog&id=24&Itemid=1088) / [ Tassos Code Snippets ](https://www.tassos.gr/index.php?option=com_content&view=category&id=120) / [ Functionality ](https://www.tassos.gr/index.php?option=com_content&view=category&id=126)

#  Import and Export Snippets

Tassos Code Snippets lets you export snippets to a file and import them back on the same or a different Joomla installation. This is useful for backing up your snippets, sharing them with other developers, or moving them between staging and production environments.

## [Exporting Snippets](#exporting-snippets)

Follow these steps to export one or more snippets from your site to a `.tcs` file.

1. Log in to your Joomla backend
2. Go to **Components → Tassos Code Snippets**
3. In the snippets list, tick the checkbox next to each snippet you want to export, you can select as many as you need in a single export
4. Click the **Actions** dropdown in the toolbar (the button with the ellipsis icon)
5. Click **Export**
6. The file downloads automatically to your browser's default download folder

### [About the Export File](#about-the-export-file)

The export file uses the `.tcs` extension (Tassos Code Snippets). When exporting a single snippet, the file is named after the snippet's title (e.g. `My Analytics Script.tcs`). When exporting multiple snippets, the file is named with the current date (e.g. `snippets-2026-02-20.tcs`).

It is a structured JSON file that contains all snippet data, including:

- Title and alias
- Code and code type (HTML, JS, CSS, PHP)
- Insertion method and location
- Publishing rules and parameters
- Category, access level, language, and note

The following fields are intentionally excluded from the export as they are site-specific and would not be meaningful on another installation:

- Internal ID
- Author information (created by, modified by)
- Timestamps (created, modified)
- Ordering
- Checked-out state

## [Importing Snippets](#importing-snippets)

Follow these steps to import snippets from a `.tcs` file into your site.

1. Log in to your Joomla backend
2. Go to **Components → Tassos Code Snippets**
3. Click the **Import** button in the toolbar of the snippets list
4. Click **Choose File** and select a `.tcs` export file from your computer
5. Click **Upload &amp; Import**

### [What Happens During Import](#what-happens-during-import)

- Each snippet in the file is created as a **new record,** regardless of whether a matching snippet already exists — existing snippets are never overwritten
- All imported snippets are set to **Unpublished** so you can review them before making them live
- If an alias from the import file already exists, a numeric suffix is appended automatically (e.g. `my-snippet` becomes `my-snippet-2`). If the snippet uses the shortcode insertion method, the shortcode will reflect the new alias — for example `{tcs snippet.my-snippet-2}` — So any places in your content where you call the original shortcode will need to be updated accordingly
- All other fields — title, code, code type, insertion method, location, publishing rules, parameters, category, access level, language, and note — are restored exactly as they were at the time of export

## [Troubleshooting](#troubleshooting)

**The Export button does nothing**
You must select at least one snippet before clicking Export. The button requires a row selection to be active.

**Import fails with "Invalid file" error**

- Make sure the file has a `.tcs` extension
- The file must be a valid export produced by Tassos Code Snippets — do not modify the file manually
- The file must not be empty or corrupted

**Category is missing after import**
Categories are referenced by ID. If the category ID from the source site does not exist on the destination site, the snippet will be placed in the default (uncategorised) category. Assign the correct category manually after import.

 Last updated on Mar 6th 2026 13:03

## Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.tassos.gr"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Home",
            "item": "https://www.tassos.gr/docs"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Tassos Code Snippets",
            "item": "https://www.tassos.gr/docs/code-snippets"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Functionality",
            "item": "https://www.tassos.gr/docs/code-snippets/functionality"
        },
        {
            "@type": "ListItem",
            "position": 5,
            "name": "Import and Export Snippets",
            "item": "https://www.tassos.gr/docs/code-snippets/functionality/import-export"
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://www.tassos.gr/docs/code-snippets/functionality/import-export"
    },
    "headline": "Import and Export Snippets",
    "image": {
        "@type": "ImageObject",
        "url": "https://www.tassos.gr/"
    },
    "publisher": {
        "@type": "Organization",
        "name": "Tassos",
        "logo": {
            "@type": "ImageObject",
            "url": "https://www.tassos.gr/https://www.tassos.gr/media/brand/logo-text.png"
        }
    },
    "author": {
        "@type": "Person",
        "name": "Tassos Marinos",
        "url": "https://www.tassos.gr/docs/code-snippets/functionality/import-export"
    },
    "datePublished": "2026-03-06T13:10:45+02:00",
    "dateCreated": "2026-03-06T13:10:45+02:00",
    "dateModified": "2026-03-06T13:31:45+02:00"
}
```
