As noted in https://github.com/wp-cli/wp-cli/issues/1754#issuecomment-91361340, I figured this one out. It turns out it wasn’t wp-cli’s fault at all.
My confusion arose from the fact that I’m running a web server with nginx and php fpm, which has it’s own php.ini . wp commands run php (cli) directly on the host and so the config can be different. In this case my php cli didn’t allow short_open_tag (
Solution
Just enabled
short_open_tag=On
in /etc/php5/cli/php.ini
p.s. this is an aws ubuntu box
Related Posts:
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- Running WP Cron on multisite the right way
- WP-CLI – Selecting PHP version
- WP CLI info showing correct PHP binary but wrong version of PHP
- Utilize WP-CLI from inside WordPress, not SSH
- Setting Up PHPUnit tests for WP development on Windows
- Configuring WP-CLI on Windows 10
- login wp impossible
- wp-admin/index.php gives a “500 Internal Server Error [closed]
- PHPCS: Strings should have translatable content
- Vagrantpress + composer
- Different output from WP-CLI in bash vs PHP exec()
- Apache /Ubuntu server not running WordPress installation, outputting PHP code like HTML
- wp search-replace on database returns PHP fatal error: Array and string offset access syntax with curly braces is no longer supported
- PHP Warning: chmod(): Operation not permitted in class-wp-filesystem-direct.php on line 173
- Image rotation and editing stopped working in WordPress after upgrading Ubuntu from 16.04 to 18.04
- Accessing an image folder inside public web directory
- Call to undefined function mysql_connect() After upgrading PHP 7.1 to 7.3
- Does WordPress create a new Linux user when creating a new WordPress blog?
- Unexpected token ILLEGAL, even on clean install – jquery-issue?
- WP-CLi PHP Warning: mysqli_query(): (HY000/1356): View During Search Replace
- Infinite Loop in WordPress Installation
- call to undefined function mysql_connect
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Full search and replace isn’t enough to make all pictures to be loaded with https
- Strange special character/Latin characters
- How do I prevent a folder from reappearing in my home directory?
- magic-quotes – breaks admin totally
- how to put shortcode to the top of the page – theme 2014
- kali php problem [closed]
- Cannot register a custom WP-CLI command
- Run a WP-CLI command from within PHP without using shell_exec()
- Running WP-Cron on Multisite networks the right way?
- How does printf( __( ) ); work?
- Displaying Logged-In User Name in WordPress Menu
- Change the filename format of saved featured images
- How do I add a php statement to a jQuery string
- Upload images and attachments from frontend form
- Config apple-app-site-association file with wordpress
- How to use the php if statement [closed]
- Should I use wp_mail or PHP’s mail? [duplicate]
- Successful or Error Message after running mysql code in functions.php
- How can one utilize a variable as a callback function name for add_settings_field
- Link to file in plugin directory from wordpress template?
- Using a switch statement in WordPress
- Trying to make php run in a post
- Pass PHP variable to JavaScript without inline JS
- WordPress Site Running Extremely Slow on Dedicated Server
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- Redirect undesirable domain
- WordPress Gravatar filter is removing my custom attributes
- How to make my custom widget appear within WordPress widgets? Plugin development
- Trying to install wordpress locally with mamp, but have unsupported php version
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- PHP echo inside javascript
- Value prints outside of the echo
- If ‘editor’ is empty, then
- Different Subdomain changes page content
- Removing the comment function within wordpress
- Display Yoast meta-description `wpseo_desc` within loop of categories and fail silently if no data is set [closed]
- Does get_post function counts as view?
- Get ACF options field in PHP acting as CSS
- Permalinks are not working in WordPress in digitalocean
- Bootstrap Carousel HTML structure and funny output [closed]
- add category to posts with tag wordpress
- Missing a text-domain esc_attr_e
- Get all posts from categories
- How to add post classes?
- ‘global’ not working in wordpress?
- Show login greeting above sub-menu links?
- Conditional On custom field plugin metabox
- Exclude function from running on a certain page
- wordpress sql posts query won’t display the latest post in a specific category
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- How to change image product page by variation in PHP code?
- Fetch Data from an external MSSQL Database in a Managed WP hosting
- How can I show how much water got saved on this order (making use of the number of items bought) on a thank-you-page?
- Posts page (category) layout modification, which php file change?
- How to add WordPress Featured image in tag ..?
- Unable to update plug-ins – Undefined index a:1:{s:3:”ssl”;b:1;} in class-requests.php on line 213
- Php cron job (wp-cron) not working
- Huge time to first byte on live site
- CPT in a shortcode
- Make sticky post with FacetWP
- All categories options or All categories not Populating
- Get meta_query value by user meta array
- Can we use corePHP code in wordpress?
- how can I disallow special characters, space, capital letter, dot in user name on registration?
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- problem with category menu, it doesn’t want to show link
- Insert double entry in DB
- WordPress display name string manipulation
- WordPress create new on site when a new page is added
- Having an HTTP error 500 after migrating a website
- Why does a meta_query break this WP_Query?
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Saving User Input to PHP Variable
- Create an if statement based on page_id
- Require Credits Footer