Earlier today, I’ve had two migrations to complete.
One was for a guy named Luke, who needed his Cloudways server updated so that the new domain will become the official domain of the website, while the old one will be redirecting to the main one.
All is good there, his other dev is now changing what’s needed on the new website and will reach again in a few days so we can go live and redirect the old domain.
Another client of ours, Mr. Collins, needs the new website uploaded to the client’s server.
Then we need to change the DNS records and get an SSL certificate on the new hosting account.
All good here as well, but certain things that happened sounded well for this little blog entry.
Turns out that our clients’ server is rather slow when it comes to FTP.
But, his old website is rather big(especially when it comes to the file count), so it seemed like a never-ending process!
The server isn’t that fast when it comes to the downloads and uploads either, and the client was getting impatient, so I’ve decided to speed things up.
Do you even SSH?
For most of the people out there, it’s completely fine you don’t SSH.
However, if you are a developer that likes to play on all servers(and not only ones with cPanel/Plesk etc), you should learn a bit of SSH.
It’s the must-have tool for any system admin, as it allows you to do pretty much anything within your scope of the server settings and possibilities.
In our case, the FTP was terribly slow during the deletion of tens of thousands of files in wp-content.
Enabling SSH for my existing user in Dreamhost took around 1 minute(basically just for the changes to propagate), and soon enough I was inside the console.
It took around 30s to navigate through the folder system of this server and delete the wp-content file:
#1- cd (to see the server folders) #2- rm -r /home/domain_name.com/wp-content
It’s so easy yet so powerful. It basically saved me hours of waiting for no reason.
SSH is the fastest way
Without getting into details and complicating things, SSH is the fastest way to interact with your server.
While certain things work fairly well via cPanel, FTP, and similar software, SSH is powering them all, thus accessing stuff on the most basic level(which is definitely the fastest one).
When people normally think about migration, they often think of it in these terms(and the sad truth is that many hosting accounts, especially managed ones, don’t offer SSH).
- Download the files and the database from the old server
- (to your PC)
- Upload the files and the database to the new server
- (from your PC)
And yes, that’s how so many WordPress and other website migrations have to be done.
However, if you do have access to SSH, then these are the correct terms to think with:
- zip the backup of all files on the old server
- download them on the new server and unzip them
As you can see, by using SSH, we can cut the middle man(our PC) during the WP migration.
Our PC can be limited by our internet speed(fairly cool nowadays in Serbia), and can’t help us if the speed of either of the servers is slow.
So as you hopefully agree, the fastest way is to directly interact between the new and the old server.
Some more facts about SSH
By using SSH, you will zip much faster than by zipping through cPanel, Plesk, or similar software.
For this, you can simply use the zip command.
And to download the file from one server to another, use the wget command.
For last, keep in mind that SSH is also the most secure way of server interaction.
Leave a Reply