Manchester WordPress User Group August

Meeting notes from Manchester WordPress User Group August. Mike Little goes over the usual WordPress news and answers questions from attendees. Then Tom Nowell goes into some of the great things you can do with WP-CLI.

Manchester WordPress User Group

General Session

WordPress 4.0 now in beta

https://wordpress.org/news/2014/08/wordpress-4-0-beta-4/

Hoping for an August release.

  • Embedded videos now in preview
  • Plugin install improvements
  • When you first install you can choose the language
  • Improvements to TinyMCE
  • Updates to widgets in the Customizer

Jetpack

https://wptavern.com/the-simple-criteria-that-determines-which-jetpack-modules-are-auto-activated

https://wordpress.org/plugins/manual-control/

wpcore app

Not had a play yet, but does look interesting

https://wptavern.com/wpcore-app-adds-export-feature-save-active-plugins-to-a-collection-with-1-click

The Future of the WordPress Codex

If you do find anything wrong in the Code, please do report it, or get an account, login and fix it yourself :smile:

https://wptavern.com/interview-with-siobhan-mckeown-on-the-future-of-the-wordpress-codex

Underscores now supports Sass

Does come with .css file, but you'll need to run something like grunt or gulp, or a gui such as codekit or livereload to compile further changes.

https://wptavern.com/underscores-wordpress-starter-theme-adds-support-for-sass

WordPress is a CMS (Whether You Like it or Not)

Blog post, good if you have a client who says "Isn't WordPress just a blogging platform?"

https://www.cmscritic.com/wordpress-is-a-cms-whether-you-like-it-or-not/

Other WordPress Events

https://wpuk.org/events/

Rhys Wynne is organising a walk for WordPress Europe - https://www.rhyswynne.co.uk/wordcamp-europe-walking-tour/

Q & A

How to prevent audio looping using a playlist

OMG! Mike's doesn't know the answer, that's a first :p

single audio - by default no autoplay, no loop

playlist - can't stop loop

Working Locally

https://2014.manchester.wordcamp.org/setting-up-your-machine-for-contributor-day/

Moving from a one site, to a multi-site.

For main content; Can do an export from the first site, then import it into the new multi-site.

Plugins can be a bit trickier, make sure they all exist on the the new multi-site, then look at copying the 'options' tables from the database.

How to change a multi-site, to a single site

Again export / import for content.

Plugin that may be able to help: https://wordpress.org/plugins/duplicator/

Again, can be done with some fiddling in the database, but can get a bit complicated, such as different table names.

Options for previewing mobile / tablet views of a theme

Mentioned Chrome Dev Tools > Emulation and also what's coming in Chrome Canary.

Also a useful bookmarklet: https://lab.maltewassermann.com/viewport-resizer/

Mention of Pattern Lab

Atomic design https://patternlab.io/

I also mentioned about smacss, bem, oocss.

On the break I spoke to Bellinda, who showed me this nice site she's done: /www.first-step.uk.com/ (no longer online)

Responsive as well, nice job :smile:

Also, Judi showed me this rather nice e-commerce site: https://www.freepeople.com/

Tech news

https://wptavern.com/wordpress-customizer-library-provides-a-simpler-way-to-work-with-the-customizer

Make WordPress Training

https://make.wordpress.org/training/

WordPress Leeds

https://wpleeds.co.uk/

23/09/2014 - WordPress Dev Night

SVG issue I mentioned

https://s10wen.com/blog/2014/07/29/illustrator-svg-layer-1-id-issue-take-2/

Tom Nowell on WP-CLI

Tom gives examples of some of the things you can do using WP-CLI.

What is The Terminal? "this is an example of an old machine, just running the command line" (erm no it's not lol @ google chrome)

In the examples, Tom uses > also commonly used is $ this character can be set to anything, in fact I change mine to some ascii art and a lighting bolt emoji:

In the following examples you don't type out the >.

1
> date

Google search data command and you get https://www.cyberciti.biz/faq/unix-date-command-howto-see-set-date-time/

1
> command parameter1 parameter2 etc...

No one remembers all of them! Google is your friend :smile: also --help is nice.

Essential commands:

1
2
3
ls
cd foldername
cd ..

Install

First off you'll need to install it. Some lovely instructions on how to do this are on the WP CLI home page:

https://wp-cli.org/

Some useful things you can do with WP CLI

  • Create Posts
  • Create Users
  • Download Plugins and Themes
  • Database Queries
  • Installing WordPress

e.g. adding an author to a site:

1
> wp user create bob [email protected] --role=author

Create a post:

1
wp post create --post_type=page --post_status=publish --post_title='A future post' --post-status=future --post_date='2020-12-01 07:00:00'

Install a plugin:

1
2
3
4
5
6
7
8
9
10
11
# Install the latest version from wordpress.org and activate
wp plugin install bbpress --activate

# Install the development version from wordpress.org
wp plugin install bbpress --version=dev

# Install from a local zip file
wp plugin install ../my-plugin.zip

# Install from a remote zip file
wp plugin install https://s3.amazonaws.com/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef

Check a status of a plugin:

1
wp plugin status bbpress

Activate it:

1
wp plugin activate bbpress

Create a user:

1
wp user create bob [email protected] --role=administrator

After this command was ran it also nicely generated a secure password.

Install plugin and activate from github:

1
wp plugin install https://github.com/Tarendai/better-wp-die/archive/master.zip --activate

Activated but with warnings! Oops, looks like Tom needs to update his plugin.

List plugin info:

1
wp plugin list

Show a list of plugins that need updating:

1
wp plugin list --update=available

Update plugin

1
wp plugin update akismet

Create a script to export the database

1
2
3
cd /srv/www/wordpress-default
mkdir backups
wp db exports backups/backup.sql

run with:

1
. backup.sh

drop tables

1
wp db drop

oops dropped the database!

1
2
wp db create
wp db import <filepath>

Also, thanks to Jack for a quick demo on wp shell

https://wp-cli.org/commands/shell/

1
wp shell

Browse by category: