---
title: "Upgrade Notes"
manual: "Plesk Widget"
version: "5.0"
permalink: "https://docs.typo3.org/permalink/stefanfroemken/plesk-widget:upgrade@5.0"
source: "Upgrade.rst"
rendered: "2026-12-05T01:46:04+00:00"
---

# Upgrade Notes {#upgrade}

This document provides important information for upgrading the `plesk_widget`
extension to newer versions. Please read the relevant sections carefully before
performing an upgrade, especially if you are skipping multiple major versions.

## General upgrade advice {#upgrade-general}

-   Always create a backup of your TYPO3 installation and database before upgrading.
-   Test upgrades on a development or staging environment first.
-   Clear all TYPO3 caches (frontend and backend) after an upgrade.
-   Run the "Upgrade Wizards" in the TYPO3 Install Tool if available.

## Migration from credentials to Plesk API token {#upgrade-token-authentication}

The `tx_pleskwidget_server` table now stores an encrypted Plesk API Secret Key
in the `token` column instead of persisting `username` and `password` in the
database.

The `username` and `password` fields in the backend form are now non-persistent
fields. When both are filled on save, `DataHandlerHook` connects to the Plesk
server, requests a Secret Key, and stores it encrypted in `token`.

> [!WARNING]
> Follow the upgrade order below strictly. Dropping `username` and
> `password` before running the UpgradeWizard prevents automated migration of
> existing server records.

### Required upgrade steps {#upgrade-token-authentication-steps}

1.  **Add the \`token\` column only (do not drop \`username\` and \`password\`):**

    Update the database schema via **Admin Tools > Maintenance >
    Analyze Database Structure** or via CLI:

    ```bash
    vendor/bin/typo3 database:updateschema
    ```

    Apply **only** the addition of the new `token` column. **Do not drop the
    \`username\` and \`password\` columns yet.** The UpgradeWizard requires
    `username`, `password`, and `token` columns to exist in
    `tx_pleskwidget_server` simultaneously.
1.  **Run the UpgradeWizard \`pleskWidget_migrateCredentialsToToken\`:**

    Execute the UpgradeWizard in the TYPO3 backend under
    **Admin Tools > Upgrade > Upgrade Wizard** or via CLI:

    ```bash
    vendor/bin/typo3 upgrade:run pleskWidget_migrateCredentialsToToken
    ```

    The wizard decrypts each stored `password` and re-saves the record via
    `DataHandler`, which triggers `DataHandlerHook` to request a Secret Key
    via the Plesk REST API (`POST /api/v2/auth/keys`) and
    store it encrypted in `token`.

    > [!NOTE]
    > During this step, the TYPO3 server must be able to reach the configured
    > Plesk servers. Plesk Secret Keys are bound to the outgoing IP address of
    > the requesting TYPO3 server.
1.  **Drop obsolete columns after migration:**

    Only **after** the UpgradeWizard has successfully migrated all records, run
    the database schema cleanup again (`Analyze Database Structure` or
    `database:updateschema`) to remove the obsolete `username` and `password`
    columns.

## Migration of Extension Configuration {#upgrade-configuration-migration}

With the upgrade from version 3.x to 4.0.0, the way the `plesk_widget`
extension is configured fundamentally changed.

Previously, global settings for Plesk server access (host, port, username,
password, and the domain for PHP settings) were managed through the
TYPO3 Install Tool (extension configuration). Additionally, the
`diskUsageType` (%, MB, or GB) was also a global setting.

These global settings have been removed in favor of a more flexible,
record-based configuration.

### Breaking changes {#upgrade-breaking-changes}

-   **Removed Global Extension Settings:** The global extension settings for
    Plesk server access (`host`, `port`, `username`, `password`, `domain`)
    and `diskUsageType` are no longer available.
-   **Plesk API Library Update:** The underlying `plesk/api-php-lib` dependency
    has been updated from version 1.1.2 to 2.2.1. This updated version is also
    directly included for Classic/ZIP package installations.

### Migration steps {#upgrade-migration-steps}

1.  **Create Plesk Server Records:** You must now create dedicated "Plesk Server"
    records in the TYPO3 backend. These records (stored in the
    `tx_pleskwidget_server` table) can only be created on the root page (PID 0)
    and are therefore only manageable by a TYPO3 administrator. They will hold
    the `host`, `port`, `username`, `password`, and `domain` for each Plesk
    server you wish to monitor.
1.  **Configure Widgets Individually:** The `diskUsageType` setting is now
    configured directly within each individual Dashboard Widget. When adding
    or editing a Plesk widget, you will select the desired Plesk Server record
    and specify the disk usage display type.

**Important:** There is no automated upgrade wizard for this configuration
migration. Users of the extension must manually re-create their Plesk server
configurations as records and adjust their Dashboard Widgets accordingly.
