{"id":161739,"date":"2017-01-04T13:00:34","date_gmt":"2017-01-04T13:00:34","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=161739"},"modified":"2017-01-03T03:12:17","modified_gmt":"2017-01-03T03:12:17","slug":"wordpress-development-wp-cli","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/wordpress-development-wp-cli\/","title":{"rendered":"10 Ways WP-CLI Can Speed Up WordPress Development"},"content":{"rendered":"<p>WP-CLI is a useful time-saving tool for WordPress developers and advanced WordPress users. However, if you&#8217;ve never used this command line package before, it can be a little intimidating to get started.<\/p>\n<p>Most of us learn best by doing, so that&#8217;s what we&#8217;re going to do with this tutorial. That way, you can see WP-CLI in action and get a feel for what it&#8217;s like to use this powerful tool.<\/p>\n<p>In this post, we&#8217;ll walk through 10 of the most useful things you can do with WP-CLI. Follow along, and by the end of the post, you&#8217;ll have a strong working knowledge of how to use WP-CLI to get things done quickly.<\/p>\n<h2>Getting Started with <a href=\"http:\/\/wp-cli.org\/\" rel=\"noopener\" target=\"_blank\">WP-CLI<\/a><\/h2>\n<p>The first thing you&#8217;ll need to do is find a place to use <a href=\"http:\/\/wp-cli.org\/\" rel=\"noopener\" target=\"_blank\">WP-CLI<\/a>. Many hosts offer WP-CLI preinstalled on their servers \u2014 especially if they target the WordPress ecosystem. That means that the easiest way to get started with WP-CLI is usually to <a href=\"https:\/\/wpmudev.com\/blog\/terminal-command-line\/\" target=\"_blank\">SSH to your web server<\/a> and just start typing commands. (Check out our <a href=\"https:\/\/wpmudev.com\/blog\/what-is-ssh-wordpress\/\" target=\"_blank\" rel=\"noopener\">beginner&#8217;s guide to SSH<\/a> if you need help).<\/p>\n<p>If you find that you do you need to <a href=\"https:\/\/make.wordpress.org\/cli\/handbook\/guides\/installing\/\" rel=\"noopener\" target=\"_blank\">install WP-CLI<\/a>, it can be installed on any UNIX-like environment. So it runs fine on all Linux web servers and can even be user-installed on many cheap shared hosting accounts with minimal fuss. It can also be installed on OS X and Windows, although some features may not work on Windows and you can expect it to be a little harder to get WP-CLI up and running on Windows.<\/p>\n<p>Once you have WP-CLI up and running in the environment where you want to use it \u2013 the environment where your WordPress install will live \u2013 you&#8217;re ready to start typing commands.<\/p>\n<h2>Site Setup<\/h2>\n<p>The first thing you can do with WP-CLI is set up a new WordPress installation. Let&#8217;s do that now.<\/p>\n<h3>1. Install WordPress<\/h3>\n<p>You use the <code><a href=\"https:\/\/wp-cli.org\/commands\/core\/\" rel=\"noopener\" target=\"_blank\">wp core<\/a><\/code> command to download, install, and update a WordPress installation. To use it, you need to first get into the directory where WordPress will be installed.<\/p>\n<p>I created a new directory called <em>\/wp-cli\/<\/em> and set it up to resolve as a subdomain of my personal website: <em>http:\/\/wp-cli.jonpenland.com<\/em>. So, to install WordPress at this location, I first moved to the appropriate directory with the command <code>cd ~\/public-html\/wp-cli<\/code> and then used the following WP-CLI command to download WordPress:<\/p>\n<div class=\"gist\" data-gist=\"3ddfecbfe080025b9fd72f52fa5a41bd\" data-gist-file=\"wp-core-download.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/3ddfecbfe080025b9fd72f52fa5a41bd.js?file=wp-core-download.cl\">Loading gist 3ddfecbfe080025b9fd72f52fa5a41bd<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Next, you&#8217;ll need to create a database. Your host may or may not give you a way to do this over SSH. Either create a database over SSH with the <code>create database<\/code> command or log into your hosting account and create a new database using another host-provided tool like a MySQL database creation wizard or phpMyAdmin.<\/p>\n<p>Once your database is ready, head back to the command line. You&#8217;re ready to set up <em>wp-config.php<\/em> with this command:<\/p>\n<div class=\"gist\" data-gist=\"73803622b439548677132d042d7c6f12\" data-gist-file=\"wp-core-config.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/73803622b439548677132d042d7c6f12.js?file=wp-core-config.cl\">Loading gist 73803622b439548677132d042d7c6f12<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>This command will create a configuration file that includes the details you provide. Use the database name, user, and password you created previously, your database host (probably localhost), and a database table prefix. The default prefix is <em>wp_<\/em>, but you&#8217;ll probably want to make it something unique like <em>xyz_<\/em>. Then just run the command.<\/p>\n<p>The last step is to run the WordPress installation script, which you can do with this command:<\/p>\n<div class=\"gist\" data-gist=\"2c87c40392477a49f5088865c569f3a2\" data-gist-file=\"wp-core-install.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/2c87c40392477a49f5088865c569f3a2.js?file=wp-core-install.cl\">Loading gist 2c87c40392477a49f5088865c569f3a2<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Fine tune that command to fit your website, run it, and you&#8217;ll be greeted with the words: <em>WordPress installed successfully<\/em>. Now, open up your browser and point it at your website URL and you should be greeted by the default WordPress theme.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1364x1364 size-1364x1364 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-installed.png\" alt=\"WordPress installation created with wp-cli\" width=\"1364\" height=\"435\" \/><\/p>\n<p>There&#8217;s a lot more you can do with the <code>wp core<\/code> command, including:<\/p>\n<ul>\n<li><code>wp core version<\/code>: check the current version of WordPress.<\/li>\n<li><code>wp core multisite-install<\/code>: run this command instead of <code>wp core install<\/code> to set up a multisite network rather than a standard WordPress installation.<\/li>\n<li><code>wp core update<\/code>: update the WordPress core.<\/li>\n<li><code>wp core update-db<\/code>: update the WordPress database.<\/li>\n<\/ul>\n<p>We&#8217;ve spent a lot of time on installation. Thankfully, if you&#8217;ve made it this far, you&#8217;ve completed the hardest step we&#8217;re going to tackle in this tutorial. Let&#8217;s move on.<\/p>\n<h3>2. Install Themes<\/h3>\n<p>You use the <code><a href=\"https:\/\/wp-cli.org\/commands\/theme\/\" rel=\"noopener\" target=\"_blank\">wp theme install<\/a><\/code> command to add themes to WordPress. However, before doing that, you should check to see which themes are already available:<\/p>\n<div class=\"gist\" data-gist=\"cc64746636a77fe1a4eb63db7406a752\" data-gist-file=\"wp-theme-list.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/cc64746636a77fe1a4eb63db7406a752.js?file=wp-theme-list.cl\">Loading gist cc64746636a77fe1a4eb63db7406a752<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>This will produce a table showing the list of installed themes, their status, version, and whether or not an update is available.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-theme-list.png\" alt=\"a list of installed themes generated by wp-cli\" width=\"670\" height=\"96\" \/><\/p>\n<p>With WP-CLI you can install themes from the WordPress.org repository, themes stored in a zip file on the web server, and themes stored remotely in zip format (such as themes hosted at GitHub). For example:<\/p>\n<div class=\"gist\" data-gist=\"e5a3ee662ef81812914c4e89fb741cbe\" data-gist-file=\"wp-theme-install.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/e5a3ee662ef81812914c4e89fb741cbe.js?file=wp-theme-install.cl\">Loading gist e5a3ee662ef81812914c4e89fb741cbe<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Run the command successfully, and you&#8217;ll see something like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-theme-install.png\" alt=\"theme installation success with wp-cli\" width=\"670\" height=\"133\" \/><\/p>\n<h3>3. Install Plugins<\/h3>\n<p>Next, let&#8217;s install a plugin or two. You use the <code><a href=\"https:\/\/wp-cli.org\/commands\/plugin\/install\/\" target=\"_blank\">wp plugin install<\/a><\/code> command to install plugins. Just as with themes, we can check the list of currently installed plugins with the following command:<\/p>\n<div class=\"gist\" data-gist=\"543e92db5b89792b5fc4f0faba5c1a58\" data-gist-file=\"wp-plugin-list.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/543e92db5b89792b5fc4f0faba5c1a58.js?file=wp-plugin-list.cl\">Loading gist 543e92db5b89792b5fc4f0faba5c1a58<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>The results are formatted to look a lot like what was displayed when we ran the similar command for themes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-plugin-list.png\" alt=\"list of plugins generated by wp-cli\" width=\"670\" height=\"81\" \/><\/p>\n<p>Let&#8217;s install two plugins.<\/p>\n<p>Just as with themes, we can install plugins from WordPress.org, plugins saved to the server or plugins hosted in a remote repository. Let&#8217;s install the free versions of the <a href=\"https:\/\/wordpress.org\/plugins\/wp-smushit\/\" rel=\"noopener\" target=\"_blank\">Smush<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/custom-sidebars\/\" rel=\"noopener\" target=\"_blank\">Custom Sidebars<\/a>\u00a0plugins from WordPress.org<\/p>\n<p>To install those plugins, we need to know the slug from the URL where they can be found in the official plugin directory. However, if we don&#8217;t want to look up those URLs, we can also search for them, like this:<\/p>\n<div class=\"gist\" data-gist=\"f36270ea37fa800316ab9e5d0d905fec\" data-gist-file=\"wp-plugin-search.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/f36270ea37fa800316ab9e5d0d905fec.js?file=wp-plugin-search.cl\">Loading gist f36270ea37fa800316ab9e5d0d905fec<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>That command will return a list of plugins that match the term <em>&#8220;smush&#8221;<\/em>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-plugin-search.png\" alt=\"results of a plugin search completed with wp-cli\" width=\"670\" height=\"207\" \/><\/p>\n<p>Now we can see that the slug we need to use to install the plugin is <em>wp-smushit<\/em>. Next, let&#8217;s find Custom Sidebars.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-plugin-search-sidebars.png\" alt=\"results of plugin search completed with wp-cli\" width=\"670\" height=\"192\" \/><\/p>\n<p>It looks like <em>custom-sidebars<\/em> is the slug we&#8217;re looking for. With those two slugs in hand, we can now install the plugins with this command:<\/p>\n<div class=\"gist\" data-gist=\"91de3de3cdf4f4903123c802727c4424\" data-gist-file=\"wp-plugin-install.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/91de3de3cdf4f4903123c802727c4424.js?file=wp-plugin-install.cl\">Loading gist 91de3de3cdf4f4903123c802727c4424<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>In a matter of seconds, both are installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-plugin-install.png\" alt=\"plugin installation success with wp-cli\" width=\"670\" height=\"146\" \/><\/p>\n<h2>Site Maintenance<\/h2>\n<p>We&#8217;ve run through the basics of installing WordPress, themes, and plugins. Next, let&#8217;s look at some site maintenance tasks you can take care of with WP-CLI<\/p>\n<h3>4. Check for Theme Updates and Apply Them<\/h3>\n<p>Updating themes with WP-CLI is done by adding the <a href=\"https:\/\/wp-cli.org\/commands\/theme\/update\/\" rel=\"noopener\" target=\"_blank\"><code>update<\/code> subcommand to the <code>wp theme<\/code> command<\/a>.<\/p>\n<div class=\"gist\" data-gist=\"e5a72abeacca112ffbcdef0a0bf8372c\" data-gist-file=\"wp-theme-update.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/e5a72abeacca112ffbcdef0a0bf8372c.js?file=wp-theme-update.cl\">Loading gist e5a72abeacca112ffbcdef0a0bf8372c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>5. Check for Plugin Updates and Apply Them<\/h3>\n<p>A similar set of commands can be used to <a href=\"https:\/\/wp-cli.org\/commands\/plugin\/update\/\" rel=\"noopener\" target=\"_blank\">update plugins with WP-CLI<\/a>:<\/p>\n<div class=\"gist\" data-gist=\"2f1fa24694584596e7a9ada07580ec2c\" data-gist-file=\"wp-plugin-update.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/2f1fa24694584596e7a9ada07580ec2c.js?file=wp-plugin-update.cl\">Loading gist 2f1fa24694584596e7a9ada07580ec2c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>6. Interact with a Plugin<\/h3>\n<p>There are several plugins that can be controlled with WP-CLI commands. For example, with <a href=\"https:\/\/jetpack.com\/support\/jetpack-cli\/\" rel=\"noopener\" target=\"_blank\">Jetpack CLI<\/a> you can interact with Jetpack modules, check current option settings, edit the Jetpack Protect whitelist, reset Jetpack, and more.<\/p>\n<p>The commands that can be used with supported plugins vary from one plugin to the next. To learn more, consult the list of plugins that extend WP-CLI and then research the commands supported for any plugins you use.<\/p>\n<h2>Troubleshooting and Migration<\/h2>\n<p>WP-CLI may be more useful for troubleshooting and migration than any other task. That is because WP-CLI can manipulate a WordPress installation even when you can&#8217;t log into it. So the next time you get locked out of WordPress or find yourself staring at <a href=\"https:\/\/wpmudev.com\/blog\/troubleshoot-white-screen-errors\/\" target=\"_blank\" rel=\"noopener\">the white screen of death<\/a>, fire up SSH and dive into WP-CLI before resorting to more drastic measures.<\/p>\n<h3>7. Deactivate or Activate a Plugin<\/h3>\n<p>Quite often, WordPress issues crop up when a plugin upgrade goes wrong or when you install a plugin that isn&#8217;t compatible with the active theme or another plugin. When that happens, try some of these commands to sort out the problem.<\/p>\n<div class=\"gist\" data-gist=\"3cf565626f3fa3069dd03b9188f453c4\" data-gist-file=\"wp-plugin-deactivate.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/3cf565626f3fa3069dd03b9188f453c4.js?file=wp-plugin-deactivate.cl\">Loading gist 3cf565626f3fa3069dd03b9188f453c4<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>8. Activate or Deactivate a Theme<\/h3>\n<p>If it isn&#8217;t a plugin causing your problems, then it&#8217;s probably your theme. Here are the commands you can use to change your active theme and take back control of your WordPress website.<\/p>\n<div class=\"gist\" data-gist=\"c99b190fdd1ffa9a8dc50161fbfb855a\" data-gist-file=\"wp-theme-activate.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/c99b190fdd1ffa9a8dc50161fbfb855a.js?file=wp-theme-activate.cl\">Loading gist c99b190fdd1ffa9a8dc50161fbfb855a<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>9. Rollback WordPress to a Previous Version<\/h3>\n<p>WordPress 4.7 includes some great new features like a revamped and improved Customizer, PDF thumbnail previews, and more. However, some users have run into trouble when upgrading to WordPress 4.7. If this happens to you, and you want to rollback to 4.6.1, you can do so with this command:<\/p>\n<div class=\"gist\" data-gist=\"cdd31c5cbb31eddf2039042f1fdb9eaf\" data-gist-file=\"wp-core-update.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/cdd31c5cbb31eddf2039042f1fdb9eaf.js?file=wp-core-update.cl\">Loading gist cdd31c5cbb31eddf2039042f1fdb9eaf<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>3<\/p>\n<p>This will force WordPress back to the previous version and also delete any files that were new in WordPress 4.7.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670 aligncenter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/12\/wp-core-update-force.png\" alt=\"message displayed after forcing WordPress back on version with wp-cli\" width=\"670\" height=\"659\" \/><\/p>\n<p>It bears mentioning that you should always take a backup of your site before updating WordPress or forcing WordPress back to a previous version.<\/p>\n<h3>10. Search and Replace<\/h3>\n<p><a href=\"http:\/\/wp-cli.org\/commands\/search-replace\/\" rel=\"noopener\" target=\"_blank\">WP-CLI&#8217;s search and replace command<\/a> can be tremendously useful when migrating a WordPress website to a new domain or when implementing <em>https<\/em>.<\/p>\n<p>Keep in mind, that you should <em>always<\/em> backup your database before running a search and replace command \u2014 and that goes for all search and replace tools, not just WP-CLI. Search and replace operations cannot be rolled back, so if you get one wrong, fixing the damage can be incredibly difficult and time-consuming, or even impossible.<\/p>\n<p>The <code>--dry-run<\/code> option in WP-CLI can help you avoid making costly mistakes. It&#8217;s always a good idea to use this option, which will return the number of replacements and list the tables where those replacements will take place without actually changing anything. That way, you can make sure the results make sense and are being applied where you expect to see them before running the command.<\/p>\n<div class=\"gist\" data-gist=\"6b0f7cac0d7a751f9d6607d551c9816a\" data-gist-file=\"wp-search-replace.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/6b0f7cac0d7a751f9d6607d551c9816a.js?file=wp-search-replace.cl\">Loading gist 6b0f7cac0d7a751f9d6607d551c9816a<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>By default, the search and replace functionality in WP-CLI only replaces instances in the core WordPress database tables. However, you can search and replace specific tables, or all tables.<\/p>\n<div class=\"gist\" data-gist=\"0670dfe0854948f219c3ce2d3646f83c\" data-gist-file=\"wp-search-replace-all-tables.cl\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/0670dfe0854948f219c3ce2d3646f83c.js?file=wp-search-replace-all-tables.cl\">Loading gist 0670dfe0854948f219c3ce2d3646f83c<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h2>Wrapping Up<\/h2>\n<p>WP-CLI is a powerful tool and well worth taking the time to get comfortable with. If you&#8217;ve made it through this tutorial and created and manipulated a test WordPress installation along the way, then you&#8217;re probably beginning to see how much time WP-CLI has the potential to save you.<\/p>\n<p>Like all powerful development tools, WP-CLI takes a little while to get the hang of, but once you work it into your workflow, you&#8217;ll wonder how you ever got anything done without it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WP-CLI is a useful time-saving tool for WordPress developers and advanced WordPress users. However, if you&#8217;ve never used this command line package before, it can be a little intimidating to get started. Most of us learn best by doing, so that&#8217;s what we&#8217;re going to do with this tutorial. That way, you can see WP-CLI [&hellip;]<\/p>\n","protected":false},"author":388460,"featured_media":161862,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[557,263],"tags":[10195,10189],"tutorials_categories":[],"class_list":["post-161739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-tutorials","tag-command-line","tag-wp-cli"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/161739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/388460"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=161739"}],"version-history":[{"count":26,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/161739\/revisions"}],"predecessor-version":[{"id":187128,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/161739\/revisions\/187128"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/161862"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=161739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=161739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=161739"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=161739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}