Category: WordPress

WordPress

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...

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.

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?

WordPress Now Powers 25% of Top 10 Million Websites

W3techs wordpress 25percent

Fascinating news out of W3Techs earlier this month that WordPress now powers over 25% of the Alexa top 10 million websites. The next closest content management systems (CMS) are Joomla at 2.8% and Drupal at 2.1%.

The full stats are found here:

http://w3techs.com/technologies/overview/content_management/all

And a quick view of the top of the chart shows more data:

W3techs cms nov2015

Note the very top line - and this one is extremely important:

57.2% of the top 10 million sites do NOT use an identifiable CMS.

Either those sites use custom software or somehow strip off identification so that the tools W3Techs uses cannot detect the type of CMS that is being used by that site.

This leaves 42.8% of the top 10 million websites that DO use a CMS.

If you look at the chart:

  • the grey bars indicate the CMS' percentage across all Alexa 10 million sites
  • the green bars indicate the CMS' percentage within sites that use a CMS

So the net is:

  • 25.1% of the top 10 million sites use WordPress
  • Of the 42.8% of sites that use a CMS, 58.7% of those use WordPress

And of course all of this data is only on the Alexa Top 10 million sites. There are then millions more sites using various CMS' - and some % of those will be using WordPress.

Still, the Alexa Top 10 million is one set to use - and W3Techs has now been doing these measurements for years.

One interesting note out of the W3CTechs blog post about this milestone is what happens when you move from looking at the Top 10 million to the Top 1000:

When we split up all websites by traffic level, we see that WordPress is leading at all levels, but the market share among the top 1000 sites is significantly lower at 30.3%. Drupal (19.7%) and Adobe Experience Manager (11.8%) are the other dominant systems in that section. Note, however, that using a standard CMS is not very common among the top 1000 sites, more than 90% of them are custom developments.

The article also has some interesting stats on usage by language. It also has this note:

WordPress is not only the most popular CMS, it is also the fastest growing system: every 74 seconds a site within the top 10 million starts using WordPress. Compare this with Shopify, the second-fastest growing CMS, which is gaining a new site every 22 minutes.

WordPress' Matt Mullenweg chimed in with a post "Seventy-Five to Go" noting that the goal now was much of that remaining 75%, particularly the 57% who do not use any CMS right now.

He may be on to something there. If you look over at W3Techs historical yearly trends in CMS usage, you can see the rise of WordPress, but also the decline of "None" from 76.4% in 2011 to 57.2% most recently:

W3techs trends

So does all this mean that you should ditch your other CMS' and move to WordPress? Or that you should use WordPress for your next project?

Not necessarily.

I'm a firm believer that you need to use the right tool for the right job and the choice of CMS can depend upon many factors related to your individual site and needs. And while I use WordPress as the CMS for almost all of my newer sites, I also use other platforms for other sites.

And... from a security point of view, I do like a diversity of different systems out there - and I like the fact that there is competition and choice among open source CMS'.

However, the report certainly shows the robust and continued growth in the WordPress platform and the strength of the overall WordPress ecosystem. And it bodes well for the future of WordPress.

Congratulations to the team at Automattic and all the MANY people contributing as part of the much broader WordPress ecosystem!

P.S. I first heard about this statistic on the WordPress Weekly podcast epidode 212. If you are interested in WordPress, I find this podcast useful.

P.P.S. There's an irony, of course, that I'm writing this on a blog hosted on TypePad... I keep thinking that some year I'll move it to WordPress, but the effort involved is huge...

Is There A WordPress Plugin That Adds Easy "Sign A Petition" Support?

Petition

Has anyone found a great plugin for WordPress that adds the easy ability for visitors to a site to "sign" a statement or position and have their name appear? If so, could you please share the info?

Here's what's going for me - I operate a site, www.openwsis2015.org, where there are multiple public statements published relating to Internet governance. We are actively seeking more signers/endorsements for both... and my process of adding people to the list of signatories is cumbersome and inefficient.

My Current Inefficient Process

Here's the process I go through when someone signs the recent Joint Statement on WSIS+10:

  1. The person submits the signing form with their info.
  2. I receive an email with the person's information.
  3. I open up the WordPress admin interface and navigate to the TablePress page.
  4. I open up the appropriate table (organizations or individuals) for editing.
  5. I manually copy and paste the info from the email into the TablePress table.
  6. I save the table.
  7. The name now appears on the list of signatories.
The whole copy/paste thing is what kills me.

The Process I Would Like To Have

Here's how I'd like it to go:

  1. The person submits the signing form with their info.
  2. I receive an email telling me there is a new signatory to moderate.
  3. I open up the WordPress admin interface and navigate to the TablePress page.
  4. I click a link in the email that brings me to the appropriate tab in the WordPress admin interface.
  5. I click on an "Approve" link in that admin window.
  6. The name now appears on the list of signatories.

Essentially what I'm looking for is something like the regular moderate Comments interface... only when I approve the submission it shows up in a table instead of as a comment to the page or post.

And I want it to be customizable in terms of what fields I use. These particular statements have the fields they do, but for the next time I do this I may want different fields.

My Search So Far

I searched through the WordPress plugin directory using the keyword "petition" but most of the plugins I found use external services.

I don't want that. I want a petition/statement page running on my own site without any dependencies on external services.

The YAWPP (Yet Another WordPress Petition) plugin looks interesting... but I'm concerned that it hasn't been updated in 2 years. That's a long time in the world of WordPress... and support requests don't seem to be being answered.

I've tried other search terms and I've done some brief searching of commercial plugins, too, and haven't yet found anything. I also thought that perhaps I need to look at something where people are signing up for an "event"... that then shows the list of people who have signed up. Perhaps some kind of event/meeting plugin could be repurposed this way.

And yes, I could probably kludge this together in some way by hacking away on a customized WordPress theme or something like that... but I don't have the time or interest in doing that.

So let me throw it out here... HAVE ANY OF YOU USED ANYTHING THAT WOULD DO WHAT I WANT?

Either free/open source or commercial... I'm interested in either.

Any suggestions would be GREATLY appreciated!

Thanks!


A Bonus Question - Logos?

You'll see at the bottom of the submission form that I say that organizations should send their logo to me via email. What I ideally want to do is have a third column on the Organizations table where I can display a standard size thumbnail of the logos of the various organizations.

Ideally I'd love it if the form interface could allow someone to upload a logo which, again, could just be approved as part of the moderation process.

But that's the ideal world... right now I'd take just getting the names in there so that I can avoid the whole copy/paste in email thing. :-)

Speaking of that, a bunch of signatories came in overnight... time to go do some copy/pasting...

WordPress iOS App Now Has WYSIWIG Visual Editor

Writing blog posts for a WordPress site on an iPad or iPhone just got a whole lot easier! Or... at least, a whole lot prettier! With the new version 4.8 out this week, Automattic included a new visual editor that can give the "what you see is what you get (WYSIWIG)" experience:

Wordpress 4 8 wysiwig

Here is what it looked like before the change on my iPad - basically, it was just a raw HTML editor:

WordPress ios app before upgrade

There was a preview mode that would let you see what it was going to look like, but all the writing was in HTML. No big deal if you are a long-time HTML coder like me... but probably not the most fun for newer writers - and the HTML markup is also distracting.

Here is what the new post-upgrade view is:

WP iOS app after upgrade

A much nicer view - and also some of the commonly-used features are more accessible. There's also the "HTML" button for those who want to get into the actual HTML code.

The WordPress.com blog post about the new iOS version gets into a few of the other features that the new app has. I do like the updates to the navigation. I haven't yet worked with the new image settings, but look forward to doing so.

Anyway, if you haven't yet upgraded the WordPress app on your iOS device, you may want to do so... and if you haven't tried the app in a while you may want to give it a new try.


If you found this post interesting or useful, please consider either:


FIR On Technology Episode 3 – Understanding Markdown

Firontechnology 300What is the Markdown language all about? How is it being used on sites like Ello, Github and in the Jetpack plugin for WordPress? Why should communicators and others involved in PR or marketing careabout Markdown? How can it help more rapidly create content for the web?

Those are all questions I sought to answer in episode 3 of FIR On Technology with Dan York that I published last Friday. The podcast is now available for listening directly on the FIR website or in iTunes or the podcast RSS feeds.

On the episode web page I also provided a list of links for people wanting to know more about Markdown, which I'm reprinting here: 

I've found using Markdown to be extremely helpful in rapid content creation. I've naturally been using it on Ello (where I also wrote about this FIR On Technology episode) and on Github, but I'm also starting to use it for some posts on a couple of my WordPress sites courtesy of the Jetpack plugin. As I note in the episode, Markdown is not something necessarily new... after all it first came out in 2004... but it has seemed to attract more interest in recent years.

One point I forgot to make in the episode is that Markdown is not the only "lightweight markup language" out there. There are definitely other similar languages, each with their own take on how to make markup simple. An example I've used on several sites in the past is Textile. However, my interest these days has been in Markdown, and there seems to be a good bit of momentum behind the language... and so hence this podcast.

Anyway... I hope you find it useful and helpful. If you do, or if you have other comments or ideas or suggestions about Markdown, please do leave a comment here - or over in the FIR Podcast Community on Google+.

Enjoy!


P.S. I also recorded a The Dan York Report episode providing a preview of this FIR On Technology episode:


If you found this post interesting or useful, please consider either:


WordPress Seeking Feedback About "Community Hub" – Fill Out The Poll Today

Wordpress orgWhat would you like in a "community hub" website that would help local WordPress groups? What would you like to see for helping publicize events? Connecting groups to each other?

If you are involved with a local WordPress group, or would like to start one, the team behind the "Make WordPress Community" effort would like your feedback on what should be part of a community hub web portal. They'd like you to fill out this quick survey:

http://wordpressdotorg.polldaddy.com/s/community-hub-voting

The poll closes at 00:00 29th January 2015. (Not sure the timezone... so I'd err on filling it out sooner than later.)


If you found this post interesting or useful, please consider either:


New WordPress 4.1 Provides Much Improved Distraction-Free Writing Experience

WordPress version 4.1 is out today and the greatest feature I like is a new and MUCH improved "distraction-free writing" experience.

Wordpress4 1 dfw

The beautiful part about this is that when you click in the window and start typing, all the sidebars and menus fade way so that you can just focus on writing...

BUT...

... the moment you move your mouse outside the writing window all the sidebars and menus come back!

This is a huge improvement over the previous experience with WordPress 4.0 where once you clicked the button you were in a white screen with no way out unless you scrolled up and clicked the link in the menu bar that appeared:

Wordpress4 0 dfw

I found the WordPress 4.0 way so annoying that I never used it. Inevitably after I entered the mode I needed to change categories or tags or something like that - and so it was simply easier to NOT use the distraction-free mode.

The WordPress development team produced a video that shows how well this new writing mode works.

I like it because it lets me write but also makes it super easy for me to get back to the menus and sidebars.

All you need to do to enable the "distraction-free writing" mode is to click on the box on the right top of the editing window:

Dfw

It acts as a toggle to turn the "DFW" mode on or off.

Very nicely done!

There were of course many other aspects of the WordPress 4.1 release. The release post and the field notes as well as the codex entry go into much more detail. The Twenty Fifteen theme is pretty cool... and some of the other features are also interesting. But for me... I just like this new writing environment!

What do you think? What do you like best about WordPress 4.1?


An audio commentary is available as TDYR 200:


If you found this post interesting or useful, please consider either:


The WordPress Plugin I Want: Statistics About Content Creation – Number of Posts, Pages, etc.

Here's the one WordPress plugin I really want to have - something that tells me the number of blog posts, pages or other content types that have been created in my site over a certain period of time.

As every year draws to a close, I'd like to be able to generate a report that says something like:

In 2014, we created:
  • 210 blog posts
  • 43 pages
  • 25 events
  • 72 articles (or pick some other 'custom post type' that you create)

Now, for some sites, like the Deploy360 site at work, I'd like to be able to do this on a quarterly basis so that we can provide updates internally about how much content we've created. For this reason I'd love to be able to choose a date range for a report. I also want the plugin to be able to work with custom post types, as on a couple of sites I've used that feature to create new post types with certain formats so that they are easy to enter by authors.

That's the minimum of what I'd like - the number of posts, pages and other content types created within a given interval.

Beyond that, a few other features would be great:

  • the word count for each type of content and in total;
  • these kind of statistics based on categories and tags so that I could know how much writing is happening on different topics (kind of like the Story Board in the EditFlow plugin only with counts);
  • these kind of statistics for each author of content, so I could understand the output of the writers on a site.

All of which would be great... but the key is the early part about the counts of content type over a time interval.

Anyone using a WordPress plugin that does something like this?

If so, PLEASE LET ME KNOW! Either as a comment to this post or on social media... or via email.

I've spent time searching the WordPress Plugin Directory but so far I haven't found anything that fits what I need. A great number of the "statistics" plugins are related to visitor statistics, i.e. how many people visited your site - but I don't need that. I already have Google Analytics and the Jetpack plugin helping me there.

What I want are content statistics.

I want to be able to easily see how much content I and the others who write on a site are producing over a given interval.

I'd note that for some sites (such as my work) I'd be willing to pay for a plugin like this if it were from a commercial plugin developer.

Seen anything like this?


UPDATE: I should have noted that the closest plugin I've found so far is Word Stats, but the plugin hasn't been updated in almost 2 years and while it works fine on one of my sites, it has a problem creating reports on another of my sites and another site went unresponsive after I activated the plugin (and so I quickly ssh'd in and removed the word-stats plugin directory).


An audio commentary is available as TDYR 199:


If you found this post interesting or useful, please consider either: