Gutenberg editor resources roundup

I got the chance to present a little bit about the new WordPress editor (Gutenberg) at the OKC WordPress Developer Group meetup this afternoon. I left there with more questions than I had thought of going into it, which is great, but still a bit unnerving. Thankfully, there are lots of really smart and dedicated folks working on the new editor, and have shared what they know already in blog posts, talks, and code. ūüĎŹ Here’s a few of the resources I found most helpful the past couple of weeks as I spent time learning, questioning, and figuring out what to share:

Still some questions

There were some questions I hadn’t anticipated or didn’t have a good (or even bad, in some cases) answer for. Those are the greatest. I’ll list them here and would love it if anyone who has an answer would leave it in the comments.
  • What about Custom Post Types? Do they get Gutenberg support automatically?
  • What happens to my custom meta boxes? How do I register them with Gutenberg?
  • Can you nest blocks?
  • What happens when you remove the comments surrounding blocks?
  • Can you put multiple paragraphs into a single block?
  • What about page builders?
  • How does this work with WooCommerce?

Developer’s Rhapsody

Is this the real code?
Is this thing testable?
Caught in an infinite loop
No ESC on my new MacBook
Open your IDEs
Look up in the docs and see
How this function works, it’s not very clear;
I’ve stack traced, xDebugged
var_dumped, returned, console logged.
Anyway the logic flows, doesn’t really make sense to me…
oh, it’s async.

Opinionated Git Workflows and the People Who Love Them

(The slides for this talk have been removed until I can find an accessible and maintained solution. Thanks.)

Here are some additional resources for building and documenting your own Opinionated Git Workflow:

Using WP-CLI on SiteGround cPanel Account

I recently moved my main site to SiteGround, which has been pretty nice so far. One of the little issues I’ve had has been the same as several other hosts: not using the latest version of WP-CLI on shared hosting accounts. It’s not unusual, and often not a major problem, but I recently came across an issue that prevents me from using the version installed on the server (0.18.0) with the version of WordPress¬†I’m running on the site (4.4 trunk). Every time I tried to use certain¬†wp commands, I was greeted with a fun new error message:

Fatal error: Cannot redeclare class WP_Http in /home/morganes/public_html/wp-includes/class-http.php on line 21

WordPress 4.4 is undergoing some massive file changes, specifically with separating classes, functions, and implementation code into their own files and using the original file to load them all for backwards compatibility. One of those changes caused an error with WP-CLI trying to redeclare WP_Http the class when it loaded it via require instead of require_once. That’s been fixed in 0.20.0, so I asked my host to upgrade to it.

Since I have shared hosting, an upgrade to the script would involve upgrading it for all users. That’s something that’s done on a schedule, and I don’t know when that’ll happen. SiteGround’s systems engineering team hasn’t upgraded yet, so they suggested installing a local version of wp-cli on my account and using it. I followed the Alternative Install Methods guide but kept running into a problem with the output and strange characters. After much trial-and-error, I found out that the shared WP-CLI script uses a different version of PHP than the regular command line does. Making a couple of changes to my .bash_profile finally got the latest version working.

Here’s the final version that’s working for me with WP-CLI v0.20.1 and WordPress 4.4-alpha. I’ve decided to use¬†wpcli¬†as my command for testing, so I can keep SiteGround’s version of wp to know when they’ve updated.

# WP-CLI from user account
export WP_CLI_PHP="/usr/local/php54/bin/php-cli"
alias wpcli="$WP_CLI_PHP $HOME/.wp-cli/wp-cli.phar --path=$HOME/public_html/"

Come Join the WordPress Community in OKC

Are you an advanced WordPress user? Core contributor? Theme and plugin developer?

Maybe you’re a blogger, or looking to start. Or maybe you just inherited a site and have no idea what to do with it.

Great! Come join us as we talk about all these things and more at the OKC WordPress Users Group!

OKC WordPress Users Group

Edmond, OK
562 WordPress Enthusiasts

Meet other local fans of WordPress, the Internet’s classiest and fastest dynamic content management system. Gather and discuss the best ways to work with your software.

Check out this Meetup Group →