- cPanel Server Access with your eCommerce API (Boom Commerce/WooCommerce)
- Node.js 18+ installed on your server
- Domain name configured and pointing to your server
- Log in to your WordPress admin panel
- Go to WooCommerce → Settings → Advanced → REST API
- Click Add Key to create new API credentials
- Set permissions to Read/Write
- Copy the Consumer Key and Consumer Secret
Edit .env.production file:
NEXT_PUBLIC_API_URL=https://yourdomain.com/wp-json/wc/v3
NEXT_PUBLIC_WC_CONSUMER_KEY=ck_xxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_WC_CONSUMER_SECRET=cs_xxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_SITE_URL=https://yourdomain.com# Install dependencies
npm install
# Test with production environment
npm run build
npm startVisit http://localhost:3000 and verify products load from your server.
# Create optimized production build
npm run build
# This creates a .next folder with your production-ready files-
Log in to cPanel
-
Go to Software → Setup Node.js App
-
Click Create Application
-
Configure:
- Node.js version: 18.0 or higher
- Application mode: Production
- Application root: /home/username/sirizone-marketplace
- Application URL: yourdomain.com
- Application startup file: server.js
-
Click Create
-
Upload your files via FTP or File Manager to the application root
-
In the Node.js App interface, click Run NPM Install
-
Add environment variables in the interface
-
Click Restart to start your app
If your cPanel doesn't support Node.js apps well, use static export:
- Update
next.config.ts:
const nextConfig = {
output: 'export',
images: {
unoptimized: true,
},
};
export default nextConfig;- Build static version:
npm run build-
Upload the
outfolder contents to yourpublic_htmldirectory via FTP -
Configure
.htaccessfor clean URLs:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.html [L]- In cPanel, go to Security → SSL/TLS Status
- Install SSL certificate for your domain (free Let's Encrypt)
- Force HTTPS redirect in
.htaccess:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Visit your domain and verify:
- ✅ Site loads correctly
- ✅ Products display from your server API
- ✅ Images load properly
- ✅ Search works
- ✅ Cart functionality works
- ✅ SSL certificate is active (https://)
Your WooCommerce API should provide these endpoints:
- Products:
/wp-json/wc/v3/products - Categories:
/wp-json/wc/v3/products/categories - Orders:
/wp-json/wc/v3/orders - Customers:
/wp-json/wc/v3/customers
Test API endpoint:
curl -u consumer_key:consumer_secret https://yourdomain.com/wp-json/wc/v3/products- Check API credentials in
.env.production - Verify WooCommerce REST API is enabled
- Check CORS settings on your WordPress site
- Review browser console for errors
- Update image paths to use absolute URLs
- Check
next.config.tsimage configuration - Verify image URLs from API are accessible
- Configure
.htaccessrewrite rules - Check Next.js routing configuration
- Verify base path in
next.config.ts
- Enable caching in cPanel
- Use CDN for static assets
- Optimize images before upload
- Enable Gzip compression in cPanel
- Configure Redis if available for API caching
- ✅ SSL certificate installed
- ✅ API keys stored in environment variables (not in code)
- ✅ CORS properly configured
- ✅ Rate limiting enabled on API
- ✅ Input validation on all forms
- ✅ Security headers configured
Check the API integration at: src/lib/api.ts
For WooCommerce API documentation: https://woocommerce.github.io/woocommerce-rest-api-docs/