Faces of WordPress is a community-centered project that celebrates the people behind WordPress and the projects they create that collectively drive WordPress forward in a way that directly benefits the community or the core software. Share your WordPress story here.
WP-CLI is changing the way developers work in WordPress. At the most simple level, WP-CLI is a set of command line tools used for managing WordPress installations. It takes commands that are already known and makes them easier to retrieve.
Daniel Bachhuber, lead WP-CLI project maintainer, shared his WordPress journey and talked about the current state of the project, and what’s in store for the future.
Bachhuber joined the project in 2013. At the time, he was working at WordPress.com VIP, dealing with support tickets. It was incredibly hard to quickly find the commands he needed to help people.
“I grew accustomed to all the different files but they all had different usage instructions and some did part of what you wanted not 100 percent of what you wanted,” Bachhuber said.
After wading through disorganized files and commands, he learned about WP-CLI, which was the answer to the messy repository. Bachhuber loved his contributor work and when the lead maintainer stepped down, took over the job.
Ever since then he has been pushing the project forward using it to solve problems for WordPress developers everywhere. The WP-CLI team announced a new co-maintainer, Alain Schlesser.
From Humble Beginnings
Daniel Bachhuber has been working with WordPress since 2008 when he co-founded CoPress, a company aimed at helping student newspapers move to WordPress. From there, Bachhuber became a Code Wrangler at Automattic.
It was during his time as Senior Engineer Bachhuber was introduced to the WP-CLI project. He was working on the project in his free time until the original maintainer stepped down.
After taking over the project, Bachhuber made a Kickstarter to help fund it and surpassed his goal within 12 hours. It was clear that the community wanted the tool and were willing to help make it happen.
Since the WP-CLI project launched at least 210 in total have contributed, with 20 to 25 contributors working on each release. Bachhuber was able to continue to maintain and contribute 5-10 hours a week, however, the pressure began to be too great.
“I think if you work on an open source project full time, it actually is harmful to the project in the sense that you run the risk of doing a bunch of stuff that’s not necessary, stuff no one needs,” he said.
A problem began to arise. Though people were contributing and helping make the project better, Bachhuber was the only one working on it consistently. He began to worry about what would happen if he had to be taken away from the project. As it grew, the WP-CLI became more complex and needed more maintenance. Bachhuber cited the “bus factor,” concerned that if he was hit by a bus, would the project live on
“How do I solve this problem of responsibility and this thing needs to keep going and be of sufficient quality. It’s already too big and complex of a thing,” he said.
It was clear the project needed help.
Growth
Bachhuber created an Ideas Repo where anyone could leave suggestions and requests. This gave him a better idea of how people were using the tool and how it could be improved. People then vote on the suggestions and Bachhuber begins working on whichever has the most votes. So far, feedback has been incredibly positive.
“Everyone loves it. It’s pretty humbling I would need to feel very confident that the next person to take the role is going to produce something I can use on a daily basis,” Bachhuber said.
Bachhuber is cautious about making changes because he knows what it feels like to get really used to a service or software and have everything suddenly change. So while he wants to produce the best product he can, things need to be done slowly in stages.
Why the WP-CLI?
Like the REST API, the WP-CLI makes WordPress more accessible. If basic commands are easier to use, more people will be able to use it to design their perfect sites, turning their dreams into realities.
WP-CLI is a straightforward tool that makes it easy for WordPress users to interact with the platform. It enables developers to speed up day-to-day tasks by using simple commands instead of shuffling from one tab to another using the platform’s dashboard.
To that end, the tool supports nearly every action you need to manage a WordPress site, including:
- Installing the platform
- Executing WordPress core updates
- Managing WordPress themes and plugins
- Creating child themes
- Importing media files in bulk
Regardless of whether you’re working on a test site, a live installation, or a multi-site network, WP-CLI can help make your life easier.
Moving Forward
Bachhuber announced he is getting the help he and the project needs with a new co-maintainer, Schlesser.
“With Alain joining the project as a co-maintainer, the WP-CLI project is restoring capacity to meet current demands (e.g. support), and ramping up on new feature development and evangelization. We’ve already improved the build time by 33 percent” Bachhuber said in the announcement.
Schlesser wasn’t sure about joining the project, but Bachhuber was able to convince him.
“I first met Daniel in person at WordCamp US in December of 2016,” Schlesser said.
“We casually talked about how the project could involve and what its future might look like. But still, at that point, WP-CLI was a project that I found very interesting in terms of its technical challenges, but that was not on my priority list of open source projects I wanted to invest large amounts of unpaid time into.”
The new addition to the team was made possible by this year’s sponsors that include SiteGr0und, WP Engine, DreamHost, Bluehost, and Automattic, as well as a large group of individual sponsors.
Together, Bachhuber and Schlesser will begin tackling things in the Ideas Repo. Top of the list being, Backup and Restore, followed closely by clean up unused options in the database, the famous five-second install, and more.
According to Schlesser, they are “currently working on dogfooding the package framework, so that all bundled commands are extracted out of the main repository. This will certainly help us to improve the onboarding experience for third-party developers. We’ll see whether that will allow us to grow a thriving ecosystem of command-line packages that mirror the richness of the WordPress plugin repository.”
Coming to the project, Schlesser has one main, albeit lofty, goal, “A personal goal for me would certainly be to get us closer to a true integration between normal Core and the CLI. All variations of manipulating the content database should ideally be running through more or less the same code paths. But given WordPress’ codebase and its philosophies, that certainly is a lofty goal, indeed.”
That integration would make the tool even more powerful and make it easier for developers to patch and add to the project, something Bachhuber is passionate about.
“I want it to be easier for more developers to contribute,” he said. “As a developer, there’s a variety of random tasks that you need to do as a part of your job and WP-CLI will always present the fastest way to do perform whatever task you perform if that command exists.”
WP-CLI is a powerful tool that enables you to dramatically speed up your WordPress development workflow. It might take you a while to memorize its commands, but you can always refer back to this guide until you learn them by heart. Even more than that, we can expect to see this tool become even more powerful moving forward.
What Does This Mean For WordPress
WP-CLI is a powerful tool that enables you to dramatically speed up your WordPress development workflow. It might take you a while to memorize its commands, but you can always refer back to this guide until you learn them by heart. Even more than that, we can expect to see this tool become even more powerful moving forward.
Let’s quickly recap how WP-CLI can help you speed up development in WordPress:
- Installing and updating WordPress: It enables you to skip the five-minute WordPress installation process by using a few simple commands.
- Managing WordPress themes and plugins: WP-CLI makes installing, updating, and activating WordPress themes and plugins dead simple.
- Creating child themes: You can simplify the process of creating a child theme into a single line of code.
The project is changing the face of WordPress. Not only is it making developer’s lives easier, it’s allowing less experienced developers an easier way into the CMS. This could point to a trend in a more automated platform. Along with the updates to the customizers, the WP-CLI is saving time and getting sites online faster.
Go to Faces of WordPress for more stories.
No Comments