# Production Deployment & Installation

Follow these professional steps to deploy the Tuition Management System (TMS) to your live hosting environment.

## 1. Prepare for Hosting
1. Compress all project files into a single **ZIP** archive.
2. Ensure you include the `.htaccess` files (important for routing).

## 2. Upload and Extract
1. Log in to your Hosting Control Panel (cPanel, DirectAdmin, etc.).
2. Open **File Manager** and navigate to your target directory (e.g., `public_html/tms`).
3. **Upload** your ZIP file.
4. **Extract** the files directly into that folder.

## 3. Run the Installation Wizard
1. Open your web browser and navigate to your domain followed by `/install` (e.g., `https://yourdomain.com/install`).
2. The **TMS Setup Wizard** will appear.
3. Fill in the required details:
   - **Application URL:** The correct URL to access your system.
   - **Database Details:** Your MySQL Host, Database Name, Username, and Password.
   - **Admin Account:** The email and secure password you want to use for the super admin account.

## 4. Complete Setup
1. Click **Install & Setup Database**. The wizard will automatically configure your database and create your admin account.
2. **Auto-Lock Security:** Once successful, the system automatically creates an `installed.lock` file in your root directory. This disables the installation wizard permanently to protect your system from being overwritten. (If you ever need to reinstall, you must manually delete this `.lock` file first).

## 5. Verification
Visit your domain in the browser. You should now see the welcome screen and be able to log in using the Admin credentials you just created. If you see a 404 error on assets, ensure `mod_rewrite` is enabled on your server and the `.htaccess` file is present in the root.
