Once you have your VPS setup with Virtualmin and created a virtual server to host a domain name, you need to upload your website to document root of the domain. This tutorial shows you how to upload files to your VPS with FileZilla or Virtualmin’s file manager.
Whether you want to upload a WordPress plugin, theme or even a entire HTML website or landing page, you can use one of following two methods.
- Using FileZilla over sftp
- Using Virtualmin file manager
The FileZilla method is easy to execute. While using Virtualmin file manager takes some work if you have sub directories to upload. If you’re coming from shared hosting, you should be familiar with FileZilla already. But I’m going to give you full details anyway.
Method #1: Using FileZilla to Upload Files to the VPS
FileZilla is a FTP client. It can also use to securely transfer files to your VPS over SFTP. It’s a free software. So simply download and install it on your computer. And there are many ftp clients out there. You can use any of them. But I prefer to use Filezilla. If you don’t know how to connect to your server with FileZilla, please refer to FileZilla section of the connecting to your VPS over SSH tutorial or watch the video above.
You’ll be connected to administrative user’s home directory upon successful connection. You’ll find few sub directories inside it. The document root for your domain is public_html directory. Anything you upload here will be publicly available from your domain name. If you already have WordPress or other website hosted on your domain, you see files of that software inside public_html directory.
You can now browse files on your computer from the left side window and upload them by right clicking on them. If you want to upload multiple files, you can select them all from the left window and then right click and hit Upload.
It can take a long time if you have large number of files to upload. In that case you can create a zip archive of your files and then use Putty to unzip it after the upload. This will be lot quicker than uploading multiple files.
Method #2: Using Virtualmin file manager to Upload Files to the VPS
Virtualmin has a nice file manager that can be used to manage files on your server. It can also use to upload files to your server. So login to Virtualmin with administrative user and navigate to Webmin Modules > File Manager. You’ll see the home directory of the user.
Clicking on public_html will open it. If you already have something hosted on your domain, those files will be listed here. Otherwise it will be an empty directory. Now you can go to File > Upload to current directory from the menu which will open a pop-up. Click the little file pin icon to browse your computer and then hit Upload Files button to upload them.
The problem here is though that Virtulamin can’t create/upload sub directories. Meaning that only files on the current directory will be uploaded and sub-directories will be ignored. As a way around this you can upload your files as a zip archive and then unzip them by login in to server with Putty.