DreamHost Announcements WordPress

Enhanced WP-CLI + Two New Commands Now Available For All Hosting Customers

programmer working on laptop at office. focus on programming code

programmer working on laptop at office. focus on WP CLI

We’re all techies at heart.

When the chips are down and things get real, everyone at DreamHost — from tech support to the executive team — puts on a pot of coffee, grabs a bag of Funyuns, and reaches for the keyboard.

For the command line.

Which is why we’re so pumped to let you know that we’re rolling out an enhanced version of WP-CLI, including the new wp doctor and wp profile instructions, across all of our hosting: shared, VPS, Dedicated, DreamPress, everywhere!

What is WP-CLI and Why Does It Matter?

WP-CLI is a command line interface for WordPress. With it, you can install and update plugins, work directly with the WordPress database, and manage themes — all without ever firing up the WordPress admin panel. If you sit in front of a computer all day like us, it can be a lifesaver! The list of stuff you can do with WP-CLI goes on and on and on.

Given all this, it’s no surprise that we love it. Just this year we’ve published WP-CLI how-tos on debugging your WordPress website, managing themes, upgrading WordPress Core, and automating management tasks. Thanks to these new commands, WP-CLI has officially gone to plaid!

The wp doctor Will See You Now

Have you ever had a broken WordPress installation? No? You’re one of the lucky few. It happens, and sometimes debugging it can be a pain. wp doctor lets you diagnose problems in WordPress and tells you everything it found. It checks for core WordPress file changes, option size limits, pending plugin and theme updates, cron job problems, and more!

[wp526648]$ wp doctor check --all

Running checks  100% [============================================] 0:02 / 0:07

+---------------------------------+---------+---------------------------------+

| name                            | status  | message                         |

+---------------------------------+---------+---------------------------------+

| core-verify-checksums           | success | WordPress verifies against its  |

|                                 |         | checksums.                      |

| file-eval                       | success | All 'php' files passed check fo |

|                                 |         | r 'eval\(.*base64_decode\(.*'.  |

| autoload-options-size           | success | Autoloaded options size (43.29k |

|                                 |         | b) is less than threshold (900k |

|                                 |         | b).                             |

| constant-savequeries-falsy      | success | Constant 'SAVEQUERIES' is undef |

|                                 |         | ined.                           |

| constant-wp-debug-falsy         | success | Constant 'WP_DEBUG' is defined  |

|                                 |         | falsy.                          |

| core-update                     | success | WordPress is at the latest vers |

|                                 |         | ion.                            |

| cron-count                      | success | Total number of cron jobs is wi |

|                                 |         | thin normal operating expectati |

|                                 |         | ons.                            |

| cron-duplicates                 | success | All cron job counts are within  |

|                                 |         | normal operating expectations.  |

| option-blog-public              | success | Site is public as expected.     |

| plugin-active-count             | success | Number of active plugins (3) is |

|                                 |         |  less than threshold (80).      |

| plugin-deactivated              | success | Less than 40 percent of plugins |

|                                 |         |  are deactivated.               |

| plugin-update                   | warning | 3 plugins have updates availabl |

|                                 |         | e.                              |

| theme-update                    | warning | 2 themes have updates available |

|                                 |         | .                               |

+---------------------------------+---------+---------------------------------+

wp doctor comes preinstalled with lots of tests to help you diagnose problems with your WordPress site. Check it out!

Performance Reviews With wp profile

There are no “lucky few” here.  Everyone who’s ever built a WordPress site has wondered, at one point or another, “What’s making my site so slow?”

Enter wp profile.

[wp526648]$ wp profile stage --fields=stage,time,cache_ratio,hook_time

+------------+---------+-------------+-----------+

| stage      | time    | cache_ratio | hook_time |

+------------+---------+-------------+-----------+

| bootstrap  | 0.3718s | 100%        | 0.0751s   |

| main_query | 0.0073s | 100%        | 0.0019s   |

| template   | 0.1022s | 100%        | 0.0619s   |

+------------+---------+-------------+-----------+

| total (3)  | 0.4814s | 100%        | 0.1389s   |

+------------+---------+-------------+-----------+

This command lets you figure out exactly what part of your WordPress installation is performing poorly. Is it theme rendering? Is it loading plugins? It shows you — amongst tons of other info — the amount of time it takes for WordPress to execute each part of its page-loading process, as well as how effectively your caching is working for that part!

DreamHost’s Commitment to the Open Web

We love WordPress, and WP-CLI just makes it better. If you have WordPress on any of our hosting platforms, you can just SSH into the server and fire it up for yourself. This walkthrough can help you get started.

In DreamHost’s vision of the future, everyone has the freedom to choose how their digital content is shared. WordPress, as the leading content platform for the web, is an invaluable part of that vision, and tools like WP-CLI are part of the ecosystem that will help make our vision a reality. We’re proud supporters of the WP-CLI project and the entire WordPress community. And we’re proudest when we can help bring these tools to you.

So get out there, grab your keyboard, and hit the command line! Funyuns not required.

About the author

Jason Fredrickson

Jason is the Senior Director of Product for Hosting at DreamHost—staying on top of what keeps small business owners awake at night, so that we at DreamHost can build actual products and features that help them go back to sleep.