Content marketing and WP CLI

 1.11.2023

Once you get to know the admin side of WordPress, it’s a perfectly acceptable content management method. Adding articles and content requires a bit of clicking around, but less than writing the article itself.

With content production accelerated by artificial intelligence, there is, however, room for improvement in updating and adding things. Otherwise, adding content into WordPress may become the bottleneck for your content marketing team.

A solution is to use WordPress via the WP CLI command line. With it, you can, for example, create an article by logging into the server and typing in the command line:

wp post create --post_type=page --post_title='How to use WordPress more effectively' --post_status=draft

You can publish the entire article like this:

wp post create --post_title="Efficient content management in WordPress with the WP CLI command line tool" --post_excerpt="Is clicking around WordPress too time-consuming? Do you prefer not to get things done rather than click aimlessly? The answer may be the WP CLI command line tool." --post_name="wp-cli-and-effective-content-marketing" --post_status="publish" --post_content="Content goes here"

What is the benefit of WP CLI for a marketer or content creator?

The command line seems like a rudimentary way to add posts and edit content. Moreover, using it is scary at first and with a few wrong commands you can mess up the whole system.

If you can get past these initial hurdles, WP CLI is really handy for content marketers. We use it ourselves, for example, here on Aalho Media’s website. Our own process in service descriptions is this:

  • Use the ACF plugin to create custom fields for different parts of the service description
  • Use the full site editor to create a suitable page template that pulls the content from those fields
  • Write the service descriptions in a Google Sheet (the services have a certain format, so it is easy to unify and copy and paste the contents)
  • Use the WP CLI to update the data to WordPress

Of course, this sounds a bit like the famous owl drawing instructions. The hardest part is drawing the owl itself, but at least you now know that there’s a better way to go.

Boosting Content Marketing Using the WP CLI Command Line

This method of operation is not suitable for all teams. But it is suitable for situations where the team has technical know-how and where the team is self-directed enough. In this case, using the WP CLI and this whole modular content process, you can minimize friction when it comes to publishing new content.

This works particularly well for the publication of repetitive content: book reviews, product reviews, service descriptions, product descriptions… When the content lives in a spreadsheet, from which it can easily be uploaded live to the pages, then new content will also be created. Old content should also be edited more easily when you don’t have to first log into WP-admin and tap there on the page where the story is, wait for the page to load and then tap a little more.

How to get started with WP CLI?

If the technical know-how is already in house, WP CLI is easy to use for WordPress. From WordPress’s own instructions, you can get installation instructions and information about the commands to use.

You can also get support and inspiration from Aalho Media if you want to see in practice what the process could look like and discuss whether it could be suitable for your company. Contact us and let’s see.


Latest updates in your inbox

Subscribe and get the latest marketing goodies from Aalho Media

Contribute to the conversation


Leave a Reply

Your email address will not be published. Required fields are marked *