WP-CLI won't create post with space in title

  • | 952 points


    I have installed WP-CLI according to the instructions here - https://forum.laragon.org/post/4647

    It has worked ok, but for some reason if I try to create a post with a space in the title it fails:

    So this works:

    wp post create --post_type=page --post_status=publish --post_title='Store'

    But this

    wp post create --post_type=page --post_status=publish --post_title='Store Locations'

    returns the following error:

    Error: Unable to read content from 'Locations''.

    I have googled around a bit and it seems like the quotes may not be being parsed properly. I'm using the Cmder console which comes with Laragon to install wp-CLI

  • | 952 points

    Double quotes = "" work fine.

    wp post create --post_type=page --post_status=publish --post_title="Store Locations"

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.