NearlyFreeSpeech

From Open Source Ecology
Revision as of 03:27, 15 June 2012 by YK (talk | contribs) (→‎Popular Modules: Wordpress)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to Make a Website with NearlyFreeSpeech, a Domain and Hosting Provider

  • Domain is a name used to identify different websites. Example: opensourceecology.org
  • Hosting is the storing of all website information. Example: the code that makes this webpage background white.

Account Registration

  • Click Sign Up Now, then Create a Membership
  • Fill out Member Login, Your Name, Email Address, then Check I agree...
  • Within the next few minutes, an email from NearlyFreeSpeech will ask you to confirm your registration by clicking on a URL (universal resource locator). Click on the URL.
  • In the same email, copy or write down the Provided Login Password
  • Click on the Profile tab. In the Actions menu at the right of the webpage, click Change Password.
  • Fill in Confirm Old Password with the Provided Login Password, then fill in Enter New Password and Repeat New Password with (password of your choice).
  • Click Save Change.

Registering a Domain

Getting Started

Creating a New MySQL Process (while preparing to integrate Wordpress)

  • Follow the instructions until it mentions uploading content to the website using FTP.

Instructions

Uploading Content via SFTP

  • Get a content uploader to move information into your hosted repository.

Filezilla: FTP/SFTP Uploader

  • Login to your NearlyFreeSpeech control panel. Click Sites.
  • In the FTP/SFTP/SSH Information chart, note Username, Password, and SSH/SFTP Hostname.
  • Open the content uploader. Now fill in Host with the SSH/SFTP Hostname as noted before but put sftp:// in front of the name. Fill in Username and Password as noted before. Fill in Port with 22 (default port for SFTP). Now click Quick Connect
  • When you connect to your website for the first time like this, you will be warned about an Unknown Host Key. You must check the box with always trust this connection and save key in cache then trust this host and keep on connecting by clicking ok.
  • Now you should be able to click and drag or copy/cut/paste files and folders from your computer to your website's hosted repository.

Uploading Content via SSH

  • Linux:

Open terminal and type:

ssh [your SFTP/SSH username]@[your SFTP/SSH hostname]

Then enter your password.

Now you can upload content onto your website!

Modules

Working Applications

MIT volunteer info on setting up wiki

Popular Modules: Wordpress

Downloading WordPress

There are two ways to install Wordpress. One is to sync with the Wordpress SVN repository, the other is to download a compressed tarball of the Wordpress source and unpack it on the server. SVN is by far a superior method, and allows you to quickly and securely update your Wordpress installation.

To get the latest version of Wordpress via SVN:

note: this will install Wordpress in the subdirectory 'blog', if you wish to install it at the root of your site, skip the first and second SSH commands

This also assumes that 3.4 is the latest version of Wordpress, you can check for the latest version at http://wordpress.org/download/ . If a newer version is available, replace the '3.4' in the SVN command with the current version.

connect to your site via SSH and enter the following commands to download the Wordpress source:(Note the trailing dot on the svn checkout command!)

   mkdir blog
   cd blog
   svn co http://core.svn.wordpress.org/tags/3.4 .


Setting file groups and permissions

In order for Wordpress to work properly, you must first change some of the permissions and groups.

In your main Wordpress installation folder (/home/public/blog in this example) enter the following SSH commands:

   chgrp web index.php
   cd wp-content
   mkdir uploads
   cd ..
   chmod -R 775 wp-content
   chgrp -R web wp-content
   mkdir tmp
   chgrp web tmp
   chmod 775 tmp

To enable file/media uploads, you will need to do one or both of the following. The first is for the Flash uploader, the second is for the browser uploader, and the third is needed for deleting uploaded files:

   chgrp web wp-admin/async-upload.php
   chgrp web wp-admin/media-upload.php
   chgrp web wp-admin/post.php

Create a MySQL Process and Database

Follow the instructions in the NearlyFreeSpeech.NET FAQ to create a MySQL process if you haven't already. Then create a new database within that process. Note the name of the process and the name of the database.

Set up a new MySQL User

Do not use your own MySQL credentials to connect Wordpress to your database. Instead, create a new user. This will protect your member password in the event that your site becomes compromised.

   Click on the MySQL tab in the member interface
   Click "Open PHPMyAdmin"
   Enter the name of your MySQL Process, MySQL username, and MySQL password. 

This information can be found on the Process information page in our member UI, and is distinct from your member login information.

   Click on the "privileges' tab
   Click "Add new user"
   Give the user a descriptive name such as "wpuser" and a password
   Check all the permissions except "file" in the "data" box, everything in the "structure" box, and nothing in the "administration" box.
   Click "Go"
   Go back to the main PHPMyAdmin screen and create a new database
   Exit PHPMyAdmin

Run the Wordpress Installation

Open the URL for your newly-installed blog in a browser (your website name followed by /blog) and click "Create a Configuration File" and go through the Wordpress installation process. Enter your database name, the name of the MySQL user you just created, the password for the MySQL user you just created, and the process name (yourprocess.db) for the "host." Table prefix is optional.

Follow the rest of the installation instructions, saving your wp-config file manually:

Use an SFTP uploader as described on this webpage in a previous section (download filezilla, then run it. On linux, go the the bin directory then double-click filezilla). Move the wp-config.php file from your computer directory to the home/public directory of your website repository.

Tweaking wp-config.php

Open your wp-config.php file in your favorite text editor and add the following line to the bottom, right above "that's all, stop editing":

define('WP_TEMP_DIR',ABSPATH.'tmp');

Save the file. In your SSH client run the following:

chmod 644 wp-config.php

Enabling the built-in theme editor

This is not recommended. Nonetheless, some folks will want it:

   cd wp-content/themes
   chgrp -R web your-theme-folder
   chmod -R 775 your-theme-folder