DirectAdmin Site-Helper

Helping you get the most out of DirectAdmin and your web site!

Uploading To Your Site

This section covers uploading via FTP, DirectAdmin's file manager, and SSH. You may upload using one or several of these methods.

Directory Structure

At the root of your account exists these directories:

  • /backups
  • /domains
  • /imap
  • /Maildir
  • /public_html

/backups

The /backups directory contains all the backups created through the control panel. You will not have a /backups directory until you create a backup in the control panel.

/domains

The /domains directory contains the files relating to your hosting account(s). Each domain hosted on your account has its own directory (/domains/yourdomain.com). Within this directory is:

  • /logs
  • /private_html
  • /public_html
  • /public_ftp
  • /stats
  • (monthly logs are stored here -- the directory is created one month after your account is created)
  • (files for your general encrypted website)
  • (files for your general website)
  • (files for your FTP site)
  • (files created by Webalizer for the purpose of statistics -- do not alter/delete this directory)

/imap

Every IMAP folder (at least for incoming messages) has sub-folders new and cur. The new sub-folder contains all newly arrived messages which have not been yet viewed by any e-mail client (does not matter: offline or online). Of course you should read them via mail client( POP3 or IMAP), otherwise if you read them in SSH or FTP/FileManager they would not be marked as read.

/Maildir

/Maildir is the system email box storage. It has nothing to do with virtual email boxes. In most cases the box contain errors and notifications from system.

/public_html

The /public_html directory at the root of your account is actually a link to /domains/yourdomain.com/public_html. If you have more than one domain hosted on your account, this link will forward you to the public_html directory of the last domain created on your account.

Home (index.html) File

The default file for any web directory is index.html. That means when visitors access http://www.yourdomain.com, the server really sends them to http://www.yourdomain.com/index.html. This works for any publicly accessible directory on your system, including subdomains.

When uploading a main web site for each directory remember to name it index.html. Advanced users may utilize PHP files, shtml files, etc. If your web site is not based in html, then make sure your main files are renamed index.extension (index.php, index.shtml, for example).

Uploading With FTP

Step 1: Obtain FTP client software.

Uploading to the server through FTP requires special software. Most computer systems do not come with FTP clients, so you will have to download one from the Internet. We strongly recommend FileZilla

Step 2: Connect to the server.

If you use FileZilla, information should look like this:

connect with ftp

All FTP clients need the following information:

  • Username (This is your control panel username.)
  • Password (This is your control panel password.)
  • Address (This is the address of the server.
    Use ftp.yourdomain.com)
  • Port (Use the default port 21)

Step 3: Open the public_html directory and upload your files.

Once connected, you can see your folders on right side. You can press on desired folder, to see its contents. If you have more than one domain hosted on your account you should first enter the /domains directory, then the domain you want to edit, then the public_html directory.

To upload, highlight the files/folders on your computer and drag them into the appropriate directory on the remote server. Each FTP client operates differently, so please consult its help file for complete instructions.

connect with ftp

Uploading With DirectAdmin's File Manager

Uploading with DirectAdmin File Manager is easy way to transfer files between your computer and server without any additional programs required.

  • 1. Sign into the control panel and click the "System Info&Files" icon.
  • 2. Select "File Manager" menu.
  • 3. Navigate to the directory where you want to upload files.
  • 4. Click the "Upload File" button at the bottom of the screen.
connect with DA
connect with DA
connect with DA

  • 5. After that, just Drag & Drop desired items from your computer to DirectAdmin, and press "Upload".
  • 6. Note: Make sure the destination path above is correct. (path / start at your home directory).
connect with ftp

Uploading files with DirectAdmin's File Manager is really simple and usefull. You can also change file's permissions or even edit files from direct admin control panel. You can find about all those features with detailed usage guide here.

Uploading Through SSH

With SSH you can sign into the server and download files directly from other servers.

  • Note: Some hosts may disable the SSH feature for security purposes.
  • Note: SSH should not be used by those unfamiliar with a Unix environment.

Connect to the server with terminal, using OpenSSH

Simply open terminal(Linux/MacOS only) and write your username and servername. Example:

ssh user@yourdomain.com

You will be prompted to enter your password. Do it and press enter

  • Note: You won't see password lenght, its okay, just type it and press enter.
  • Note: Default ssh server port is 22. If your server has set custom port, you need to specify it when connecting via ssh terminal. Example:
ssh -p 2222 user@yourdomain.com

Where -p stands for port and 2222 is your server port number.

Connect to the server with PuTTy

Download PuTTy from here.

Enter your hostname and port (default 22) connect with ftp

Press "Open". You will continue to terminal, enter your username and password. Once connected steps below will be same to OpenSSH and PuTTy.

Change to the directory where you want your files to be downloaded

When connected, you will appear in your home directory. However, you may want to access your public_html directory, you can do that with cd command. Example:

cd /home/user/domains/yourdomain.com/public_html/

Where user is your username and yourdomain.com is your domain name. You could also access public_html simply typing

cd domains/yourdomain.com/public_html/

since ssh log you into your home directory, however by typing full path you will always access right folder.

Downloading Files.

Now you can download files using wget command. Simply type:

wget https://www.yourstoragedomain.com/filename.png

You can also download from FTP server using wget. To do this simply type:

wget ftp://username:password@ftp.yourstoragedomain.com/filename.png

wget provides much more flexibility and features, to learn about them all you can see more info here.

Using rsync to Synchronize Files

Warning: Using rsync can cause file deletion so be sure what you are doing before using rsync.

rsync is powerful tool to synchronise files between servers, or just upload one from another. Example of usage:

rsync -avt olduser@olddomain.com:/home/olduser/domains/olddomain.com/public_html/logo.png user@newdomain.com:/home/user/domains/newdomain.com/public_html/

Where:

  • olduser is user from which you want to download file logo.png
  • olddomain.com is domain from which you want to download file logo.png
  • logo.png is file from olddomain.com which you want to transfer to newdomain.com
  • user is user from new server where you want your file to be downloaded.
  • newdomain.com is domain where you want your file to be downloaded.
  • public_html is folder where logo.png file will be downloaded. dont forget / symbol in the end.

rsync is very powerful tool with many features, if you want to know more about it you can read it here.

Need more help?

Please contact your hosting company for more assistance, or visit the DirectAdmin support forum at http://forum.directadmin.com.

Interested to try DirectAdmin? Get a 30-day Free Trial!