Overview
Thesite command is your primary tool for managing websites on your Webinoly server. It supports creating HTML, PHP, MySQL, and WordPress sites, along with advanced features like SSL, caching, cloning, and multisite conversion.
Basic Usage
Creating Sites
HTML Site
Create a static HTML site:PHP Site
Create a PHP site:MySQL/PHP Site
Create a PHP site with MySQL database:Database configuration:
true- Interactive mode (prompts for details)[host,name,user,pass]- Unattended mode with database credentialsdefault- Use default settings (deprecated, usetrue)
WordPress Site
Create a WordPress site:WordPress installation configuration:Format:
[setupdb,setupwp,dbhost,dbname,dbuser,dbpass,dbprefix,extdbuser,extdbpass]setupdb- Create database (true/false)setupwp- Install WordPress (true/false)dbhost- Database host (localhost or IP:port)dbname- Database namedbuser- Database userdbpass- Database password (randomgenerates random password)dbprefix- WordPress table prefixextdbuser- External DB admin user (optional)extdbpass- External DB admin password (optional)
WordPress environment type:
production- Production environment (default)staging- Staging environmentdevelopment- Development environmentlocal- Local development
Empty Site
Create an empty site structure for custom Nginx configuration:Empty sites require you to add your own Nginx configuration in
/var/www/example.com/*-nginx.confParked Domain
Park a domain (point to another site):Main domain to park to
Custom root path for parked domain (optional)
Reverse Proxy
Create a reverse proxy:Proxy target:
- Port number (e.g.,
3000) - Proxies to localhost:port - Full URL (e.g.,
http://backend:8080) - Proxies to remote server
Use separate FastCGI cache for reverse proxy
Forward Domain
Forward/redirect a domain:Target domain to forward to
HTTP redirect code (301 or 302)
SSL/TLS Configuration
Enable SSL with Let’s Encrypt
SSL configuration:
on- Enable SSL with Let’s Encryptoff- Disable SSLforce-renewal- Force certificate renewalrenew- Renew all certificatesforce-renewal-all- Force renew all certificates
Request wildcard certificate (*.example.com)
Use Let’s Encrypt staging environment for testing
Add Subdomain to Wildcard Certificate
Wildcard domain certificate to use
Custom SSL Certificate
Path to SSL certificate file
Path to SSL private key file
Force HTTPS Redirect
Configure www/non-www redirect:Redirect type:
www- Force www subdomainroot- Force non-www (root domain)off- Disable forced redirect
SSL must be enabled before configuring force-redirect. Subdomains cannot use force-redirect.
FastCGI Cache
Enable Cache
Cache configuration:
on- Enable FastCGI cacheoff- Disable FastCGI cache
Custom Cache Configuration
Cache valid time (e.g.,
1h, 30m, 7d)Include WordPress cache plugin configurations
Comma-separated paths to skip caching
Comma-separated cookies that bypass cache
Query strings to include in cache key
Query strings that always bypass cache
Use default query string configuration
Reset cache configuration to defaults
Site Operations
Enable/Disable Site
Enable a disabled site
Disable a site (keeps all files and configuration)
Delete Site
Delete site:
true- Delete with confirmationforce- Delete without confirmation
Delete all sites:
true- Delete all (prompts for confirmation)force- Delete all without confirmation
List Sites
List all configured sites:Site Information
Display detailed site information:- Site type (HTML, PHP, WordPress, etc.)
- SSL status and certificate details
- Cache status
- Database information (for WordPress/MySQL sites)
- Multisite configuration
- File paths
WordPress Management
Convert to Multisite
Convert WordPress single site to multisite:Multisite type:
subdomain- Subdomain-based multisitesubdirectory- Subdirectory-based multisite
Clone Site
Clone an existing site to a new domain:Source domain to clone from
Overwrite destination if it exists:
on- Overwrite existing site
- Only HTML, PHP, and WordPress sites can be cloned
- Source and destination must be the same site type
- WordPress multisite cannot be cloned
Replace Content
Search and replace in WordPress database:Text to search for
Replacement text
Commonly used when changing domains or fixing URLs in the database
WordPress Environment Type
Set WordPress environment type:WordPress environment:
production- Production (WP_DEBUG off)staging- Staging (WP_DEBUG on, display off)development- Development (WP_DEBUG on, display on)local- Local development
Redirections
Manage URL redirections:Source path to redirect from
Destination path or URL
HTTP redirect code (301, 302, etc.)
Use regex for redirection matching
Exact path match only (no path prefix matching)
Advanced Options
External Database
Use external MySQL/MariaDB server:Use external database (prompts for connection details)
Custom Root Path
Specify custom document root:Custom document root path
Subdomain Handling
Control subdomain behavior:Treat as subdomain (affects www handling)
Ignore SSL Checks
Skip SSL verification during certain operations:Skip SSL certificate verification
Examples
Simple WordPress Site
WordPress Multisite with SSL
Staging Site Setup
High-Performance WordPress
Reverse Proxy with SSL
Subfolder Support
Many operations support the-subfolder argument:
-wp,-php,-html,-mysql-cache-delete-clone-from-replace-content-env-info-multisite-convert
Notes
- All commands require
sudo(root privileges) - Site configurations are stored in
/etc/nginx/sites-available/ - Website files are located in
/var/www/[domain]/htdocs/ - Nginx is automatically reloaded after configuration changes
- SSL certificates auto-renew via cron job
- Use
-helpfor complete option list
See Also
- HTTP Authentication - Secure sites with HTTP auth
- Log Management - Monitor site logs and debug
- Stack Management - Manage server components