> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.weltpixel.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# WeltPixel Backend Module Downgraded After Composer Update When Using Multiple Repositories

## Problem

After running a Composer update — for example, when installing or updating the GA4 PRO module — you may notice that the `weltpixel/m2-weltpixel-backend` module is unexpectedly downgraded to an older version. Running `bin/composer show weltpixel/m2-weltpixel-backend --all` confirms that the currently installed version is lower than what is available from the WeltPixel repository.

This happens when your `composer.json` includes both the WeltPixel Composer repository and the Magento Marketplace repository (`repo.magento.com`). Because the Magento Marketplace also hosts a copy of the `weltpixel/m2-weltpixel-backend` package, Composer resolves the package from whichever repository is listed **first**. If the Magento Marketplace repository appears before the WeltPixel repository, Composer will use the Magento-hosted version, which may be behind the latest release available from WeltPixel.

## Solution

There are two ways to fix this, depending on whether your project still requires the Magento Marketplace repository.

### Option 1: Remove the Magento Marketplace Repository (Recommended)

If your project does not require any packages from `repo.magento.com` (e.g., you are not using Adobe Commerce or Magento Marketplace extensions beyond WeltPixel), you can remove the Magento Marketplace repository entry from `composer.json` entirely. This eliminates the conflict.

### Option 2: Move the WeltPixel Repository Above the Magento Marketplace Repository

If your project does require `repo.magento.com`, ensure the WeltPixel repository is listed **before** it in the `repositories` section of your `composer.json` file. Composer resolves packages from repositories in the order they are listed, so placing the WeltPixel repository first ensures it takes priority.

**Incorrect order (causes downgrade):**

```json
"repositories": [
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    {
        "type": "composer",
        "url": "https://weltpixel.repo.packagist.com/YOUR-REPO-KEY/"
    }
]
```

**Correct order (resolves latest version from WeltPixel):**

```json
"repositories": [
    {
        "type": "composer",
        "url": "https://weltpixel.repo.packagist.com/YOUR-REPO-KEY/"
    },
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    }
]
```

After making either change, run the following commands to update the module and apply the changes:

```bash
bin/composer update weltpixel/m2-weltpixel-backend
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush
```

## Verification

Confirm that the latest version of the Backend module is now installed by running:

```bash
bin/composer show weltpixel/m2-weltpixel-backend
```

The `versions` field should show the latest available release as the currently active version (marked with `*`). No downgrade messages should appear the next time you run `composer update`.
