Step-by-Step Website Migration WHM to a Server Without a Panel

ON OLD WHM/cPanel SERVER

1. Login via SSH or File Manager

Use SSH or cPanel File Manager.

bash
cd /home/USERNAME/public_html

2. Export the WordPress files

bash
tar -czf theinvestigatornews.com.ng_files.tar.gz .

3. Export the database

First, get the database name from wp-config.php.

Then run:

bash
mysqldump -u USERNAME -p DATABASE_NAME > theinvestigatornews.com.ng_db.sql

Compress it:

bash
tar -czf theinvestigatornews.com.ng_db.tar.gz theinvestigatornews.com.ng_db.sql

TRANSFER TO NEW SERVER

4. Use SCP or rsync to copy both files to the new server

From WHM server:

bash
scp theinvestigatornews.com.ng_files.tar.gz root@5.189.175.241:/home/theinvest/
scp theinvestigatornews.com.ng_db.tar.gz root@5.189.175.241:/home/theinvest/

ON NEW SERVER (NGINX UBUNTU)

5. Extract files

bash
cd /home/theinvest/theinvestigatornews.com.ng
tar -xzf /home/theinvest/theinvestigatornews.com.ng_files.tar.gz
chown -R www-data:www-data .

6. Import database

bash
cd /home/theinvest/
tar -xzf theinvestigatornews.com.ng_db.tar.gz
mysql -u root -p theinvest_wp74gk8 < theinvestigatornews.com.ng_db.sql

7. Double-check wp-config.php

Ensure it’s already using:

php
define( 'DB_NAME', 'doma_wp36' );
define( 'DB_USER', 'doma_wp36' );
define( 'DB_PASSWORD', 'ci[ud@mwD,{Qci[ud@mwD,Q' );
define( 'DB_HOST', 'localhost' );

And optimized settings already provided earlier.


✅ 8. Check permissions & restart services

bash
chown -R www-data:www-data /home/theinvest/theinvestigatornews.com.ng
sudo systemctl restart php8.3-fpm
sudo systemctl restart nginx

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *