Keeping it running

Updating to a new version

On this page

An update has two halves: new files, then db_update.php, which brings the database up to the new files. The addons that ship with the script are inside the package, so they are updated at the same time.

Before you start

Take a backup. With the Backup & Restore addon that is one button; without it, use cPanel Backup (or export the database in phpMyAdmin and download the site's folder). Updates are made to be safe, but a backup costs two minutes.

The manual way

  1. Download …-update.zip from your account on license.faruk.bd.
  2. In cPanel File Manager, open the site's folder, Upload the zip and Extract it over the existing files, replacing them.
  3. Sign in to the admin panel as a Super Admin.
  4. Open https://your-domain/db_update.php and press Run the update.
  5. Read the list, then press Go to the admin panel.

Use the -update.zip, not the -install.zip. The update package has no install.php, so it can never offer to install over your data. If you did unpack the full package, delete install.php again; installed.lock stops it from running in any case.

What an update never touches

Neither package contains config.php, installed.lock or the uploads/ folder, so your database details, the installation marker and every uploaded logo, photo, attachment and backup stay as they are. Extracting adds and replaces files; it deletes nothing, so an addon you installed yourself stays in plugins/.

If you edited .htaccess (for example on a host that refuses php_flag lines, see Troubleshooting), check it after extracting and make the same change again if it was replaced.

db_update.php

Only a signed-in Super Admin may run it. Anybody else sees Sign in required with a link to the admin login.

The first screen explains that it only adds what is missing and leaves your data alone, and has one button, Run the update. A run:

  • creates any table that is missing;
  • adds settings that a newer version introduced, without changing the ones you set;
  • gives the Super Admin role every permission again, so new screens reach it;
  • registers addons that arrived with the update, and switches on the new free ones;
  • adds new columns to existing tables;
  • points old licence-server addresses at https://license.faruk.bd;
  • checks that every switched-on addon has its tables, and creates them if not.

Every step is listed with its result: ✓ done, • already applied, ✗ failed with the reason. Each step runs once and is remembered, so running it again is always safe; Run again is on the page for that.

"Database update needed"

Between uploading the files and running db_update.php, the panel does not fail on a missing table. The admin panel, the dealer portal and the front page show Database update needed instead: The files have been updated to …, but the database has not been updated to match yet. Nothing is lost.

  • Signed-in staff see Run the database update, which opens db_update.php.
  • Everybody else is told that a Super Admin needs to sign in, with a Staff sign-in button.
  • Dealers working offline keep their unsent changes on their device; the sync waits until the update has run.

The sign-in pages stay open throughout. The notice goes away only when every step of db_update.php has succeeded. If it stays, run it again and read the line with the ✗.

When the panel still looks old

Every stylesheet and script address carries a version, ?v=…, which changes with the script and database version, and the offline copy kept by the Online & Offline Sync addon is named after the same version. A browser therefore fetches the new files after an update. If a page still looks or behaves like the old version:

  1. Reload with Ctrl+F5.
  2. Still old? In phpMyAdmin open the table dms_settings, find the row whose k is asset_rev (add it if it is not there) and set v to anything new, for example today's date. Every browser then fetches fresh copies of everything.

The one-click way

With the premium Script & Addon Updates addon, the sidebar gains Updates in its Addons group. Check for updates asks license.faruk.bd whether a newer version exists. Back up and update now takes a backup (the database, plus the uploads when the Backup & Restore addon is on) and sends it to the License Center before anything is replaced, then downloads the update and unpacks it. config.php, .htaccess, uploads/ and install.php are never overwritten. When it has finished it sends you to Run the database update, the same db_update.php as above.

Everything about it is in Script & Addon Updates.

After the update

  • The version is shown at the foot of the sidebar and on Admin → License under Installation.
  • New settings may have appeared on Settings or on an addon's Settings; look them over.
  • New premium addons appear on Admin → Addons, switched off until your licence carries them.
Chat with Faruk
Faruk's Assistant Online — AI Powered