NearlyFreeSpeech: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
Line 52: Line 52:


[https://members.nearlyfreespeech.net/wiki/Applications/Working Working Applications]
[https://members.nearlyfreespeech.net/wiki/Applications/Working Working Applications]
=Popular Modules: Wordpress=
Installing 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.3 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.3' in the SVN command with the current version.
connect to your site via SSH and enter the following commands to download the Wordpress source:
    mkdir blog
    cd blog
    svn co http://core.svn.wordpress.org/tags/3.3 .
(Note the trailing dot on the svn checkout command!)
If you prefer not to use SVN, and plan on updating Wordpress over FTP (not recommended) you can use the following to download and unpack the latest version:
    wget http://wordpress.org/latest.tar.gz
    tar -xzvf latest.tar.gz
    rm latest.tar.gz
    mv wordpress blog
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 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.
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

Revision as of 06:50, 14 June 2012

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

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

  • 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. 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.

Modules

Working Applications

Popular Modules: Wordpress

Installing 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.3 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.3' in the SVN command with the current version.

connect to your site via SSH and enter the following commands to download the Wordpress source:

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

(Note the trailing dot on the svn checkout command!)

If you prefer not to use SVN, and plan on updating Wordpress over FTP (not recommended) you can use the following to download and unpack the latest version:

   wget http://wordpress.org/latest.tar.gz
   tar -xzvf latest.tar.gz
   rm latest.tar.gz
   mv wordpress blog

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 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. 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