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.zipis the website source code.MySQL\<date>_<name>.sqlandSQLServer\<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
- Export (back up) the website database (phpMyAdmin or SSMS).
- Copy the entire website folder to a safe place, at minimum:
APP/Config,private,public/uploads,public/storage,runtime, andpublic/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
- Extract the new zip on your computer (or into a temporary folder on the hosting, for example
public_html/_moi). - Delete from the extracted folder:
APP/Config/database.php,APP/Config/api.php,APP/Config/app.php. - Copy everything that remains over
public_html(using FTP or File Manager, choose overwrite). - If you used a temporary folder on the hosting, delete it once copying is finished.
Step 2b. Update on Windows Server (IIS)
- Extract
packages\WebHosting.zipfrom the new package into a temporary folder. - Delete from the temporary folder:
APP\Config\database.php,APP\Config\api.php,APP\Config\app.php,public\web.config. - Copy the rest over the
Websitefolder inside the installation folder (defaultC:\TSWMU\Website). - Do not run TswSetup again to update: once the website is installed (
private\installed.jsonexists), the setup page will not run again.
Step 3. Update the database (if the package has SQL files)
- Open the
.sqlfile matching your database type: theMySQLfolder for cPanel,SQLServerfor IIS. - Run it on the website database (not the game database): phpMyAdmin > select the database > Import (MySQL); or SSMS /
sqlcmd(SQL Server, the file uses theGOcommand). - 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
- Open the home page, try logging in, and open
/admin. - 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.
- If the interface does not change, delete the files in
runtime/cacheand reload the page (Ctrl+F5). - 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).