Another case for hostingformula presented by my brother 🙂 . He use vps for his blog that backed by wordpress. Not critical blog actually. He use it for daily ramblings and so on. Unfortunately his vps expire and he already get cpanel hosting for his next place. He ask me to transfer his blog as soon as possible.
The plan for his blog are :
Request for ssh access
Many cpanel hosting support ssh but this feature not enabled by default. You have to open a ticket and ask for activate ssh access for your cpanel account. Note : every hosting company have different policy including ssh port. Usually its not 22 but you ask for exact port for sure.
Use scp
My brother cpanel hosting is very limited in space. He’s current use around 400 MB and his cpanel hosting space is 500 MB. Very tight huh 🙂 . Scp come for rescue in this case. The exact command for scp transfer from vps to cpanel :
scp -P 24579 -r wp-content [email protected]:.
24579 is ssh port (your webhosting ssh port is vary)
-r is recursive mode transfer
wp-content ; wordpress heavily use wp-content folder to store plugins, uploaded image, backup etc. I need only this folder as I can download latest wordpress code from wordpress.org .
Fix Permission
Many cpanel hosting use suphp . You’ll need to fix permisson for folder (755) and files (644) or you’ll get annoying error message when you access your wordpress blog.
Quick commands :
find wordpress_folder/ -type d -print0 | xargs -0 chmod 0755
find wordpress_folder/ -type f -not -name “*.pl” -not -name “*.cgi” -not -name “*.sh” -print0 | xargs -0 chmod 0644
Done. The plan is complete now 🙂
Maybe I’ll let my brother to do it himself now and I’ll check his work.
Bonus Plan
To avoid downtime he need to set cloudflare account and activate it for dns only. When everything is fine then he can activate proxy function.