Difference between revisions of "TMS:Chapter Website Setup"
Line 3: | Line 3: | ||
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. | 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 == | + | ==Initial Setup in Dreamhost Panel== |
− | # Login to the [http://panel.dreamhost.com Dreamhost Control Panel] | + | #Login to the [http://panel.dreamhost.com Dreamhost Control Panel] |
− | # Select Domains > Manage Domains | + | #Select Domains > Manage Domains |
− | # Click the blue button "Add Hosting to a Domain / Subdomain" | + | #Click the blue button "Add Hosting to a Domain / Subdomain" |
− | # Fill out the form as follows: | + | #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) | + | ##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. | + | ##Select the '''Remove WWW''' option. |
− | ## Run this domain under the user: Keep '''Create User''' selected. | + | ##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. | + | ##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. | + | ##The Web & Logs directories will be pre-filled, leave them alone. |
− | ## Keep the PHP version selected as 7.2. | + | ##Keep the PHP version selected as 7.2. |
− | ## Check the option for HTTPS. Secure sites are typically assumed these days. | + | ##Check the option for HTTPS. Secure sites are typically assumed these days. |
− | ## Keep all the other checkboxes the same | + | ##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 & 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''''. | + | #Click the blue button '<nowiki/>'''Fully Host This Domain''''. |
− | # Review the success message and make a note of the password provided for the user. | + | #Review the success message and make a note of the password provided for the user. |
− | == Set up Database == | + | ==Set up Database== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Convert user to SSH == | + | #Select Advanced > MySQL Databases |
− | # Select Users > Manage Users | + | #Fill out the form as follows: |
− | # Next to the user you created previously, click Edit. | + | ##Database Name: use a name of the form '''''<tmschapter>_wp'<nowiki/>''''' (eg: tmsseattle_wp or tmsindia_wp) |
− | # On the next screen, change the User Type to '''Shell User''' and make sure Disallow FTP is checked. | + | ##Use Hostname: Select the option to Create a New Hostname (at bottom of the dropdown) |
− | # Click the blue button '''Save Changes'''. | + | ##New Hostname type in '''''mysql''''' and select the chapter's subdomain that you set up before: '''''<chaptername>.marssociety.org''''' |
− | # Note: wait a few minutes before moving on to the next section, to allow the user to be converted. | + | ##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 '''[https://strongpasswordgenerator.com/ 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== | ==Login to User & Set up Wordpress== | ||
− | |||
− | <nowiki>$ ssh tmsseattle@seattle.marssociety.org</nowiki> | + | Open a terminal on your computer and connect via SSH to the new user account. Eg: |
+ | <nowiki>$ ssh tmsseattle@seattle.marssociety.org</nowiki> | ||
+ | |||
+ | Install WP-CLI (reference: '''[https://wp-cli.org/ WP-CLI]''') by running these commands one by one: | ||
+ | curl -O <nowiki>https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar</nowiki> | ||
+ | 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. | |
− |
Revision as of 08:04, 13 May 2019
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.