TMS:Chapter Website Setup

From Marspedia
Jump to: navigation, search

This is a guide for setting up a new Chapter website.

A request will come from the Mars Society's Chapters Coordinator to set up a new chapter website. The Chapters Coordinator will provide the contact information for the chapter.

Initial Setup in Dreamhost Panel

  1. Login to the Dreamhost Control Panel
  2. Select Domains > Manage Domains
  3. Click the blue button "Add Hosting to a Domain / Subdomain"
  4. Fill out the form as follows:
    1. Domain to Host: create a new subdomain of the form <chaptername>.marssociety.org (eg. seattle.marssociety.org or india.marssociety.org)
    2. Select the Remove WWW option.
    3. Run this domain under the user: Keep Create User selected.
    4. Type in a new user name of the form <tmschapter> (eg: tmsseattle or tmsindia). Abbreviations are ok.
    5. The Web & Logs directories will be pre-filled, leave them alone.
    6. Keep the PHP version selected as 7.2.
    7. Check the option for HTTPS. Secure sites are typically assumed these days.
    8. Keep all the other checkboxes the same
    9. Click & do the Captcha if it is present on the page. If is not present, go onto the next step.
  5. Click the blue button 'Fully Host This Domain'.
  6. Review the success message and make a note of the password provided for the user.

Set up Database

  1. Select Advanced > MySQL Databases
  2. Fill out the form as follows:
    1. Database Name: use a name of the form <tmschapter>_wp' (eg: tmsseattle_wp or tmsindia_wp)
    2. Use Hostname: Select the option to Create a New Hostname (at bottom of the dropdown)
    3. New Hostname type in mysql and select the chapter's subdomain that you set up before: <chaptername>.marssociety.org
    4. First User: Select the option to Create a new user (at bottom of the dropdown).
    5. New Username: use the form tmschapter_db' (eg. tmsseattle_db or tmsindia_db)
    6. Create a strong password that is 20 letters long. You can do this various ways, eg Strong Password Generator
    7. Make a note of the password and paste it into the 2 fields.
  3. Click the blue button Add the Database Now.

Convert user to SSH

  1. Select Users > Manage Users
  2. Next to the user you created previously, click Edit.
  3. On the next screen, change the User Type to Shell User and make sure Disallow FTP is checked.
  4. Click the blue button Save Changes.
  5. Note: wait a few minutes before moving on to the next section, to allow the user to be converted.


Login to User & Set up Wordpress

Open a terminal on your computer and connect via SSH to the new user account. Eg:

$ ssh tmsseattle@seattle.marssociety.org

Install WP-CLI (reference: WP-CLI) by running these commands one by one:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
mkdir bin
mv wp-cli.phar bin/
export PATH="$HOME/bin:$PATH"
echo  'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc 

Test that WP-CLI is installed successfully using:

wp --info

Change directories into the chapter's webroot:

cd chaptername.marssociety.org

Install Wordpress using WP-CLI

wp core download

Open up a browser and go to the chapter website URL.

https://chaptername.marssociety.org

You should now see the Wordpress Setup wizard.

  1. Select your language and press Continue.
  2. Press "Let's Go" button on the next screen.
  3. Enter in all of the database details you set up previously:
    1. Database Name: tmschapter_wp
    2. Username: tmschapter_db
    3. Password: <the password you created>
    4. Database Host: mysql.chaptername.marssociety.org
    5. Table Prefix: keep as-is
  4. Click "Submit", then click "Run the Installation".
  5. On the next screen. fill out the form as follows:
    1. Site Title: <name of chapter> (eg: Mars Society Seattle or Mars Society India).
    2. Username: use "admin" for this.
    3. Password: keep the autogenerated password but make a note of it.
    4. Your Email: type in webmaster@marssociety.org
    5. Keep the last checkbox unchecked.
    6. Click "Install Wordpress"

Login to Wordpress & Change Theme

  1. Download the latest Chapters theme zip to your computer from this location:
https://github.com/marssociety/tmschapters/archive/master.zip

(Rename the zip file from master.zip to tmschapters.zip)

  1. Login to Wordpress using the "admin" user and the password that was provided by Wordpress above.
  2. Select Appearance > Themes
  3. Click "Add New" at the top of the main screen.
  4. Click "Upload Theme"
  5. Click the small "Activate" link at the bottom of the next screen.
  6. Confirm that both the Chapters theme and the parent theme "Understrap" have been installed, by checking the Appearance > Themes screen.

Set up Initial Pages & Configure Wordpress

  1. Create New Page "Contacts" and put in the chapter contacts.
  2. Create New Page "Events"
  3. Create New Page "Projects"
  4. Go to Appearance/Menus and create a new menu called "Main" with Home/Contacts/Events/Projects. (Delete Sample Page). Make sure Display Location = Primary Menu is checked.
  5. Go to Appearance/Widget and expand "Footer Full". Drag in a Custom HTML widget to that area. Put in a copyright statement or whatever other information you'd like.
  6. Modify the Right Sidebar to include or remove any widgets you'd like. We recommend removing the "Recent Comments" and "Meta" widgets.
  7. (Optional) Turn off comments: Go to Settings/Discussions and uncheck "Allow people to post comments on new articles". Also uncheck "Allow Comments" on all Pages and Posts.
  8. From here, customize the site however you'd like.