Configure a WordPress CMS

Section Explanation

This section is a walkthrough for creating a WordPress site in minutes on your workstation with the intent to publish to an S3 website.  Other sections will cover the act of publishing and long-term lifecycle management of the WordPress CMS.

Requirements

To create a website you need:

  • A computer with Docker installed.  For directions on installing docker please click here.
  • An Amazon Web Services Account [AWS].  For directions on how to open an AWS account please click here.

Start the command and control container

To simplify differences in environments this walkthrough provides a command and control container to manage the WordPress container.  To run the command and control container simply run docker run -it  -v /var/run/docker.sock:/var/run/docker.sock modernit1/cms-cnc:latest.  As shown in the below code block.

MacBook:~ tbott$ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock modernit1/cms-cnc:latest
Unable to find image 'modernit1/cms-cnc:latest' locally
latest: Pulling from modernit1/cms-cnc
ae79f2514705: Already exists
5ad56d5fc149: Already exists
170e558760e8: Already exists
395460e233f5: Already exists
6f01dc62e444: Already exists
d1b43999e51a: Pull complete
cb7a3bdc1a5e: Pull complete
7e0a4cb351e1: Pull complete
b729c80f38f5: Pull complete
52ec87f6197e: Pull complete
Digest: sha256:ebc5262828627ddcab742806a2fa5835ad6af4d64e991d2b9b28d9c7edcbf05e
Status: Downloaded newer image for modernit1/cms-cnc:latest
[email protected]:~/]$
If your copying and pasting using a mac you need to ensure to paste with cmd-shift-v.  Otherwise, OSX may change the characters.

Start our new WordPress CMS

From our command and control its time to start our new CMS.  This is done by running: start-new-cms <cms_name>

As shown in the new code block below.

[email protected]:~/]$ start-new-cms examplecms
04fd9ca4ccc97a5efcefc843ba68ff08927e8b221dc544469445945704296d61
[email protected]:~/]$ docker ps
CONTAINER ID        IMAGE                            COMMAND             CREATED              STATUS              PORTS                NAMES
04fd9ca4ccc9        modernit1/wordpress-cms:latest   "/entrypoint.sh"    About a minute ago   Up About a minute   0.0.0.0:80->80/tcp   examplecms
c245fa687ef1        modernit1/cms-cnc:latest         "/bin/bash"         About a minute ago   Up About a minute                        clever_keller
[email protected]:~/]$

Connecting to the CMS

WordPress sets up the database based on the site name in your browser.  To make it easy to manage the CMS mapping from the browser I use the Chrome Plugin DNS Overrider.  Located here.

I then set up the DNS name for my CMS to point to the IP of my workstation.  As shown in the below screenshot.

I got my ip address on OSX by running: ifconfig | grep 192.168.   As shown in the code block below.

MacBook:~ tbott$ ifconfig | grep 192.168
	inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255
MacBook:~ tbott$

CMS Setup

With docker running we are ready to configure our WordPress CMS.  With the DNS over-ride you should be able to get to your CMS, and select the language to use, as shown in the screenshot below.

If you have problems please make sure you are going to https://cmsname *not* https.

General Setup

Your next screen asks for the general setup.  Simply fill using a Title and Username that applies to the function of this CMS.  Screenshot included below.

Login

Once you log in, you can setup your CMS.  Screenshot below.

CMS Usage

It is not the intent of this post, to document how to use the WordPress CMS.  Perhaps this will be added in the future based on feedback.  For now, the best I can offer is to suggest Google as a resource for the world knowledge.

WordPress Plugins

We are trying to take advantage of the WordPress CMS.  With this usage in mind, the plugins which are chosen should function in that model.  I have included a few plugins that I have found to be standard.

  • Disable Comments” By Samir Shah 
    • This plugin disables the comment space on our pages.  This is important as static web pages don’t’ support the WordPress Comment Requirements.  Luckily there are other ways of including comments or this site would be lacking comments.
  • Google Analytics by Analyticator” By Analyticator.com 
    • This plugin sets up the pages of the site to report back to Google traffic and user data.
  • Lana Sitemap” By Lana Codes 
    • If you want search engines to index your site you must set up a sitemap.  Luna  Sitemap does a great job setting up the sitemap.
  • Responsive Lightbox” By dFactory
    • There is no great reason for the responsive lightbox, I just like it.
  • WP Edit” By Josh Lobe 
    • This extends the already good CMS edit strings.
  • WP Static HTML Output” By Leon Stafford 
    • This is where the magic happens.  This is the plugin which uploads to S3.

What Next?

At this point, the CMS is up.  Our work isn’t done, you decide what to take on next.