Top

Wapi documentation

## Chat, collaborate, and create teams effortlessly with Wapi

#### Deploying Wapi on cPanel

We don’t recommend deploying the Wapi backend on cPanel because it doesn’t provide the flexibility or runtime control needed to manage background services and real-time functionalities effectively.

#### Prerequisites

- -cPanel Hosting: Ensure your hosting plan supports Node.js and has sufficient resources.

- -FTP Access: Obtain FTP credentials for file uploads.

- -Domain Configuration: Verify that your domain is correctly pointed to your cPanel account.

### Frontend Deployment (React + Vite)

#### Step 1: Configure Vite for Production

- export default defineConfig({
- base: 'https://yourdomain.com/',
- });

#### Step 2: Build the Application

- npm install
- npm run build

#### Step 3: Upload to cPanel

- -Log in to cPanel and navigate to File Manager.

- -Go to the public_html directory (or subdirectory for subdomain).
- -Click Upload and select the dist.zip file.
- -Extract the uploaded zip file.

#### Step 4: Configure .htaccess for SPA Routing

<ul>
<li>IfModule mod_rewrite.c</li>
<li>RewriteEngine On</li>
<li>RewriteBase /</li>
<li>RewriteRule ^index\.html$ - [L]</li>
<li>RewriteCond %{REQUEST_FILENAME} !-f</li>
<li>RewriteCond %{REQUEST_FILENAME} !-d</li>
<li>RewriteCond %{REQUEST_FILENAME} !-l</li>
<li>RewriteRule . /index.html [L]</li>
<li>IfModule</li>
</ul>

## What's Next?

Let’s get started — your team’s new home is Wapi Chat!

### Prerequisite

Required tools and setup

### Deploy on VPS

VPS deployment setup guide

### Deploy on Vercel

Vercel deployment guide steps