aaPanel/BT Panel Installation
This guide provides a quick installation method specifically for aaPanel and BT Panel users.
Prerequisites
- aaPanel or BT Panel installed
- PHP 8.2 or higher
- MySQL 5.7+ or MariaDB 10.3+
- Composer installed
- A domain pointing to your server
Quick Installation
If you are familiar with the installation flow, you can use this ready-to-use command. Replace the site information, then copy and paste into your terminal.
Ready-to-Use Command
# Navigate to your website directory
cd /www/wwwroot/example.com
# Download and setup WNCMS
rm -rf .temp
COMPOSER_ALLOW_SUPERUSER=1 composer create-project secretwebmaster/wncms .temp --no-interaction --prefer-dist
# Copy project files into current directory (avoid cp -i prompts, and avoid copying . / ..)
\cp -rf .temp/. .
\cp -rf .temp/public/. public/
rm -rf .temp
rm -f storage/installed
# Install dependencies (using COMPOSER_ALLOW_SUPERUSER for root)
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-interaction --prefer-dist
COMPOSER_ALLOW_SUPERUSER=1 composer update -W --no-interaction --prefer-dist
# Run installer (replace with your database credentials)
php artisan wncms:install mysql 127.0.0.1 3306 example_com example_com "ABCDCF12345678" \
--app_name="example_com" \
--app_url="https://example.com" \
--force_https \
--domain="example.com" \
--app_locale="zh_CN" \
--site_name="My Website"
# Set permissions
chown -R www:www .
chmod -R 775 storage bootstrap/cache public/mediaConfiguration Steps
1. Create Website in aaPanel
- Log in to your aaPanel
- Go to Website → Add Site
- Enter your domain name
- Select PHP 8.2 or higher
- Create or select a database
- Click Submit
2. Configure Document Root
- Click on your website in the list
- Go to Site Config → Domain
- Set Document Root to:
/www/wwwroot/your-domain.com/public - Click Save
3. Install SSL Certificate (Recommended)
- Go to SSL tab
- Choose Let's Encrypt for free SSL
- Enter your email
- Click Apply
4. Configure PHP Settings
- Go to PHP → PHP 8.2 → Configuration
- Ensure these extensions are enabled:
fileinfogdmbstringopensslpdo_mysqlzipcurlxml
5. Set PHP Limits
In PHP configuration file (php.ini):
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
memory_limit = 256MDatabase Setup
Create Database via aaPanel
- Go to Database → Add Database
- Enter database name (e.g.,
example_com) - Enter username (e.g.,
example_com) - Generate or enter a strong password
- Set Access Permissions to
localhostor127.0.0.1 - Click Submit
Note Your Database Credentials
| Field | Example Value | Description |
|---|---|---|
| db_driver | mysql | Database driver |
| db_host | 127.0.0.1 | Database server host |
| db_port | 3306 | Default MySQL port |
| db_name | example_com | Your database name |
| db_user | example_com | Database username |
| db_pass | YourStrongPassword | Database password |
Installation Command Example
Replace these values with your actual credentials:
php artisan wncms:install mysql 127.0.0.1 3306 example_com example_com "YourStrongPassword" \
--app_name="example" \
--app_url="https://example.com" \
--force_https \
--domain="example.com" \
--app_locale="zh_CN" \
--site_name="我的網站"File Permissions
Ensure correct permissions for web server user (www):
# Set ownership
chown -R www:www /www/wwwroot/your-domain.com
# Set directory permissions
find /www/wwwroot/your-domain.com -type d -exec chmod 755 {} \;
# Set file permissions
find /www/wwwroot/your-domain.com -type f -exec chmod 644 {} \;
# Set writable directories
chmod -R 775 /www/wwwroot/your-domain.com/storage
chmod -R 775 /www/wwwroot/your-domain.com/bootstrap/cache
chmod -R 775 /www/wwwroot/your-domain.com/public/mediaCommon Issues
Permission Denied Errors
If you encounter permission errors:
# Check current user
whoami
# If running as root, make sure files are owned by www
chown -R www:www .Composer Memory Limit
If composer runs out of memory:
# Increase PHP memory limit temporarily
php -d memory_limit=512M /usr/bin/composer installDatabase Connection Failed
- Verify database credentials in aaPanel
- Check if MySQL is running: App Store → Installed → MySQL → Start
- Ensure database user has proper permissions
500 Internal Server Error
- Check Laravel logs:
storage/logs/laravel.log - Ensure storage and cache directories are writable
- Clear config cache:bash
php artisan config:clear php artisan cache:clear
URL Rewrite
aaPanel usually configures URL rewrite automatically for Laravel. If URLs don't work:
- Go to Site Config → URL Rewrite
- Select Laravel from the template dropdown
- Click Save
The rewrite rule should look like:
location / {
try_files $uri $uri/ /index.php?$query_string;
}Scheduled Tasks (Cron)
Set up Laravel's scheduler:
- Go to Cron
- Click Add Cron
- Type: Shell Script
- Name:
Laravel Scheduler - your-domain.com - Period: Every Minute (N Minutes: 1)
- Script:bash
cd /www/wwwroot/your-domain.com && php artisan schedule:run >> /dev/null 2>&1
Queue Worker (Optional)
For background jobs:
- Go to Supervisor (install if not available)
- Add new program
- Name:
wncms-queue-worker - Command:bash
php /www/wwwroot/your-domain.com/artisan queue:work --sleep=3 --tries=3 - User:
www - Auto-start: Yes
Backup Setup
- Go to Cron → Add Cron
- Select Backup Site
- Choose your website
- Set backup frequency (e.g., daily at 2 AM)
- Choose retention period
Access Your Site
Frontend:
https://your-domain.comBackend:
https://your-domain.com/panel/loginDefault Credentials:
- Email:
[email protected] - Password:
wncms.cc
WARNING
Change the default password immediately after first login!
Next Steps
- Configure your site settings in
/panel/settings - Upload your theme
- Create content
- Set up email configuration
- Configure cache settings
See Also
- Installation Guide - General installation guide
- Requirements - System requirements
- Docker Installation - Docker setup guide