The website does not update itself. For each update, the new package is located in the Update\<date>\Web folder of the release package:

  • Hosting\TSWMU_Web_cPanel_<code>.zip: website source code (used for cPanel and also for updating the source code).
  • Server_IIS\TSWMU_Web_WindowsServer_<code>.zip: Windows installer; inside it, packages\WebHosting.zip is the website source code.
  • MySQL\<date>_<name>.sql and SQLServer\<date>_<name>.sql: commands to upgrade the website database (only present when that update changes the database).
The web package always contains empty configuration files (APP/Config/database.php, api.php, app.php). If you extract it over a running website, these files are overwritten with empty versions and the website loses its connection to the database and START. Follow the steps below carefully.

Step 1. Back up

  1. Export (back up) the website database (phpMyAdmin or SSMS).
  2. Copy the entire website folder to a safe place, at minimum: APP/Config, private, public/uploads, public/storage, runtime, and public/web.config (IIS).

Files and folders that must NOT be overwritten

Path Contents
APP/Config/database.php Website database connection (includes the password)
APP/Config/api.php START API address and Key (and the server list if you run multiple servers)
APP/Config/app.php Website name, address, mode, login session name
private/ installed.json (installed marker), email configuration portal-mail.php
runtime/ Sessions, cache, logs, temporary data
public/uploads/, public/storage/ Uploaded images and files
public/web.config (IIS only) Contains the php-cgi.exe path that the installer adjusted to your PHP installation folder

Step 2a. Update on cPanel

  1. Extract the new zip on your computer (or into a temporary folder on the hosting, for example public_html/_moi).
  2. Delete from the extracted folder: APP/Config/database.php, APP/Config/api.php, APP/Config/app.php.
  3. Copy everything that remains over public_html (using FTP or File Manager, choose overwrite).
  4. If you used a temporary folder on the hosting, delete it once copying is finished.

Step 2b. Update on Windows Server (IIS)

  1. Extract packages\WebHosting.zip from the new package into a temporary folder.
  2. Delete from the temporary folder: APP\Config\database.php, APP\Config\api.php, APP\Config\app.php, public\web.config.
  3. Copy the rest over the Website folder inside the installation folder (default C:\TSWMU\Website).
  4. Do not run TswSetup again to update: once the website is installed (private\installed.json exists), the setup page will not run again.

Step 3. Update the database (if the package has SQL files)

  1. Open the .sql file matching your database type: the MySQL folder for cPanel, SQLServer for IIS.
  2. Run it on the website database (not the game database): phpMyAdmin > select the database > Import (MySQL); or SSMS / sqlcmd (SQL Server, the file uses the GO command).
  3. These files are written so they can be run repeatedly without errors.
Some minor changes (for example the server_id column for news when multiple servers are enabled) are added automatically by the website when needed. The SQL files are for running manually when the website's database account does not have ALTER permission.

Step 4. Verify after updating

  1. Open the home page, try logging in, and open /admin.
  2. START > Website Management > Connection > Test connection: both directions must be OK. If it reports Hosting has not been updated to the START-supported version, the website source code was not updated correctly.
  3. If the interface does not change, delete the files in runtime/cache and reload the page (Ctrl+F5).
  4. If you get a 500 error or a blank page: check runtime/logs/php_error_<year-month>.log.

If something goes wrong, restore from the backup made in step 1 (source code and database).

You should update START and the website in the same release, because the new website may use API commands that the old START does not have (and vice versa).