# Updating

Move to a new release without losing player photos.

## Before you start

Back up your database and your `server_config.lua` and `config.lua`. Upgrades never touch stored photos, but a backup makes going back easy.

## 1. Replace the resource

1. Stop your server.
2. Delete the old `wd_richpresence` folder, but keep your `config.lua` and `server_config.lua`, and keep the `images/` folder if you self-host photos.
3. Copy in the new version, then put your configuration files back.

Compare your files with the new ones. Version 1.1.0 adds settings that are missing from a 1.0.0 config, and missing settings fall back to their defaults.

## 2. Update the database

Run this once on your database when upgrading from **1.0.0** to **1.1.0**. It renames one column:

```sql Upgrade 1.0.0 to 1.1.0
ALTER TABLE `wd_richpresence_mugshots` CHANGE `message_id` `remote_id` VARCHAR(64) NULL DEFAULT NULL;
```

If your table already has a `remote_id` column, this step is done and you can skip it.

## 3. If you used Discord webhooks

Webhook hosting was removed in 1.1.0, because those photos never displayed correctly on Discord. Set `ServerConfig.ImageHost` to `'fivemanage'` or `'self'` and set that host up, as described in [Image hosting](#/docs/wd_richpresence/image-hosting). Each character's photo is taken again on the new host the next time they load in. There is nothing to migrate.

## 4. Check your presence messages

Location is off by default in 1.1.0. If you want street and zone in your messages, set `ShowLocation = true` in `config.lua`. While it is off, the default `Near {street}, {zone}` message is skipped. See [Presence text](#/docs/wd_richpresence/presence).

## 5. Start and check

1. Start the server and read the console. There should be no `Mugshots disabled` or `uploads will fail` message.
2. Load a character and confirm the photo appears after a few seconds.

See [Troubleshooting](#/docs/wd_richpresence/troubleshooting) if something looks wrong, and [Changelog](#/docs/wd_richpresence/changelog) for everything that changed.
