Welcome back to the Official Plesk Podcast, Next Level Ops! This week we’re taking a deep dive into WP-CLI, a popular tool for our WordPress community! WP-CLI is a command-line interface that is able to execute WordPress code, as well as update and manage sites, and so much more. So while you’re locked into specific use cases using the Dashboard (namely the ones the Core team thinks of), WP-CLI is much more expressive and scalable.
For this episode, we’re joined by Alain Schlesser, WP-CLI wizard and master software engineer. He’s the Senior Engineer at XWP; but he also maintains WP-CLI as an open source project.
In this Episode: Automating WordPress
You see, WP-CLI isn’t just a replacement for the WordPress Dashboard. It’s a complete toolset that lets you interact with, and modify, WordPress through Shell commands, without the need of a web browser.
That means you can do complex actions like generating a ton of dummy data, copying website blueprints to quickly spin-up new sites, or deleting millions of spam comments without breaking a sweat.
In this episode, we explore how this tool can make your life easier, and how to make the software work for your business.
- The WordPress Dashboard is a typical GUI (Graphical User Interface) designed with specific use-cases in mind. That’s why CLI is way more expressive.
- It’s also a much more scalable solution because you’re not dealing with the assumptions of Core developers. So you can create anything you’d like!
- When you’re running a Dashboard solution, everything is a standard web request. With WP-CLI, you run the commands through shell.
- It doesn’t just allow easy scripting, but for a normalization layer. If you have a common set of tools and settings you use for each site, WP-CLI can normalize the installation process for you.
- You can start off simple, updating Core, themes, and plugins, and then move on to more complicated actions. There are very powerful commands to do imports and exports, combined with search and replace.
- This allows you to have fully automated site migrations.
- WordPress has been changing rapidly, and WP-CLI is trying to keep up. They’re working to make sure everything is compatible with Gutenberg (i.e. the editor blocks that are used to create content layouts on WordPress).
- They’re also working to ensure that WP Scaffold, a feature that allows you to spin up new plugins and themes, functions properly.
- Any plugin can integrate and support WP-CLI by adding their own set of commands. For example, if you use a Forms plugin to gather submissions, you can use WP-CLI (integrated with that forms plugin) to gather all of the data, and create beautiful reports and charts.
- The possibilities are endless with WP-CLI. It’s really the most uninhibited version of WordPress you can get.
The Official Plesk Podcast: Next Level Ops Featuring
Joe is a college-accredited course developer and podcast coach. You can find him at Casabona.org.
Alain is a Senior Engineer at XWP and WP-CLI expert.
Did you know we’re also on Spotify and Apple Podcasts? In fact, you can find us pretty much anywhere you get your daily dose of podcasts. As always, remember to update your daily podcast playlist with Next Level Ops. And stay on the lookout for our next episode!
I run a WP agency and managing all clients can be a tedious job – I’ve always liked to get into the automation side of things. Thank you for the insights!