Chapter 3: Installation & Deployment Guide
Deploying MartX Enterprise Platform is effortless. Built with an intuitive WordPress-style 5-Step Web Installation Wizard, merchants and agencies can launch a production-ready store within 3 minutes without touching command-line scripts.
3.1 Deployment Pathways & Pre-Installation Checklist
Choose the deployment pathway that best matches your hosting infrastructure:
| Deployment Method | Target Infrastructure | Skill Level | Setup Time | Recommended For |
|---|---|---|---|---|
| cPanel Quick Deploy | cPanel / DirectAdmin / Plesk | Standard | 5 Mins | Shared hosting users using File Manager and MySQL Wizard. |
| 5-Step Web Wizard | cPanel / Shared / VPS / Localhost | No-Code (Beginner) | 3 Mins | All store owners, designers, and standard marketplace buyers. |
| VPS CLI / DevOps | Ubuntu / Debian / Nginx / Forge | Advanced | 4 Mins | Agencies, high-traffic stores, and continuous deployment workflows. |
| phpMyAdmin Fallback | Any MySQL GUI / Offline Localhost | Manual Fallback | 5 Mins | Environments where automated migrations encounter timeout restrictions. |
Pre-Installation Checklist (Have These Ready)
- Product License Key: Your official Product License Key or Order ID from your authorized marketplace or direct purchase invoice.
- MySQL Database Credentials: Database Host (usually
127.0.0.1orlocalhost), Database Name, Database Username, and Password. - PHP 8.2+ Environment: Server meets the 13 mandatory PHP extensions outlined in Chapter 2.
3.2 cPanel & Shared Hosting 5-Minute Quick Setup
Before launching the browser installer, upload the application files and configure your MySQL database in cPanel:
Step 1: Upload and Extract Zip Archive
Open cPanel → File Manager, navigate to your desired directory (e.g. /public_html for primary domain, or a subfolder like /public_html/your-subfolder), upload the official martx-v1.0.0.zip file, right-click and choose Extract.
.htaccess or .env.example files after extracting, they are hidden by default in Linux. Click Settings (gear icon) at the top-right of cPanel File Manager → check "Show Hidden Files (dotfiles)" → click Save. (Note: Your active .env file is automatically created when you run the web installer).
Step 2: Configure DocumentRoot to Point to public/
Laravel applications require web traffic to resolve in the public/ folder:
- Subdomains & Addon Domains: In cPanel → Domains → Document Root, set the path to
public_html/publicorpublic_html/subdomain_name/public. - Primary Main Domain (Root): Either configure the Primary Document Root in cPanel, or place files in root and point the web root to
public/.
Step 3: MultiPHP Manager & Version Selection
In cPanel → MultiPHP Manager, select your domain and choose PHP 8.2 or PHP 8.3.
Step 4: Create MySQL Database via cPanel Wizard
In cPanel → MySQL Database Wizard:
- Create a new Database (e.g.,
cpaneluser_martx). - Create a Database User with a strong password.
- Assign ALL PRIVILEGES to the user for that database.
Step 5: Proceed to Web Installer Wizard
Once your files are extracted and database credentials are created, open your browser and visit https://yourdomain.com/install to complete the 5-step visual installer below!
3.3 The 5-Step Visual Web Installation Wizard Walkthrough
When you open https://yourdomain.com/install, the automated wizard will guide you through 5 progressive screens:
Visual Flowchart: 5-Step Automated Web Installation Pipeline
The automated browser wizard inspects and prepares your server in 5 progressive, fail-safe phases:
Requirements
PHP 8.2+ • 13 Extensions
Permissions
Storage • Cache • .env
License Check
Marketplace Code • Email
Database Setup
Schema Migration • Seeds
Admin Provision
Super Admin • Lockfile
Step 1: Welcome & Server Requirements Audit
MartX automatically checks your active PHP version and confirms that all 13 required extensions (BCMath, cURL, DOM, Fileinfo, JSON, Mbstring, OpenSSL, PDO, Tokenizer, etc.) are compiled into your PHP runtime.
Step 2: Storage & Cache Permissions Audit
The wizard verifies that storage/app, storage/framework/cache, storage/logs, and bootstrap/cache possess write permissions (0775 / 0755).
storage/app
Writable (775)
storage/framework/cache
Writable (775)
storage/logs
Writable (775)
bootstrap/cache & .env
Writable (775/644)
Step 3: Select Marketplace & Verify License
Select the official marketplace where you acquired your license and provide your purchase key:
First-Time Buyer or Lost Your License Key?
Open License Portal (license.getmartx.com)If you recently purchased MartX from an authorized marketplace or sales partner and do not have your official License Key, you do not need to wait for author support tickets. You can claim or retrieve your credentials instantly through our 24/7 self-service portal:
- Instant 3-Input Claim (New Buyers): Visit license.getmartx.com → submit your (1) Purchase Code / Order ID, (2) Marketplace Username, and (3) Marketplace Channel to create your permanent portal account.
- Direct Portal Login (Existing Accounts): Sign in with your registered email and password to view all your active license keys and bound domains.
- 1-Click Key Copy: Copy your verified License Key directly from the portal dashboard card and paste it into the field above!
Step 4: Database Connection & Migration Execution
Input your MySQL credentials and test the live connection with 1-click AJAX validation:
url('/') and configures APP_ENV=production with APP_DEBUG=false; no manual .env file editing required!
Step 5: Super Administrator Provisioning
Set up your primary merchant root login. This account is provisioned with all 77 RBAC permissions:
Congratulations! Installation Completed
MartX Enterprise E-Commerce Platform has been successfully configured and secured. The security lock file has been registered at storage/installed, automatically blocking any future re-installation attempts.
3.4 Ubuntu VPS & Developer CLI Installation
Optional • For DevOps & Cloud Engineershttps://yourdomain.com/install (detailed in Sections 3.2 & 3.3).
For agencies, DevOps engineers, and cloud administrators deploying via SSH terminal, MartX provides a dedicated interactive CLI installation command allowing complete setup directly from the command-line without opening a web browser:
1. Environment & Key
Copy the environment template and generate your application's unique encryption key (APP_KEY):
cp .env.example .env
php artisan key:generate
Secures cookie encryptions, user sessions, and signed routes.
2. Database & Domain
Create a MySQL database and update your credentials and live domain in .env:
nano .env
APP_URL=https://yourdomain.com
DB_HOST=127.0.0.1
DB_DATABASE=your_database_name
DB_USERNAME=your_database_user
DB_PASSWORD=your_database_password
Ensures migrations connect to the right MySQL database and links render with your live domain.
3. Run MartX CLI Installer
Execute the automated terminal setup command in interactive mode:
php artisan martx:install
Guides you through purchase code check, runs migrations, seeds catalogs, and sets up Super Admin.
4. License & Verification
Input your Purchase Code and Buyer Email when prompted by the CLI installer:
# Interactive prompt inputs:
Enter License Key: YOUR-PURCHASE-CODE
Enter Buyer Email: [email protected]
Secures live domain locking with 7-day heartbeat cache protection.
Headless CI/CD & Automated 1-Liner Deployment
You can also pass flags directly to martx:install for zero-prompt, fully unattended CI/CD deployment pipelines:
php artisan martx:install --license="YOUR-PURCHASE-CODE" --email="[email protected]" --admin-email="[email protected]" --admin-password="YourStrongPassword123" --app-url="https://yourdomain.com"
Alternative: Manual Terminal Migration & In-Dashboard Activation
Manual WorkflowIf you prefer running standard Laravel migration and seeding commands directly, and activating your license later via the Admin Dashboard:
Database & Key
Initialize environment, generate application key, and set DB:
cp .env.example .env
php artisan key:generate
nano .env
Migrate & Seed
Run schema migrations, catalog seeders, and link media storage:
php artisan migrate:fresh --seed --force
php artisan storage:link
Lock Installation
Mark setup complete to bypass web installer on browser hits:
touch storage/installed
php artisan optimize:clear
License Activation
Login as Super Admin and activate license in dashboard:
php artisan martx:activate --key=MARTX-PRO-KEYUbuntu Server Permissions & Symlink Script
# 1. Navigate to project root
cd /var/www/html/martx
# 2. Install production dependencies
composer install --no-dev --optimize-autoloader --no-interaction
# 3. Create storage symlink
php artisan storage:link
# 4. Set web server permissions
sudo chown -R www-data:www-data /var/www/html/martx
sudo find /var/www/html/martx -type f -exec chmod 644 {} \;
sudo find /var/www/html/martx -type d -exec chmod 755 {} \;
sudo chmod -R 775 storage bootstrap/cache
# 5. Compile production performance caches
php artisan optimize
3.5 Storage Symlink (storage:link) 3-Tier Multi-Layer Architecture
Product photography, banner slides, and customer invoices are securely stored in storage/app/public/. To make them visible to web visitors, a symbolic link must exist between public/storage and storage/app/public. MartX provides a comprehensive 3-tier fail-safe solution:
100% Automatic at Install
Built-in WordPress-style automation. The Web Installer (Step 5) and CLI command (martx:install) silently create the symlink during setup. 95% of store owners never need to touch anything!
1-Click In-Dashboard Fix
If you ever migrate hosting or restore a cPanel backup, go to Admin Sidebar → Administration & Settings → System Settings → "Theme & Appearance" (Tab). The live health badge indicates symlink status, with a 1-click "Generate Public Symlink" button.
Terminal & cPanel Cron
For DevOps engineers on SSH or servers with locked functions, run php artisan storage:link or create a 1-time cPanel cron task: /usr/local/bin/php /path/artisan storage:link.
3.6 Subdomain, SSL (HTTPS) & APP_URL Configuration Standards
To prevent Mixed Content warnings and CSRF security token mismatches, ensure your environment URL strictly matches your live domain protocol:
| Deployment Type | Recommended Pattern | Target APP_URL in .env |
|---|---|---|
| Primary Root Domain | https://yourstore.com |
APP_URL=https://yourstore.com |
| Dedicated Subdomain (Recommended) | https://shop.yourdomain.com |
APP_URL=https://shop.yourdomain.com |
| Local Development | http://martx.test or http://localhost:8000 |
APP_URL=http://martx.test |
3.7 Post-Installation Security Hardening & Lock Verification
Once the 5-step installer wizard completes, the system executes an automated security lockdown to safeguard your store:
Automatic Installer Lockdown Engine
The installer writes the file storage/installed and establishes secure verification tokens. Subsequent requests to /install are permanently blocked and redirected to the home storefront to prevent unauthorized database resets.
Production 1-Click Optimization Command
For optimal production performance and lower server response latency, run the optimization compilation command once your setup is complete:
# Clear and rebuild all compiled routes, configs, and Blade views
php artisan optimize
php artisan optimize after your .env settings and testing are finalized. If you modify your .env file in the future, remember to clear cached configurations by running php artisan optimize:clear.