Technical steps to a deployment

Deploying the Project platform to individual school chapters is an increasingly common task. Thankfully, recent efforts have streamlined this process greatly, reducing our financial and time investment. Today setting up new school chapters takes around 30-45 minutes of time and requires little technical knowledge.

A few key points to know, before you begin —

  • This process should only be carried out by Project core team members with some technical knowledge. You’ll need access to high-level credentials.
  • Each deployment is technically “isolated” — that is, they are separate and any future updates do not automatically happen on other deployments.
  • There are generally two types of updates: WordPress and plugin updates, which can generally be handled through the web interface, and Stallion platform updates, which do require some hands-on action (instructions below; around 5 minutes of time).
  • Currently, our domain registrar of choice is DreamHost. Our hosting provider of choice is MediaTemple. Our CDN/gateway DNS provider is CloudFlare.

Pre-installation steps (requires advanced credentials)

  1. Purchase the domain name from our domain registrar. Be sure to log any costs incurred on our internal master financial spreadsheet.
  2. Wait 3-4 hours for registration to complete. This can sometimes take 24 hours.
  3. Setup and configure CloudFlare for the domain name. Generally, drop all DNS records and add an A record for “@” (root domain), pointing to the PBJ server.
  4. Update nameservers in the DNS at the domain registrar to point to CloudFlare.
  5. Configure the server to start accepting requests from the new domain. For MediaTemple Plesk:
    1. Switch to the PBJ webspace, then navigate to “Websites & Domains”, then click “Add New Domain”. Enter the domain name, and then the following:
      DNS server configuration: Use DNS settings of a remote name server
      Document root:
  6. Create a new database and database user. For MediaTemple Plesk:
    1. “Websites & Domains”, then “Databases”, then “Add New Database” with name “PBJprod_schoolid”, where “schoolid” is the non-slashed version of the PBJ identifier (eg. “DCwhitehouse”)
    2. “Add New Database User” with username “PBJ_schoolid”. Use a 160-bit WPA key random key generator for the database password. Save this database password around temporarily.
  7. FTP and navigate to the domain directory. Delete all preexisting files.
  8. Upload the latest version of WordPress. Always download the .zip file, extract, and upload. Never use an automated installer.

While the website will not load until nameservers propagate (around 2 hours on average, but sometimes more), you’ll be able to upload files and configure databases immediately.

Installing WordPress and dependencies

  1. Navigate to the deployment website and create a wp-config.php configuration file:
    1. Input the database credentials as necessary.
    2. Enter school information as provided by the chapter. Username should be “national”; use a CodeIgniter encryption key random key generator for the password.
    3. Each time you encounter an email address field, enter the Technical Services email address, tagged with (use a plus sign) “schoolid#”, where # is an incrementing number. (eg. first one is “DCwhitehouse1”)
  2. Create a Dropbox directory for the school and update the main information document with new information.
  3. Log in as “national” and update any outdated software immediately.
  4. Install plugin dependencies. Navigate to the Plugins area and click Add New:
    1. Install the “Adminimize” plugin by Frank Bültge. Activate it after installation.
    2. Install the “Advanced Custom Fields” plugin by Elliot Condon. Activate it after installation.
    3. Install the “Lightbox Gallery” plugin by Hiroaki Miyashita. Activate it after installation.

Installing Stallion

  1. After logging in as an administrator, navigate to the Appearance area.
  2. Click “Add New” at the top and then select “Upload”, also at the top.
  3. Visit the Stallion Github repository and click “Download ZIP”.
  4. Upload the downloaded .zip file to WordPress, and then activate Stallion.
  5. Navigate to the Settings > Adminimize panel, and click “Export/Import Options”.
  6. Download the adminimize_export.seq file from the Stallion Github repository.
  7. Import the downloaded .seq file to Adminimize.

After installation

  1. Navigate to Users > Add New.
    1. Create the “school” account in the “Administrator” role.
    2. Use a CodeIgniter encryption key random key generator for the password.
    3. Use a Technical Services email address — not the school’s email address.
    4. Use “[publication name]” as the first name, and “staff” as the last name.
  2. Navigate to Pages > All Pages. Delete any preexisting sample pages.
  3. Navigate to Pages > Add New.
    1. Create a page titled “Home”. Leave it blank.
    2. Create a page titled “About”. Leave it blank.
  4. Navigate to Settings > Reading. Set “Home” as the static front page.
  5. Navigate to Posts > Categories.
    1. Add any categories, as specified by the school. In general, you can ignore the slug and let WordPress automatically generate these.
    2. Rename “uncategorized” to “News”. Change the “slug” to “news”.
    3. Add a “web exclusives” category, with the slug as “web-exclusives”.
    4. If it doesn’t already exist, add a “featured” category. If the school has specified a different name for this category, ensure the slug remains as “featured”.
  6. Navigate to Appearance > Menu.
    1. Create a new menu with “Home” and “About”, followed by all the categories.
    2. Ensure that the Theme Location (near the bottom) of this menu is set to “Header”.
  7. Navigate to Settings > Permalinks. Select “Month and name.”
  8. Navigate to Settings > General. Change the time zone to match the school’s.
  9. Navigate to Posts > View All. Delete all preexisting sample pages.
  10. Navigate to Posts > Add New. Add a new post entitled “Work in progress”. Fill the post content in with something generic about the school — just a few sentences is fine. Be sure to set this post under both “News” and “Featured” categories.
  11. Navigate to PBJ Options. Set reasonable defaults, specifically —
    1. Under “Home page customization”:
      1. Set “Feature element display” to “Rectangular — horizontal photo”
      2. Set “News ticker position” to “News ticker is on the right”
      3. Set “Featured category” to “Featured”
      4. Set “Online/web exclusive category” to “Web exclusives”
      5. Set all boxes to a category, where important categories come first — if you run out, some repeats are okay but please note any repeats in an email to the chapter.
      6. Set “Box #B1 title” to “We are [publication name]”
      7. Set “Box #B1 content” to “[publication name] is a publication run by journalism students at [school name] in [location].”
    2. Under “Breaking news”:
      1. Set “Are we in breaking news mode” to “Do not display…”

Note that you’ll also need to set up Google Analytics and Analytics email alerts — if you’re not in a position to do this, email Technical Services.

Updating Stallion

  1. Visit the Stallion Github repository’s list of releases and download the latest release as a .zip file. It should be downloaded as, where x.x.x is the current version number.
  2. After logging in as an administrator, navigate to Appearance> Themes.
  3. Click “Add New” at the top and then select “Upload”, also at the top.
  4. Upload the downloaded .zip file to WordPress, and then activate Stallion.
  5. Under Appearance > Menu, set the Theme Location (near the bottom) of the current menu to “Header”.
  6. Everything should be live. Visit the website and make sure nothing is broken.
  7. Return to Appearance > Themes and click “Theme Details” on the old version of Stallion. (Two ways to check if it is the old version: first, it’s inactive since you’ve just activated the new one. Second, on the Theme Details page, the version number is outdated.)
  8. Click Delete in the bottom-right corner to get rid of the old version(s).