Information Technology

How to Transfer Files from Shared Hosting to Cloud Server Using ssh?

When moving your website to a new type of hosting, you might need to carry out an ssh transfer. This is a rather straightforward process, and you should be able to cope with it without third-party help. In this article, you’ll find step-by-step instructions on completing the ssh transfer of your site using a dedicated ssh client or the Terminal on Mac OS. Plus, you’ll discover a comprehensive list of benefits of moving to a cloud hosting that might require such a transfer.

What Do You Need the ssh Transfer for?

The ssh transfer should come in handy if you’re planning to relocate a large site to new hosting — for example, when switching to a cloud server hosting provider from shared hosting.

Not all types of site migration require an ssh transfer. For instance, you won’t need it if you have a simple WordPress blog and you want to migrate it from one server to another. In this case, the process of migration boils down to relocating the WP-content folder and the old database. If your website is small or new, you can rely on a free FTP client, such as Cyberduck or FileZilla.

But what if your WP-content folder is over 2GB? The manual transfer might take too much time. To accelerate the process, you might resort to ssh and the sFTP command.

Reasons for Migrating to a Cloud Hosting

You might want to move your website from shared hosting to cloud hosting for the following reasons:

  • Cost-efficiency. You pay only for the resources that you need right now.
  • Pay-as-you-go scalability. When you need more resources, you can easily upgrade to a more advanced plan. Moreover, you can scale down in a couple of clicks if the popularity of your web resource decreases in the future.
  • Faster speed of work. That’s a highly important competitive edge of any website. Clouds are fast because AI can be deployed almost instantly there, and most of the apps are open-source and free to use.
  • Higher uptime. The uptime of websites hosted on a cloud usually gets very close to 100%. Your site will be hosted on a virtual machine. If a hardware issue occurs, the site can be moved instantly to another machine in the cloud cluster.
  • Excellent performance. Cloud servers rely on the latest Intel Xeon CPUs and SSD drives and are configured to deliver the best possible performance.
  • Stronger security. The more personalized services you provide, the more private data you need to collect from your customers. Cloud hosting features powerful built-in security tools that will protect you from viruses, DDoS attacks, and any other type of threats.
  • Sustainability. Cloud hosting can minimize your website’s carbon footprint. If you inform your customers about it, this piece of news might increase their loyalty to your business.

Many websites start with shared hosting because it’s the most budget-friendly option and move to clouds as they begin to scale.

The Three Essential Steps of the ssh Transfer

Apart from compressing your WP-content folder into a single file, you might also want to compress the entire root directory and transfer it to your new hosting. You might consider running commands either with the help of Terminal on Mac OS or in an ssh client like Putty.

The process can be broken down into the following simple steps:

  1. ssh into the server that used to host your website
  2. sFTP from your old hosting server into the new one
  3. Use the Put command to copy files from one server to another

Some hosting providers might not give SSH access to their clients. If so, you can ask your provider’s support team to decompress the compressed folder. Or, the provider might allow you to enable SSH access by login into your cPanel.

The Commands That You Should Type into Transfer Files to New Hosting Using ssh

Here is a step-by-step guide on the sequence of commands that you need to introduce:

  1. Open Putty or Terminal on your Mac and ssh into the hosting server that you used previously with this command: ssh username@hostname
  2. The second command should be applied only if your port is other than the default one: ssh username@hostname -oPort=2200
  3. Instead of 2200, type in the name of the port that your server uses for ssh access. Then, compress the entire public_html folder with the following command: tar -cvzf XXX public_html. In this case, XXX is the name of the compressed file. It will be the single compressed file of your public_html folder. The larger the files in the folder, the longer the compression process will take.
  4. On the same terminal, type this command: sftp username@hostname.wpengine.com
  5. Type yes and introduce your password to sFTP into your new hosting server from the previous one. At this step, you can rely on the following commands: ls – list all files, cd – change directory, mk – make a new directory. For example, you might want to create a new directory, call it New and apply the “cd New” command to change your default working directory.
  6. Finally, introduce this command: put wpback.tar.gz

After you run all these commands, they will start to transfer your backup file from old to new hosting. Depending on the size of the file, it should take just a few minutes.

Once the file reaches the new hosting server, the only thing you need to do is to decompress it. You might ask the support team of your hosting provider to help you with this task.

Final Thoughts

Hopefully, you found this article informative, and now you better understand how to copy files from shared hosting to a cloud server using ssh. Thanks to moving to cloud hosting, you’ll be able to save funds and ensure stronger security for your website. Your site will work quicker, its uptime will increase, and it will be easier for you to scale it. Cloud hosting is environmentally sustainable and famous for its excellent performance. It should help you to expand your client base and maximize your revenue.

Noor

Engineer by degree, blogger by profession. Loves to write on trendy topics as well as review articles of latest tech products.

Share
Published by
Noor

Recent Posts

David Black: An Winning Career in Finance

David Black joined StreetAccount in 2003 shortly after graduating from college, where he received a…

6 hours ago

Omaha Entrepreneur Vinod Gupta Turned A Garage Full of Yellow Pages into A Multi-Million Dollar Enterprise

“Vinny, you gotta get these books outta here by five or I’m gonna fire you.”…

11 hours ago

6 Important Things You Should Know About Marketing

It's crucial for any business owner to understand what marketing is and to learn how…

12 hours ago

An Overview of Services Offered By Press Release Writing Services

With the advancements in technology, there is a lot of competition in the market. There…

12 hours ago

Bitcoin Network Difficulty Raised to 26.64T, How to Reduce Mining Costs?

The data showed a 9.32 percent increase in difficulty on the bitcoin network and a…

13 hours ago

Audit Management Software by Harrington Group International

Auditing is crucial for evaluating how well an organization is fulfilling or complying with industry…

13 hours ago