How to Run WordPress in a Docker Container, Part 1

Wordpress docker installation

Here is a quick 3-step process for launching WordPress in a Docker container. You can use this to easily launch a new WordPress instance on your local system to test out new versions, new plugins or anything else.

First, though, you need to have Docker installed on your system. The simplest way for Mac and Windows users is to install Docker Desktop. This desktop download also gives you Docker Compose, which you will need. If you are running Docker on a Linux system, you will need to manually install Docker and Docker Compose.

To run WordPress, you also need a database running. The steps here use Docker Compose to launch TWO containers: one for WordPress and one for MySQL.

Three steps

Step 1 - Create a directory (a.k.a. "folder") and install the docker-compose.yaml file found in this Github repository. You can get the file three ways:

The key is to have this all in a separate directory because your WordPress installation will store some plugins there (see the notes below).

Step 2 - In a terminal window[1] type 'docker-compose up

This will launch the two containers and link them together. You will see logging to your terminal window. You can press Ctrl+C to stop the containers and get your command prompt back. To launch the containers in the background add a "-d" option:

docker-compose up -d

Step 3 - Connect to your new WordPress server at http://localhost:8080/

That's it!

Wordpress installation 660px

Now you simply go through the normal WordPress installation process and within a few screens your new site will be fully active.

Next you can update WordPress to the latest version, install whatever plugins you want, etc.

For example, I installed the WordPress Beta Tester plugin, went into its settings and turned on "Bleeding edge nightlies", performed an upgrade... and now I'm running the very latest WordPress 5.0 build. Perfect for the testing I want to do.

Credit for the simplicity of this approach is due to Github user "wglambert" who answered a request I made about help using the WordPress Docker container. Thank you!

Notes

  • Stopping the containers - do 'docker-compose stop'. This will stop the containers from running. Doing 'docker-compose start' will start them up again.
  • A 'wp-content' directory is created is created inside the directory in which you put the docker-compose.yaml file. Any plugins or themes you add will be stored here. This allows you to do a reinstallation and have all the plugins and themes available.
  • WHEN YOU ARE DONE and want all this to go away, just type 'docker-compose down' and the services will be stopped and the containers removed.

There are many more things you can do with docker-compose. The command-line documentation can help you learn more.

Next parts

I labeled this as "Part 1" because I'm planning to write about my own ongoing testing with Docker and WordPress. In future parts of this series, I intend to cover:

  • How to load in an existing site for testing
  • How to save your changes in a Dockerfile (so you don't have to start at the very basic installation each time)
  • ... and other things I learn along the way.

I also expect I may update THIS article over time as I do more with using WordPress and Docker.

I hope you found this helpful. Please feel free to leave comments here (unfortunately I have to moderate due to spam, and so comments will not appear immediately).

I also welcome pointers to other "WordPress and Docker" tutorials that people have found helpful. If you want to follow along with some of my other experiments with Docker and containers in general, I'll be writing about that over on Code.DanYork.com.


[1] or "command shell" or "powershell" or whatever you call it...


Returning to POSSE - Writing on my own site, THEN on Facebook, Twitter, etc

Sheriff posse flickr tom kelly

Over the past few weeks as I’ve been grappling with colon cancer, it has been soooooooooo tempting to just pop open the Facebook app, write a story in the box and press “Share”.

Simple. Easy. Done!

Or inside the Twitter app… or LinkedIn… or… or...

But here’s the problem with that...

All the stories get LOCKED INSIDE A PLATFORM!

They are there living on the platform’s servers, inside the platform’s systems.  Maybe they are visible publicly, maybe they aren’t.  Maybe they will be around in two years, maybe they won’t.  Maybe people will find them, maybe they won’t.

The future of your stories is entirely at the whim of the platform.

As I wrote about on the Internet Society’s blog earlier this year, one of my own guiding principles is “POSSE“, a content publishing model from the “IndieWeb” movement:

Publish on your
Own
Site,
Syndicate
Elsewhere

And so over these past few weeks, I tried really hard to do that with my journey through cancer: the diagnosis, followed by the recovery, followed by the results.

But it’s HARD. It was so insanely tempting yesterday when I got the great news just to pop open Facebook and share it with everyone.

But when I do that… it’s shared ONLY within Facebook’s shiny “walled garden”. It’s not shared with people I know who choose NOT to use Facebook. It’s not shared with the communities I’m in on other social networks.

The “open Web” on top of the “open Internet” is really the only way to do that. But it’s hard. There’s extra steps involved for me right now with the way my various blogs are set up.  I want to work to make that easier and simpler… but doing so will take time… which is challenging to find.

But if we don’t find ways to OWN OUR OWN STORIES then they will stay locked away in closed, proprietary walled gardens.  And maybe that’s fine for some of those stories. Maybe they are small and mundane… “in the moment” stories that we don’t really care about. But even so, we feed the platforms. We help them to grow.

 I’ll keep trying to follow the POSSE rule… and I’ll be writing more here about that.


Image credit: Tom Kelly on Flickr CC BY NC ND


Revisiting a Not-So-New Rule - No Social Media Usage Until I Have Created Something New

Being a writer not being distracted

I woke up this morning frustrated that I simply haven’t been writing across my various sites. In theory I am a “writer”, but I haven’t been writing! And as I wrote in My 3 Words for 2018: “because if I don't write... the stories build up inside of me until they want to explode like a pressure cooker without a relief valve. Writing is my relief valve. I need to do it.

So I said to myself- I know, I will impose a new rule on myself... no social media usage until I publish something new! A blog post, a podcast episode (such as my The Dan York Report short audio segments), an article on some site (ex CircleID), a longer update on a social site... something.... anything.... BEFORE I get sucked into the vortex of social media updates. 

And I will start with a blog post like this one...

Except... I discovered I WROTE THE EXACT SAME POST TWO YEARS AGO! July 24, 2016, to be precise.

And... I noted that on day #2, July 25, 2016, I had already failed. ☹️

So this morning’s great idea turns out to be nothing new. 

In fact, I can go back 10 years ago, to a post in September 2008, where I wrote about Jeremiah Owyang’s “Pay yourself first” philosophy. Or may many other posts about struggling with consistent writing.

Now, maybe this rule is like the “no sweets today” diet rule that turns out to be an aspiration that just doesn’t happen. And maybe EVERY day is too high a goal. Maybe every other day. But I have to do something, or consumption will win over creation. 

Unless, of course, I want to reframe my own perspective and think of myself as an “occasional writer”... and just accept only writing now and then  

I am not quite ready for that. Let’s see how I do this year!

 


Heading to Belgrade This Week for WordCamp Europe 2018 (WCEU)

Wceu 2018

If any of you will be at WordCamp Europe 2018 this week in Belgrade, Serbia, please do say hello. I'll be there starting this afternoon and am greatly looking forward to learning from many of the people involved deeply in the WordPress community.

In particular I'm looking forward to the Developing for Privacy and Data Protection session. Based on the work done in the community to help website operators comply with the European Union's General Data Protection Regulation (GDPR), this workshop will look at what comes next. I'm personally very interested to see where this will go.

I'll also be going to some accessibility workshops and checking in on topics such as caching, security and mobility that are always of interest. I also have some meetings with partners and others.

Anyway, if you're there at WCEU 2018, feel free to drop me a note.


Beginning NaPodPoMo - 30 Podcast Episodes in 30 Days

NationalPodcastPostMonth NaPodPoMoCan I publish one podcast episode each day for the month of November? That's the premise of "National Podcast Post Month" or "NaPodPoMo". Similar to the idea of National Novel Writing Month (NaNoWriMo), where writers sign up to write a novel in a month, NaPodPoMo is a way for podcasters to get in on the action for the month of November.

For me, I decided to do it just as an incentive to see about getting back into more content creation. As I explained in The Dan York Report episode 333, the last 10 months of my life have been focused on the launch of the Internet Society's new website. That's consumed a HUGE amount of hours... and left me with very little time for all the normal writing and audio production that I've done.

The Internet Society website launched on September 14, and in that TDYR episode 333 I naively thought the work was close to done... and that I'd have more time for content creation.

The truth is that there's been a great amount of work still to be done on the website - and so I have NOT been able to return to creating content.

But now we're getting closer... and my internal NEED to create content is driving me crazy.

So this NaPodPoMo is just an incentive to help me get back into the swing of creating more content.

I'll be publishing new episodes at my SoundCloud account at https://soundcloud.com/danyork

You're welcome to follow along this month! We'll see how I do!


Facebook Adds Stories to iOS/Android Apps to Try to Kill Snapchat

Facebook stories

Facebook truly DESPISES Snapchat!

As documented in a blog post today, Facebook has now added "Stories" to their main mobile apps. Just like Snapchat, these stories:

  • expire after 24 hours
  • can be either images or videos
  • have all sorts of filters and effects you can add
    • this includes a "masks" feature similar to Snapchat "lenses" that can change someone's face
  • can also be sent directly to one or more of your friends
    • and just like Snapchat, the recipient can view the photo - and then view the photo once more in 24 hours
  • can be created by simply swiping to the right to rapidly access the camera

If you reload your iOS or Android app today, you should see that the top of the app has changed. You now have:

  • a camera icon in the upper left corner that lets you open the camera
  • a "Direct" icon that gets you to images or videos sent directly to you. (Yet another messaging inbox.)
  • a bar of icons of all the friends who have posted Stories so far

And, as mentioned before, you can now swipe to the right to access the camera. If you don't have this feature today, you should within the next day or so.

Cloning Snapchat again and again...

Adding "Stories" to the main Facebook app comes as no surprise. It's been clear for a while that Facebook was jealous of all the people using Snapchat and wanted to bring them back inside Facebook's shiny walled garden. Facebook had already rolled out "stories" in their other Messaging apps:

  • Instagram Stories
  • WhatsApp Status
  • Facebook Messenger "My Day"

Of these, Instagram Stories has been viewed as successful. The WhatsApp and Messenger launches have been very recent and so it's not clear how many people will use them.

How will Facebook differentiate from Snapchat?

In their blog post, Facebook notes that:

Over the coming months, we plan to introduce new ways for the Facebook community to create their own frames and effects that can be used on any photo or video created with the new Facebook camera. Our goal is for the camera to be a home to hundreds of dynamic and fun effects that give you new ways to connect with friends, family, and your community.

We hope that with the new Facebook camera, Stories and Direct, it will be easier than ever to see the world through each other’s eyes

While it is possible in Snapchat to create a custom "geofilter", this teaser from Facebook sounds like a great bit more.

Facebook, of course, has a huge userbase. As I wrote in my "Directory Dilemma" post a few years back, users will use an app for messaging if the people they want to communicate with use that app. And the reality is that Facebook is the center of many people's communication.

So on one level, Facebook doesn't need to differentiate from Snapchat. They simply need to provide this functionality... and hope that this keeps people from opening up the yellow ghost app.

And of course, Facebook still supports regular text posts, photos, links, all of which last longer than 24 hours. They also have Facebook Live video streaming.

This is just really a way to bring "ephemeral messaging" (messages that disappear after a period of time) inside of Facebook's walls.

How many places can people post "stories"?

The question to me is really:

how many places can people realistically post their 24-hour "stories"?

Right now people have at least FIVE major options:

  • Snapchat
  • Instagram
  • Facebook
  • Facebook Messenger
  • WhatsApp

... and any other apps that are copying Snapchat right now.

The reality is that users won't post to all of them. They'll choose one... maybe two... and that will be it.

Many people will probably choose to stay right inside of Facebook's walls and use that. Or, if they are already using Instagram Stories, they may stay there.

But what about Facebook Messenger?

One curious aspect of this announcement is bringing direct messaging BACK INSIDE the Facebook mobile app.

Facebook has spent a couple years now moving messaging OUT of the "Facebook" app. They have forced people to use Facebook Messenger to send and receive direct messages on a mobile device.

Now using the "Direct" inbox, we can send and receive messages inside the Facebook app again.

Granted, the messages can only be viewed twice within 24 hours - and they are in the form of images or videos. But we do have messages in the Facebook app again.

It will be interesting to see how Facebook evolves these many different messaging and "stories" channels they have.

Which will YOU choose?

If you have read this far... do you see yourself using the Facebook Stories?

Or will you stay with Snapchat? or Instagram Stories?

Or are you using WhatsApp Status or Facebook Messenger "My Day"?

Or do you just wish this whole "Stories" format would go away? ;-)

Please do leave comments here or wherever this article appears on social media.


P.S. There are many other stories about Facebook Stories appearing today.



Big News! 360° photos now available for any WordPress site via JetPack plugin

360 photo

For those of us experimenting with "360-degree photos", last week's announcement of Jetpack 4.5 had a hidden but awesome feature: you can use a shortcode to embed your 360 photo or video into ANY WordPress site (that uses the Jetpack plugin).

Here is why this is so huge - up until last month, the only sites that would display 360 photos were either:

  • Facebook
  • Google StreetView

That was it. Two effectively closed walled gardens of content.

As I mentioned in my reports into a couple of For Immediate Release podcast episodes, my concern was that only Facebook users would really get this benefit. I wanted the ability to display 360 photos on any website.

On December 15, 2016, WordPress.com announced that all hosted sites could embed 360 photos or videos. This was a great step forward in bringing 360 photos out to more sites.

Then just last week version 4.5 of the JetPack plugin was released and, somewhat bizarrely, while the announcement contains no mention of this awesome new feature, an Automattic staff person confirmed the inclusion of the support in a comment.

You can read all about this new capability here:

Now, since this Disruptive Conversations site is sadly NOT on WordPress, I can't show you the features directly here. However, I've gone ahead and embedded 360 photos on two WordPress sites I have:

Those were both taken using the Google Street View application on iOS. (And yes, sometime I need to write or record a tutorial about how to do this.)

I have included the shortcodes in the blog posts so that you can see how easy this is to do. You just:

  1. Take the 360 photo using the Google Street View app on your smartphone. (This will save it to your camera roll on an iPhone.)
  2. Upload the image to your WordPress site.
  3. Use the appropriate shortcode in your blog post.

That's it!

Of course, you need the Jetpack plugin installed in your site, but that's all.

Many thanks to Automattic's Jetpack team for bringing out this capability so that we could set our 360 photos free of the walled gardens and bring them to any WordPress site!

What do you think about this? Will you try some 360 photos now?


FIR Episode 68 Available Now - Artifical Intelligence (AI), fake videos, PR trends, blockchain and much, much more

Fir68 shel 660px

Yesterday I had an incredibly fun experience starting off 2017 - and now you can share in that: For Immediate Release (FIR) episode #68 is available for listening or download at:

http://firpodcastnetwork.com/fir-68-us-actually-say/

Host Shel Holtz (in the big picture above) brought in C.C. Chapman, myself and former FIR co-host Neville Hobson as the panelists and we had an outstanding conversation that ranged widely. As noted in the show notes, the main topics included:


  • The incoming press secretary for President-Elect Donald Trump has warned us not to expect business as usual when it comes to the administration’s relationship with the media. What does that bode for the press’s ability to hold the administration accountable — and will the philosophy extend beyond the White House to business?
  • Some businesses have begun preparing for unexpected criticism from President Trump while others have already had to respond. Crisis experts are advising companies to add presidential jabs to the list of potential crises for which they must prepare.
  • Five industries are under threat from technology, according to the Financial Times: travel agents, small component manufacturers and distributors, auto insurers, financial advisers, and auto repair garages. How can they prepare (or can they)?
  • Artificial Intelligence will soon make it possible to create fake video with little effort. Think fake news is a problem now? Just wait.
  • Edelman Digital is out with its 2017 trends report. Among the issues the report raises, the panel was particularly interested in bots and conversational experiences, blockchain, and over-the-top entertainment.
  • Twitter CEO Jack Dorsey asked users what they wanted to see Twitter improve or create in 2017. He got answers (including one from longtime social tech leader Anil Dash). In the meantime, does Twitter know yet what it wants to be when it grows up (and will its recently announced live 360 video make a difference)?
  • Apple has published is first Artificial Intelligence paper.

It was fun to be part of the panel participating live versus the usual "tech reports" that I record each week for FIR episodes. And it was fun to have the kind of dynamic exchange that Shel, C.C., Neville and I all had. We've all known each other for a long time and so it all flowed quite nicely.

Speaking of a long time, this episode also marked the start of the 13th year of the FIR podcast! That's a remarkable bit of longevity for any podcast - and congratulations are really due to Shel for keeping it going as long as he has.

Next week I'll be back to presenting my tech reports. I continue to enjoy doing so and will keep at it in the years ahead.

Meanwhile... please do give this episode 68 a listen - and please do send in any comments to the show.


Will Facebook Live Audio be good for podcasting? So many questions...

Facebook live audio

Will "Facebook Live Audio" be good for podcasters? Will it help us engage with our audiences? Will it compete with SoundCloud and other similar platforms? Or will it pull people away from traditional podcasts to keep people within Facebook's shiny walls?

On December 20, Facebook announced the impending release of "Live Audio", initially with five partners and then "early next year" to more people. There's been a great amount of discussion but as of yet I've not learned of anyone who has seen/heard one of these new Live Audio events. Here is the info I've seen so far or can speculate on:

  • Users will be able to go live with audio in a similar way to going live with video.
  • Live audio content will go out in News Feed.
  • Listeners can ask questions and leave reactions in real-time during the live audio stream.
    • Presumably listeners will also be able to leave comments and reactions after the event is no longer live. Will Facebook differentiate as they do with comments to Live Video events? (Comments during the event have a red dot next to them.)
  • Facebook users can easily share the Live Audio streams to their own feeds and friends.
  • Listening will occur inside the Facebook mobile application. There will be an important distinction between iOS and Android listeners:
    • iOS users will only be able to listen while the Facebook app is open (and the phone is not locked). The users can continue browsing through Facebook while listening.
    • Android users will be able to listen in the background while using other apps.
    • To me this means that Facebook has not yet integrated with the audio interfaces within IoS that allow other apps to play in the background or on lock screens.
  • Techcrunch reports that Live Audio streams will have a limit of four hours in length.

As far as a motivation for launching Live Audio, Facebook mentions the feedback that some publishers prefer audio as a format. They also mention that some people are in areas where Internet connectivity is too low to support Live Video. Writing over on The Drum, Sean Larkin notes that Facebook needs new advertising formats and points to a recent study from The Trade Desk showing that advertisers are looking to increase their spending on audio advertising. Audio streaming and podcasts were highest rated in that survey.

In many ways this seems a logical extension of Facebook's desire to be THE place where people spend their time on the Internet. Given the explosive growth in interest in podcasts, it seems to me only logical for Facebook to try to bring some of that attention inside their walls.

Granted, it seems Facebook's initial focus is on the audio version of "live events" versus on podcasts. But to me podcasts are an obvious extention of this tool.

My Questions

Given that we can't see the Live Audio streams yet, or the tools to produce them, I find myself with the following questions:

  • Will users be notified with special "Dan York is live" kind of messages? (I suspect yes.)
  • Will Live Audio streams show up in the new "Live" tab in the mobile app? (as Live Video streams do now?)
  • What tools will be available for streaming audio? For instance, will there be anything to help with audio levels?
  • Presumably we will have to use the Facebook mobile app to stream the Live Audio streams. Will it be able to work with any other mobile apps?
  • Will we be able to bring in intros, outros, bumpers and other audio effects? Or will it truly be raw, live audio?
  • Will Live Audio streams also be accessible outside Facebook's walls to traditional podcasting apps? i.e. would there be a RSS feed that could go into iTunes? Or will it only work inside of Facebook?
  • Will Live Audio be a place to host a podcast? Or will it be another distribution channel?
  • Will Live Audio help spread the interest in podcasts and audio streams? Or will it impact the usage of traditional podcasting apps?
  • What will the impact be on SoundCloud? Many of us have found that platform useful for quick, fast podcasts.
  • And on a techie note, could you start out in Live Video and when connectivity drops, could you drop to Live Audio? Or will they be two separate event types that need to be started separately? (I suspect the latter.)

So many questions!

Given my interest in using SoundCloud for rapid creation and distribution of podcasts, I'll be curious to see how well Facebook Live Audio might work for podcasting. It might be good... it might be too constraining.

What do you think? Are you interested in Facebook Live Audio?


P.S. Another interesting aspect - over on The Verge, Casey Newton notes the potential of Live Audio for "witnessing" events: "Live audio of police confrontations might be less conspicuous, and thus easier, to broadcast than video streams."


Twitter Launches QR Codes on iOS App - But.... Why?

Apparently seeking to keep up with Snapchat's Snapcodes and Facebook's Messenger Codes, Twitter has launched QR codes in at least the iOS app. Here are two examples of how the codes look for me (it seems to change color each time you go into the menu option):

Twitter ios qr codes

I learned of this ironically from Krishna De over in a Google+ post. I can't find any mention on Twitter's blog or website.

You get to it by going into the iOS app, tapping on "Me" in the lower right corner and then on the gear icon in the top middle to get into your Settings. You then have "QR Code" as an option:

Twitter qr code

I did try the "QR Scanner" button on the "QR Code" page and it works pretty much exactly like the equivalent function in Snapchat and Facebook. When I pointed it at Krishna's QR code in her G+ post (as displayed on my Mac's screen), the app showed me her profile and let me know I was already following her:

Twitter qrcode 4

So it works.

But I share the same question Krishna has in her G+ post: WHY is Twitter doing this?

I'm not really sure why I would promote this as a way to have people connect to me. Twitter already has the "@" mentions such as "@danyork" that easily allows people to connect to my page. It's not entirely clear to my why this is needed.

Perhaps Twitter sees this as a way to help people more easily connect. From the "QR Code" page I have the ability to tweet the photo of "Share via..." and send it through other means.

But given that the QR Scanner is buried through several levels (Main page -> Me -> Settings -> QR Code -> QR Scanner) I don't see this really being any easier than simply typing in the person's user name in the app - or sending someone the URL for my Twitter profile.

I thought about the physical printing of one of these QR codes as a way for people to get to my account, but again, with the current level of steps you need to go through it seems to be more work than most people are going to want to do.

Perhaps this is just a case, as Krishna wonders, of Twitter wanting to keep up with Facebook and Snapchat. They all have codes, so Twitter needs a code.

Or maybe this a preview of features yet to come.

What do you think? What value (if any) do you see in these kind of QR codes? Would you use it?