> For the complete documentation index, see [llms.txt](https://docs.uxwizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uxwizz.com/guides/troubleshooting/dashboard/updating-fails.md).

# Updating Fails

Before updating, back up the database and application configuration and check that you can restore them. Keep the update log when a failure occurs. Do not bypass integrity or HTTPS checks, delete the database, or repeatedly rerun setup to resolve an update error.

On current versions, check available disk space, the downloaded package, the PHP error log, and write access for the path named in the error. Server and database repairs require administrator access. If the update changed files before failing, preserve the logs and backups and contact [support](/guides/support.md) with the installed version and redacted error.

The URL replacement below applies only to the older versions stated in its heading. It is not a general fix for an integrity mismatch on a current version.

## Problem - File integrity check failed:

{% hint style="warning" %}
Warning: file\_get\_contents(**<https://raw.githubusercontent.com/UXWizz/update-integrity-check/master/v6/latest-version-hash?token=1733905913>**): failed to open stream: HTTP request failed! **HTTP/1.1 404 Not Found** in **/var/www/html/server/helpers/update/update.php** on line 102 Expected hash: Remote hash: e64a580cb8d471609a18387a8737dbf1c8c5b4dc75dc4634bef1d5a7299dbe1d File integrity check failed. Update process stopped.
{% endhint %}

### Why this happens:

For **security**, the updater checks each new **.zip** update file against a remote **GitHub** repository that contains the integrity hash for that version's downloadable archive. If the hash of the downloaded file is different to the integrity hash in the GitHub repository, the updater will stop the update process.

### Issue with versions older than 7.0.2:

{% hint style="danger" %}
**These older versions use an obsolete integrity-check URL.**\
**Updating will fail with the old check URL, you have to manually fix the URL.**
{% endhint %}

### Solution (if you are on version between 5.5.1 than 7.0.2):

{% hint style="success" %}

#### Please do this single step to fix the updater:

In the file /var/www/htm&#x6C;**/server/helpers/update/update.php**\
\
**Replace this line (Line #72 or near it)**:

{% code title="Old integrity check URL" %}

```php
$HASH_CHECK_URL = 'https://raw.githubusercontent.com/UXWizz/update-integrity-check/master/v6/latest-version-hash';
```

{% endcode %}

\
**With this one (version ≥ 5.5.1):**

{% code title="New integrity check URL" %}

```php
$HASH_CHECK_URL = 'https://uxwizz.github.io/update-integrity-check/v6/latest-version-hash';
```

{% endcode %}
{% endhint %}

{% hint style="warning" %}
For **versions older than 5.5.1**, you need to first use this intermediate URL to **update to 5.5.1 first**:<br>

**Replace with this line on versions older than 5.5.1:**

{% code title="New integrity check URL" %}

```php
$HASH_CHECK_URL = 'https://uxwizz.github.io/update-integrity-check/latest-version-hash';
```

{% endcode %}

If you started below 5.5.1, complete the update to 5.5.1 and finish setup. Then apply the URL fix again, this time using the `/v6/` URL, before updating further. Installing 5.5.1 replaces the updater file you previously edited.
{% endhint %}
