> ## 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 4.3

> Upgrade a Spree 4.2 application to Spree 4.3 — split out spree_emails, spree_backend, and spree_frontend gems, remove merged extensions, and run migrations.

<Note>
  If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally, eg.

  1. [upgrade 3.7 to 4.0](3.7-to-4.0)
  2. [upgrade 4.0 to 4.1](4.0-to-4.1)
  3. [upgrade 4.1 to 4.2](4.1-to-4.2)
</Note>

## Update Gemfile

Since Spree 4.3 `spree` gem doesn't include `spree_emails`, `spree_backend` and `spree_frontend` gems. It only consists of Spree Core and Spree API.

You need to add them to your Gemfile if you want to use them.

```bash theme={"theme":"night-owl"}
bundle add spree_emails spree_backend spree_frontend
```

## Remove gems merged into Spree Core

These gems were merged into Spree Core in version 4.3. All of their functionality is now included in the `spree` gem so you can remove them.

### Optional Remove SpreeMultiDomain

If you used that gem in the past you need to remove it.

1. Remove `spree_multi_domain` from your `Gemfile`

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

2. Remove `//= require spree/frontend/spree_multi_domain` from `vendor/assets/javascripts/spree/frontend/all.js`

3. Remove `//= require spree/backend/spree_multi_domain` from `vendor/assets/javascripts/spree/backend/all.js`

### Optional Remove Spree Editor

Spree 4.3 includes TinyMCE 5 editor built-in. It's not recommended to use `spree_editor` gem anymore.

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

### Optional Remove Spree Static Content

Spree 4.3 includes a built-in CMS. It's not recommended to use `spree_static_content`

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

## Install missing migrations

```bash theme={"theme":"night-owl"}
rake railties:install:migrations
```

## Run migrations

```bash theme={"theme":"night-owl"}
bin/rails db:migrate
```

## Additional fixes and hints

### Upgrade Sprockets to v4

In your project create  `app/assets/config/manifest.jss` file with contents:

```ruby theme={"theme":"night-owl"}
//= link_tree ../images
//= link_tree ../javascripts
//= link_directory ../stylesheets .css
```

More [on this topic](https://github.com/rails/sprockets/blob/main/UPGRADING.md#manifestjs).

### Admin Panel fix

If you've developed custom features for your Admin Panel, please replace any occurrences of

```ruby theme={"theme":"night-owl"}
render partial: 'spree/shared/error_messages'
```

to

```ruby theme={"theme":"night-owl"}
render partial: 'spree/admin/shared/error_messages'
```

## Read the release notes

For information about changes contained within this release, please read the [Release notes](https://github.com/spree/spree/releases/v4.3.0).
