Clone Website 
The Clone Website feature allows you to duplicate an existing website to another server or to multiple domains on the same server. This is particularly useful when you need to:
- Create staging or development environments
- Migrate websites between servers
- Set up multiple instances of the same website
- Replicate website configurations quickly
How to Clone a Website 
- Navigate to the website management dashboard
- In the Utilitiessection, select theClone Websiteoption
- Configure the clone settings
Clone Configuration Options 
When cloning a website, you have the following options:
Destination Server 
Select the server where you want to clone the website to. You can choose:
- Same Server: Clone to the same server with a different domain name
- Different Server: Clone to another server in your FlashPanelaccount
! Server Compatibility
The destination server must support the same web server type (Nginx, OpenLiteSpeed, or Apache2) as the source server. If the destination server doesn't have the required web server or PHP version installed, FlashPanel will automatically install them for you.
Website Domain(s) 
Enter the domain name(s) for the cloned website. You can:
- Enter a single domain name (e.g., clone.example.com)
- Enter multiple domain names separated by commas, tabs, or pressing Enter
- Each domain will create a separate website clone with the same configuration
Format: domain.com (without http:// or https://)
Clone Database 
If your source website has a database, you can optionally clone it:
- Enabled: The database will be cloned to the destination server with the same structure and data
- Disabled: Only the website files and configuration will be cloned (database not included)
Database Cloning
When cloning the database, FlashPanel will:
- Create a new database on the destination server
- Copy all tables, data, and structure from the source database
- Update the website configuration to use the new database credentials
What Gets Cloned 
When you clone a website, the following items are copied:
Website Files 
- All files and directories in the website root directory
- Public web directory structure
- Application source code
Configuration 
- Nginx/OpenLiteSpeed/Apache2 configuration
- PHP version settings
- Web directory path
- Site isolation settings (if applicable)
Database (Optional) 
- Database structure (tables, indexes, constraints)
- All database data
- Database user and permissions
SSL Certificate (Optional) 
If the source website has an SSL certificate installed, it can be cloned separately using the Certificate Clone feature.
What Does NOT Get Cloned 
The following items are not cloned:
- Deployment scripts and hooks (configured in FlashPanel)
- Environment variables
- Cron jobs
- Queue workers
- Site aliases
- Custom Nginx rules (you may need to reconfigure them)
Git Repository
The .git directory and all Git files are cloned along with your website files. However, you'll need to reconfigure the deployment settings in FlashPanel if you want to use the auto-deployment feature.
Automatic Installation 
When cloning to a different server, FlashPanel will automatically:
- Install Web Server: If the destination server doesn't have the same web server (Nginx, OpenLiteSpeed, or Apache2) as the source, it will be installed automatically
- Install PHP Version: If the destination server doesn't have the required PHP version, it will be installed automatically
- Create System User: If using site isolation, the appropriate system user will be created
Clone Process 
The cloning process is executed in the background as an event. You can monitor the progress:
- After clicking the Clone Websitebutton, an event will be created
- Navigate to the Events page (in the server sidebar) to monitor the progress
- You'll receive a notification when the cloning is complete
- If any errors occur, they will be displayed in the event details
Post-Clone Steps 
After the website has been cloned, you should:
- Update DNS Records: Point the new domain to the destination server's IP address
- Install SSL Certificate: Install an SSL certificate for the new domain if needed
- Configure Git Deployment (if needed): The .gitdirectory is cloned, but you need to configure deployment settings inFlashPanelif you want to use auto-deployment features
- Update Environment Variables: Configure any environment-specific settings (e.g., .envfile)
- Test the Website: Verify that the cloned website works correctly
- Configure Cron Jobs: Set up any scheduled tasks if needed
- Configure Queue Workers: Set up background job processing if needed
Common Use Cases 
Creating a Staging Environment 
Clone your production website to a staging domain:
- Select your production website
- Choose the same or different server
- Enter staging domain (e.g., staging.example.com)
- Enable database cloning to get a full copy of production data
- After cloning, update environment variables for staging configuration
Migrating Between Servers 
Move a website from one server to another:
- Select the website you want to migrate
- Choose the destination server
- Use the same domain name
- Enable database cloning
- After cloning, update DNS to point to the new server
- Once verified, you can delete the old website
Creating Multiple Instances 
Deploy the same application to multiple domains:
- Select the source website
- Choose the destination server
- Enter multiple domains separated by commas
- Decide whether to clone the database (or use a shared database)
- Configure each instance with its own environment variables
Troubleshooting 
Clone Failed 
If the clone operation fails:
- Check the event details for error messages
- Verify that you have sufficient disk space on the destination server
- Ensure the destination server has the required PHP extensions
- Check that the database name doesn't already exist on the destination server
Website Not Working After Clone 
If the cloned website doesn't work:
- Verify DNS records are pointing to the correct server
- Check file permissions in the website directory
- Verify database credentials in the website configuration
- Review Nginx/OLS error logs for specific issues
- Ensure the PHP version matches your application requirements
Database Connection Issues 
If the cloned website can't connect to the database:
- Verify the database was created successfully
- Check database credentials in your application's configuration file (e.g., .env)
- Ensure the database user has the correct permissions
- Verify the database service is running on the destination server
Limitations 
- You can only clone websites to servers within your FlashPanelaccount
- The destination server must support the same web server type as the source
- Large websites may take longer to clone
- Website aliases cannot be cloned (they need to be recreated manually)
Best Practice
Before cloning a production website, ensure you have a recent backup. This allows you to restore quickly if any issues occur during the cloning process.