TMS:Chapter Website Setup
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.
Contents
Initial Setup in Dreamhost Panel
- Login to the Dreamhost Control Panel
- Select Domains > Manage Domains
- Click the blue button "Add Hosting to a Domain / Subdomain"
- Fill out the form as follows:
- Domain to Host: create a new subdomain of the form <chaptername>.marssociety.org (eg. seattle.marssociety.org or india.marssociety.org)
- Select the Remove WWW option.
- Run this domain under the user: Keep Create User selected.
- Type in a new user name of the form <tmschapter> (eg: tmsseattle or tmsindia). Abbreviations are ok.
- The Web & Logs directories will be pre-filled, leave them alone.
- Keep the PHP version selected as 7.2.
- Check the option for HTTPS. Secure sites are typically assumed these days.
- Keep all the other checkboxes the same
- Click & do the Captcha if it is present on the page. If is not present, go onto the next step.
- Click the blue button 'Fully Host This Domain'.
- Review the success message and make a note of the password provided for the user.
Set up Database
- Select Advanced > MySQL Databases
- Fill out the form as follows:
- Database Name: use a name of the form <tmschapter>_wp' (eg: tmsseattle_wp or tmsindia_wp)
- Use Hostname: Select the option to Create a New Hostname (at bottom of the dropdown)
- New Hostname type in mysql and select the chapter's subdomain that you set up before: <chaptername>.marssociety.org
- First User: Select the option to Create a new user (at bottom of the dropdown).
- New Username: use the form tmschapter_db' (eg. tmsseattle_db or tmsindia_db)
- Create a strong password that is 20 letters long. You can do this various ways, eg Strong Password Generator
- Make a note of the password and paste it into the 2 fields.
- Click the blue button Add the Database Now.
Convert user to SSH
- Select Users > Manage Users
- Next to the user you created previously, click Edit.
- On the next screen, change the User Type to Shell User and make sure Disallow FTP is checked.
- Click the blue button Save Changes.
- 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.
Database Name: tmschapter_wp Username: tmschapter_db Password: <the password you created> Database Host: mysql.chaptername.marssociety.org Table Prefix: keep as-is
4. Click Submit.