Hosting your Web Site with WebFaction

When designing and developing a web site, there are many hosting options. We have hosting at MIT, but there are many other alternatives that offer robust solutions for hosting your websites and online applications. One of the sites we have found to provide excellent hosting options for many of our various projects and organizations is called WebFaction. WebFaction is designed for developers, and makes creating new sites and hosting databases easy. The following steps detail how to set up a WebFaction account, connect to it with an FTP client, where to code a basic webpage, and install a Content Management System (CMS) to manage your content.


1. Sign up on WebFaction

Navigate to the WebFaction site at www.webfaction.com. On the main page, click Sign Up.. You will taken to a page where you can establish your account. Set your username (perhaps use your MIT Athena username), password, and email, and make sure you chose 'Datacenter in the US'. Write these down, these are your login credentials.

signup

Signing up will take you to your personal control panel, which you can return to at any time by going to my.webfaction.com and entering your credentials. The WebFaction Control Panel is where you manage your hosting space, control various settings of your server, and create new webpages and applications.

upgrade

To fully activate and purchase your hosting plan, click on Billing -> Make a One Time Payment. Enter your billing information, and purchase a plan of atleast six months. It is cheapest if you buy a one year subscription. Once you have completed your payment information, you will have a full working hosting plan on which you can develop and host websites, web maps, and online databases.

To access your default homepage, navigate to http://username.webfactional.com/. You should see a page that simply says Hello world.

hello-world

2. FTP Access to your WebFaction Server Directory

You can add, remove, change, and modify files in your website directory using an FTP client and setting up a connection. FTP stands for File Transfer Protocol, and is a way you can connect to your server and upload and download files. Most FTP clients treat your server as if it were another folder on your computer, so it is very easy to move files around. There are many FTP clients available. The MIT recommended and cron supported client for both Mac and Windows is Cyberduck. Other options are SecureFX (for Windows), FileZilla (cross-platform), and FireFTP (a Firefox extension).

We have created a great primer on FTP/SFTP guidelines and options at the following link:

View the DUSPviz FTP Access Tutorial

WebFaction supports FTP and SFTP. SFTP stands for Secured File Transfer Protocol and encrypts files so as to increase security on your site. SFTP is much more secure than FTP and is what we will use for our connections to WebFaction.

To connect an FTP client to your web folder using SFTP you use the following connection information:

  • Server: webXXX.webfaction.com, where server is your server’s name (such as web310 or dweb89). If your account is only associated with one server, you can also connect to username.webfactional.com, where username is your WebFaction account name. You can find your server name in the WebFaction Control Panel under Web Server.
  • Connection type: SFTP
  • Port: 22
  • Username: your SFTP username (your WebFaction username), or the username of an additional SFTP account you have created.
  • Password: your SFTP account’s password (your WebFaction password).

When the FTP client opens, you will find the following file structure. You can upload and download files freely from here within the file explorer on your machine. Your website, pages, content, and maps will all be in the webapps folder.

webfactional

Note the location of the webapps folder in this directory. Here you can find your installations and static HTML pages, organized by application.

We will not do anything with this yet, but note this connection. It will be useful for uploading files and creating applications.


3. Edit your Homepage

As we saw above, when we navigate to http://username.webfactional.com, the default homepage reads "Hello world". To edit this, navigate to the webapps folder in your FTP client. In this folder, you will find a subfolder named htdocs. Within htdocs, you will see a file called index.html, this is document for your home page.

htdocs

Modify this file and add/store content in the htdocs directory to create a static website. To edit this file, download it using your FTP client to a working folder you determine. This working folder should contain nothing but your files for the web site, in order to keep things clean. You can then use a text editor to write code, make changes, and add content to this page. Some of the text editors we recommend:

  • Sublime Text – (Windows, Mac, or Linux) One of the most popular and well-loved text editors around. Free to download and use, but will occasionally show a pop-up window if you don’t purchase it.
  • Notepad++ – A solid and reliable text editor for Windows. Free.
  • Brackets – (Windows, Mac, or Linux) A newer, free open source code editor.
  • TextWrangler – A free text editor for Mac only.
  • DreamWeaver – Adobe’s software for making basic websites.

Using the htdocs folder is an easy, quick way to get a site going on your WebFaction account. For more on actually learning HTML and CSS, follow the DUSPviz 'Create your First Web Site' tutorial.


4. Installing and Using a Content Management System

Most individuals choose to use a content management system such as Wordpress or Drupal to make developing, maintaining, and updating their website easier. Using a content management system, commonly referred to simply as a CMS, is a good solution if you are going to be changing materials alot, there are many pages, or you are working on the website with a group of people. There are dozens of content management systems available for users. Two of the most highly used and robust are Wordpress, and Drupal. We recommend using either of these two, you can choose which you would prefer to use.


5. Creating a PostGIS Database (Optional)

An optional step, if you are working with geographic data, is to create a PostGIS enabled Postgres database. PostGIS databases are a common and useful way to store, manipulate, and query spatial datasets for maps and other spatial tasks. Follow the tutorial below to go over creating a PostGIS database and load a geographic dataset into your database. More on this will be covered at later dates.


This tutorial led you through the process of setting up a hosting account to serve web pages and create web sites on WebFaction. As always, this scratches the surface, now go create great websites!