How to Install Xenforo on CloudPanel: Complete Step-by-Step Guide (2024)

Installing Xenforo on CloudPanel

This guide will walk you through the process of installing Xenforo on CloudPanel.

Requirements

  • CloudPanel installed and running
  • MySQL/MariaDB database
  • PHP 8.0 or higher
  • SSH access to your server
  • Domain pointed to CloudPanel IP

Installation Steps

1. Create a Site in CloudPanel

  1. Go to Sites
  2. Click Add Site
  3. Enter your domain name (e.g., xenforo.yourdomain.com)
  4. Select PHP version (recommended: PHP 8.3)
  5. Choose Generic as the application
  6. Click Add Site

  1. Set up SSL certificate:
    • In CloudPanel, go to Sites > Your Domain > SSL/TLS
    • Click Add SSL/TLS Certificate
    • Choose Let’s Encrypt or upload your own certificate

ssl

2. Create a Database

  1. Navigate to Databases
  2. Click Add Database
  3. Fill in the following details:
    • Database Name: xenforo (or your preferred name)
    • Database User: xenforo (or your preferred username)
    • Password: Generate a secure password
  4. Click Add Database

You don’t need to touch the Vhost. It work perfectly fine with the current version of Xenforo

3. Download and Install Xenforo

  1. Upload the ZIP to your file manager:

  2. Now extract it to the :
    /home/cloudpanel/htdocs/your-domain

4. Run the Installation Script

xenfro

  1. Open your web browser and navigate to:
https://xenforo.yourdomain.com/install
  1. Follow the installation wizard:
    • Verify system requirements
    • Enter database credentials
    • Create admin account
    • Configure site settings

5. Configure PHP Settings

  1. In CloudPanel, go to Sites > Your Domain > PHP
  2. Update the following PHP settings:
    • Max execution time: 300
    • Max input time: 300
    • Memory limit: 256M
    • Upload max filesize: 64M
    • Post max size: 64M

6. Security Recommendations

  1. Remove the install directory:
rm -rf /home/cloudpanel/htdocs/your-domain/install
  1. Configure security headers in CloudPanel:
    • Go to Sites > Your Domain > Vhost
    • Add the following headers:
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

Troubleshooting

Common Issues

  1. Database Connection Error

    • Verify database credentials in config.php
    • Ensure database user has proper permissions
    • Check if MySQL service is running
  2. Permission Issues

    • Ensure cloudpanel user owns all files
  3. White Screen of Death

    • Check PHP error logs in CloudPanel
    • Increase PHP memory limit
    • Enable error reporting temporarily

Maintenance

Regular Updates

  1. Back up your installation:

    • Export database
    • Copy all files
    • Store backups securely
  2. Update Xenforo:

    • Download latest version
    • Replace files
    • Run update script
    • Clear cache

Remember to regularly check for updates and maintain backups of your Xenforo installation. For production environments, consider implementing additional security measures and performance optimizations based on your specific needs.

If you need help with Cloudflare Tunnels please comment below.