> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elementlabs.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a product or the SDK

> Install a new release without losing your configuration, translations and integrations.

An update replaces a resource directory completely. Everything in it comes from the new release,
including the files you edited. This page is the procedure that keeps your work.

<Warning>
  Copy out your configuration and language files before you start. Nothing in the update copies them
  back for you.
</Warning>

## Outcome

The new release is running, your configuration and language edits are back in place, and the server
starts with no warnings.

## Prerequisites

* The new archive, downloaded from the CFX portal.
* A copy of every file you have edited. If you do not have one, make it as the first step below.
* A maintenance window. The server is restarted twice in the worst case.

## Steps

<Steps>
  <Step title="Note what you have edited" icon="list-check">
    For each resource you are updating, the files that may carry your changes are:

    | File              | Present when                                                |
    | ----------------- | ----------------------------------------------------------- |
    | `configs/*.jsonc` | Always.                                                     |
    | `locales/*.json`  | Always, if you reworded text or added a language.           |
    | `fxmanifest.lua`  | Only if you added a language and registered its file there. |

    Nothing else in the resource is yours.
  </Step>

  <Step title="Copy them out" icon="copy">
    Copy those files to a location outside `resources`. Keeping them in your own version control is
    better: it gives you a record of what changed and when.
  </Step>

  <Step title="Update the SDK first, if it is part of this update" icon="cube">
    Products accept a range of SDK versions, so a newer SDK inside that range works with the
    products you already have. A newer product, on the other hand, may require a newer SDK. Updating
    the SDK first avoids a failed start in between.

    Replace `resources/[element]/element_sdk` with the new release. The SDK has no configuration of
    its own, so nothing needs restoring.
  </Step>

  <Step title="Replace the product directory" icon="folder-tree">
    Delete `resources/[element]/element_map` and extract the new release in its place.

    <Warning>
      Do not extract over the top of the old directory: files removed in the new release would
      survive and confuse the result.
    </Warning>
  </Step>

  <Step title="Put your files back" icon="rotate-left">
    Copy your saved files into the new directory, overwriting the ones the release shipped.

    Before you do, open the release notes for the versions you skipped. If the first part of the
    version number changed, a configuration key may have been renamed or removed, and your old file
    may set keys that no longer exist.
  </Step>

  <Step title="Reinstall integrations, if the product ships them" icon="plug">
    An update replaces the `integrations` directory and the installer scripts, so run the installer
    again. See [Product integrations](/concepts/integrations).
  </Step>

  <Step title="Restart the server" icon="arrows-rotate" />
</Steps>

## Verification

The console reports a clean start for the SDK and the product. Confirm three things:

* No `[Dependencies]` error. One means the SDK version and the product no longer match. See [SDK
  version requirements](/sdk/compatibility).
* No `Config file for "…" missing or invalid` warning. One means a file you restored cannot be read.
* No out-of-date notice for the resource you updated.

If the product raised the version of a configuration namespace, restoring your older file is
expected and is reported as it is converted:

```text theme={null}
[INFO ] [    Config] [controls] migrated config v1 → v2.
```

The file on disk is not rewritten, so keep the copy as it is. Two other lines mean the conversion
did not happen and the release defaults are in use instead:

```text theme={null}
[ERROR] [    Config] [controls] missing migration step from v1 → v2; falling back to defaults.
[ERROR] [    Config] [controls] config file from newer version (3 > 2); some keys may be ignored.
```

The second appears when your file is newer than the product reading it, usually after rolling a
product back without rolling its configuration back too.

<Warning>
  Finally, check in game that your settings are in effect. A key that was renamed in the new release
  is ignored without any error, so the console alone does not prove your file still does what it
  did.
</Warning>

## Next steps

### Rolling back

Reinstall the previous release the same way, and restore the configuration files that belonged to
it. Keep one copy per product version rather than one copy in total: a configuration file from a
newer release is not usable by an older product.

### Deciding when to update

Your server reports what is behind at start:

```text theme={null}
[WARN ] [VersionCheck] element_map is outdated: v0.1.0-alpha.1 installed, v0.1.0-alpha.3 available.
```

Nothing updates itself, and nothing stops working because a newer release exists. What the version
number tells you about the size of the change is in [Releases and
versions](/concepts/releases), and what actually changed in each release is in the
[changelog](/getting-started/changelog).

## Related

* [Configuration files](/sdk/configuration)
* [Languages and text](/sdk/localization)
* [What is inside a product resource](/concepts/resources)
