{"id":9264,"date":"2020-06-09T00:00:00","date_gmt":"2020-06-08T21:00:00","guid":{"rendered":"https:\/\/vipestudio.com\/using-sftp-for-file-management-on-wordpress\/"},"modified":"2020-06-15T09:46:12","modified_gmt":"2020-06-15T06:46:12","slug":"using-sftp-for-file-management-on-wordpress","status":"publish","type":"post","link":"https:\/\/vipestudio.com\/en\/using-sftp-for-file-management-on-wordpress\/","title":{"rendered":"Using SFTP for file management on WordPress"},"content":{"rendered":"<p style=\"text-align: left;\">Today we look at SFTP (Secure File Transfer Protocol) and what it is that makes it different from vanilla FTP. We\u2019ll also understand its mechanisms and how we can use it to access files on WordPress.<\/p>\n<h2 style=\"text-align: left;\">Understanding SFTP<\/h2>\n<p style=\"text-align: left;\">At the heart of SFTP is FTP, so similarities abound. The difference is in the use of SSH (Secure Shell) \u2013 a web protocol that safely encrypts the data that you send over the under-protected tubes of the internet.<\/p>\n<h2 style=\"text-align: left;\">The Way SFTP Works<\/h2>\n<p style=\"text-align: left;\">All websites reside on servers, just as yours might. A server, of course, is just a computer that specializing in \u2018serving up\u2019 webpages. Users like you and me usually interact with such pages or sites via our browsers (and sometimes apps), and these browsers serve the website to use with the help of the HTTP (Hypertext Transfer Protocol), and increasingly, HTTPS (Hypertext Transfer Protocol Secure). As you see, the S in SFTP also appears in HTTPS \u2013 which also uses SSH. So, when we type in a URL in the browser, the server responds with the data we requested \u2013 if we are allowed to access it, securely. Public websites won\u2019t generally need a login and can get by with HTTP, and those that require a login should ideally use the HTTPS protocol for you to feel safe typing that password.<\/p>\n<p style=\"text-align: left;\">This is the basic idea; the difference with using FTP is that you, the WordPress website owner, want to directly access your own server and the files on it \u2013 hence \u2018File\u2019 Transfer Protocol.<\/p>\n<p style=\"text-align: left;\">So when you use FTP to connect to the server, you can see the files and directories in that server, and thus, transfer them to and fro from your computer to the server.<\/p>\n<p style=\"text-align: left;\">For FTP, we need a client \u2013 a tool that allows you to connect to these servers remotely with credentials that you receive from the web hosting provider. Examples include FileZilla, CODA, Cyberduck, and CuteFTP.<\/p>\n<p style=\"text-align: left;\">SFTP performs a similar function but is more secure than FTP. It first creates a connection from your client to the remote server via SSH. The data sent and received over SSH is cryptographically protected, so the connection is way more secure.<\/p>\n<h2 style=\"text-align: left;\">What Makes SFTP Different?<\/h2>\n<p style=\"text-align: left;\">FTP has two connections (called channels) simultaneously; one used for commands and another for data. So, while your request for accessing a file might travel through the first channel, the file itself will be delivered to you via the second.<\/p>\n<p style=\"text-align: left;\">Contrary to this, SFTP uses just one channel, and all data \u2018packets\u2019 sent through it are encrypted and secured. What this means is that your data is encoded, and only an authorized recipient can decode it. So just like with FTP, the encoded data can hypothetically be intercepted by ill-intentioned parties, but unlike FTP, it cannot be decoded by the interceptor \u2013 in other words, your data is safe \u2013 thus, making SFTP an easy choice.<\/p>\n<h2 style=\"text-align: left;\">Connecting to SFTP<\/h2>\n<p style=\"text-align: left;\">Some of the clients that are used for FTP can be used for SFTP, though these two protocols are as different as they are similar. Some of the prominent and well-loved clients include:<br \/>\nFileZilla: This comes highly recommended, as it is a tool that does everything you need for SFTP and more.<br \/>\nCODA: Basically a full-featured text editor that also does SFTP.<\/p>\n<p style=\"text-align: left;\">CyberDuck: it\u2019s free, can handle many protocols and comes with a bunch of nifty features, including its own text editor.<\/p>\n<p style=\"text-align: left;\">Let\u2019s look at what you need to do:<\/p>\n<p style=\"text-align: left;\"><strong>Step 1<\/strong> &#8211; SFTP Hostname: Pretty much all web hosting providers will give you this, an address that needs to be entered in your SFTP client to initiate the connection.<\/p>\n<p style=\"text-align: left;\"><strong>Step 2<\/strong> \u2013 Credentials: A username and password. On some web hosts, these will be the same as those used on your hosting account, while on others you get separate credentials.<\/p>\n<p style=\"text-align: left;\"><strong>Step 3<\/strong> \u2013 The Client: For this guide, we\u2019ll use FileZilla as an example.<\/p>\n<p style=\"text-align: left;\">Download FileZilla, install it, open the client, and click Files, then \u2018Site Manager\u2019.<\/p>\n<p style=\"text-align: left;\"><strong>Step 4<\/strong> \u2013 Connect: At the bottom left, select \u2018New Site\u2019 and enter the SFTP hostname and credentials in their respective fields. This is the only time you need to enter these details; from the next time, FileZilla will connect automatically. Click on \u2018Connect\u2019 and wait for FileZilla will do its thing. A secure connection may take some time, but once it\u2019s done, you can securely access the files.<\/p>\n<p style=\"text-align: left;\">The next time you want to connect, just click the \u2018Site Manager\u2019 icon and select your website.<\/p>\n<p style=\"text-align: left;\">There, you\u2019re all set up with SFTP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we look at SFTP (Secure File Transfer Protocol) and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9265,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[113],"tags":[252,253,184],"class_list":["post-9264","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website-wordpress-development","tag-file-management-en","tag-sftp-en","tag-ssh"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/9264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/comments?post=9264"}],"version-history":[{"count":0,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/posts\/9264\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media\/9265"}],"wp:attachment":[{"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/media?parent=9264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/categories?post=9264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vipestudio.com\/en\/wp-json\/wp\/v2\/tags?post=9264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}