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

# Upgrading to Spree 5.1

> This guide covers upgrading a Spree 5.0 application to Spree 5.1.

<Info>
  Before proceeding to upgrade, please ensure you're at [Spree 5.0](/developer/upgrades/4.10-to-5.0)
</Info>

## Upgrade steps

### 1. Update gems

```bash theme={"theme":"night-owl"}
bundle update
```

### 2. Install and run missing migrations

```bash theme={"theme":"night-owl"}
bin/rake spree:install:migrations && bin/rails db:migrate
```

### 3. Migrate admin user accounts to the new system

Spree 5.1 introduces a new better way of managing admin user accounts. To ensure your existing admin user accounts are migrated to the new system, run the following command:

```bash theme={"theme":"night-owl"}
bin/rake db:migrate_admin_users_to_role_users
```
