How to migrate WordPress to an aaPanel server
Move a WordPress site to aaPanel step by step: export the database, transfer files, create the new site, configure wp-config.
On this page
Migrating WordPress to aaPanel involves creating the site environment on the new server, transferring files and database, and then switching DNS once everything is verified. Done in the right order, the can be completed with minimal or zero downtime.
Migration overview
- Export database and download files from the old host
- Create the website and database in aaPanel
- Upload WordPress files to the new server
- Import the database
- Update
wp-config.phpwith new database credentials - Apply WordPress URL rewrite rules in aaPanel
- Test using a hosts file edit before changing DNS
- Issue SSL certificate and update DNS
Step 1: Export from old host
Export the database:
- Via phpMyAdmin on the old host: select the database → Export → Quick → Go. Download the
.sqlfile - Via cPanel Backup: download a database backup from cPanel → Backup
- Via SSH on old server:
mysqldump -u USER -p DBNAME | gzip > wp-backup.sql.gz
Download WordPress files:
- Connect to the old host via FTP and download the entire
public_html/folder, or - Create a ZIP archive using cPanel/DirectAdmin File Manager and download it
Step 2: Create site and database in aaPanel
- Create the website: aaPanel → Website → Add Site. Enter your domain, select the correct PHP version, and click Submit
- Create the database: aaPanel → Database → Add Database. Note the database name, username, password, and host (
127.0.0.1)
Step 3: Upload WordPress files
Connect to the new server via FTP using credentials from aaPanel's FTP section (or via SFTP using root SSH). Upload all WordPress files to:
/www/wwwroot/yourdomain.com/
Include all files: wp-admin/, wp-content/, wp-includes/, and root files (wp-config.php, index.php, .htaccess, etc.).
For large sites, server-to-server transfer via SSH is much faster:
rsync -avz user@oldhost:/path/to/public_html/ /www/wwwroot/yourdomain.com/
Step 4: Import the database
Via phpMyAdmin: aaPanel → Database → phpMyAdmin → select your new database → Import → upload the SQL file.
Via SSH (recommended for large databases):
mysql -u DB_USER -p DB_NAME < wp-backup.sql
# Or for compressed:
gunzip -c wp-backup.sql.gz | mysql -u DB_USER -p DB_NAME
Step 5: Configure wp-config.php
Edit wp-config.php in the new site's document root. Update the database credentials to match the new database:
define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_database_user');
define('DB_PASSWORD', 'new_database_password');
define('DB_HOST', '127.0.0.1');
Step 6: Apply URL rewrite rules
WordPress requires URL rewriting for clean permalinks. In aaPanel:
- Go to Website → your site → URL rewrite
- Select WordPress from the dropdown
- Click Save
Without this step, all WordPress URLs except the homepage will return 404.
Step 7: Test before going live
Test the site on the new server before switching DNS. Edit your local hosts file to temporarily resolve the domain to the new server IP:
# Mac/Linux: /etc/hosts | Windows: C:\Windows\System32\drivers\etc\hosts
NEW.SERVER.IP yourdomain.com www.yourdomain.com
Open the domain in your browser. Only your computer sees the new server-all other visitors still hit the old site. Verify the site loads, test several pages, confirm the admin area works, and check that no pages reference the old server's IP or hostname.
Step 8: Issue SSL and update DNS
Issue the Let's Encrypt certificate first: aaPanel → Website → your site → SSL → Let's Encrypt → Apply.
Then update the domain's A record at your DNS provider to point to the new server IP. Remove the hosts file entry from your computer. As DNS propagates, visitors will start reaching the new server.
Post-checklist
- ☐ HTTPS working-padlock in browser
- ☐ All pages loading without 404 errors
- ☐ WordPress admin accessible at
/wp-admin - ☐ No mixed content warnings in browser console
- ☐ Contact forms and emails sending correctly
- ☐ WooCommerce checkout working (if applicable)
- ☐ Search-and-replace run for any hard-coded old server references in the database
- ☐ Backup created on new server
- ☐ Old hosting plan access kept for at least 2 weeks as fallback
UnderHost can assist with s depending on plan eligibility. Open a support ticket with your old host's FTP/SSH details and the target domain. The team can advise on what help is available for your plan.
Related: Create a website in aaPanel | Create and manage databases in aaPanel | Configure FTP in aaPanel | SSL certificates in aaPanel | Configure DNS records for aaPanel sites | Website migration guide | WordPress migration to CloudPanel
Need aaPanel hosting?
Install aaPanel on an UnderHost VPS or dedicated server when you want a simple web interface for sites, databases, SSL, and apps.





















