- You want to migrate a 15GB WordPress site
- You have 1 GB Internet data only for next few hours.
In this kind of situation, taking backup with a plugin like Updraft, and restoring the backup is not going to work. Browser hang is one of the first issues, that you may face while restoring the site.
Even manually downloading and uploading wp-content would be a plain waste of time.
Migrating heavy WordPress site with SSH is the best way to go.
For example, let’s say you have an old site at Cloudways and you want to migrate it to a new Server there, I assume that you already WordPress installed.
Below is a step-by-step process that you need to follow.
(This process assumes that before migration to new hosting, your domain is pointed to the old hosting server, in order to download wp-content.zip file via SSH at the new Server)
- Login to Cloudways > Server
Copy Master Credentials (IP, Username and Password)
Copy application path
Access now using Putty
cd applications/app name/public_html/to navigate public_html directory
zip -r wp-content.zip wp-content/to create a zip file of whole wp-content folder
Wait till competition, this may takes few minutes to hour.
Now, Login to new server via Putty
cd srv/users/serverpilot/apps/appname/public/to navigate public_html directory
http://example.com/wp-content.zipto download wp-content.zip folder which we created in last step 4th.
rm -rf /wp-content/to delete existing default wp-content folder
unzip wp-content.zipto unzip and bring old hosting wp-content folder which you need.
Now, wp-content part done.
Go back to Cloudways > Application > launch MySql Manager > Export all tables at system
Login again to public_html directory of new server
Install phpMyAdmin at new server, process is written below
wget https://files.phpmyadmin.net/phpMyAdmin/4.8.4/phpMyAdmin-4.8.4-all-languages.zip && unzip phpMyAdmin-4.8.4-all-languages.zip && rm phpMyAdmin-4.8.4-all-languages.zip && mv phpMyAdmin-4.8.4-all-languages phpmyadmin
wp-config.php, grab MySQL username and password
Point new IP to your domain
Edit host file or switch at DNS directly
www.example.io/phpmyadmin/, username and password you can find inside new server
wp-config.php file just type
nano wp-config.php, double click on username/password and CTRL+C to copy.
Export old hosting SQL database tables
Now, please make sure to update table prefix at wp-config.php as per Database. Else, you will see just Famous Five minutes installation page.
Default may be
$table_prefix = 'wp_';
You may need to update like this
$table_prefix = 'wp_c319a4295d_';
Point your domain to new IP address.
Add a robots.txt file, that may be missing.
That’s all. I hope this helps.
Thanks & Regards,