Upload your Website to the VPS with Virtualmin or sFTP

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.

Do not use your root account to upload files to your VPS. The public_html directory you’re uploading files to is owned by administrative user for your domain, not by the root. If you use root account to upload files, those files will be owned by root and administrative user won’t have write permission on them. This will cause permission errors on your website.

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.
filezilla-connected-screen

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.
virtualmin-file-manager

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.

Tags
Show More

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

One Comment

  1. Yeah Hi. I created a page on wordpress in my localhost before I published it on web. I didn’t have a linked domain yet.
    In order to upload my local wp to my VPS server, I recently created a wordpress in my VPS server so I decided to upload my created database from local to VPS server. Should I copy copy the content of my localdatabase file to the default database file of VPS server? IF this is okay, I really don’t know what is the file I should choose to upload my database. I don’t have public.html
    Thanks to let me bother you even with my writing because I just have intermediate level of Eng xD. So, I hope I have let myself be understood jejej.
    God bless u.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Close