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]
- Adding first / last CSS classes to menus
- Remove “Insert from URL” link in Media upload – WP 3.5
- Hide custom image sizes from media library
- Remove admin bar for subscribers
- How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table
- Why Can’t PHPUnit UnitTest My WordPress Website
- wp_mail function timing out
- WordPress custom taxonomy description for each post?
- How to load WP functions?
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to remove this function from the homepage?
- Using an Image Slider twice on the same page
- Output data like WP’s plugin installer/updater
- I can’t view or add comments
- Nested shortCode functions in the functions.php file
- How to display posts of specific category using a custom Query in WordPress?
- Create placeholder text for wordpress search box [closed]
- wp_remote_get adding backslashes
- ACF page while loop breaks footer while loop
- Woocommerce product variation backorder
- Calculating a large number of MYSQL queries as customshort codes, slow
- Status 400 for AJAX POST Request with admin-ajax.php
- Is it possible to use Data URI image to set a post thumbnail?
- Singelton class does not work, multiple initialization on page reload
- Print last modified date only on posts
- Cannot execute php files in wp-content
- How to Create a Subscribeable News Feed?
- Where is wp() function definition?
- WordPress add_rewrite_rules for custom URLs ending in .html
- Make Current/Active Page Number a Link (WP_LINK_PAGES)
- How to show number of unpublished articles?
- How to make modifications only to certain elements of an HTML string on the server-side?
- How to retrieve the data from the sever and displaying it in a page?
- Javascript not loading on certain page
- WordPress get_media_embedded
- Add editor toolbar to Metabox
- Can we stop session reset if page reloads?
- Display WordPress Post on A Different Site
- Create condition for Author bio Social Links
- How do I Populate a Table Field with User Meta Data?
- Redirecting visitor from foreign domain with WP content as referrer
- wp_query – Exclude the first thumbnail from lazy loading on archives
- Change lost password url to a mailto URL in WordPress
- Usermeta data unserialize, extract and display in table in WordPress
- Exclude category from woocommerce product category list
- How to use a variable (for wordpress postid) in other queries?
- How to let mobile navigation menu close when link is clicked?
- How to transfer variables from one function to another [closed]
- Displaying SQL query result from user input via wpdb
- Display specific page if user signed in
- wordpress method GET adress bar rewrite
- wordpress dependent dropdownlist using post type is not working
- Show products per shortcode
- How to insert text into post based on category – via single.php file
- Update user_email via php – WP 4.7
- str_replace not preserving whitespace
- Add post class in custom loop (WP_QUERY)
- Unable to pass variable to database
- Child theme functions.php file change database entries
- How to call javascript function (jquery) in a shortcode?
- How to get the count for each taxonomy term
- Metabox Input Not saving
- Run A Pre-Built Core PHP Application Under A WordPress Page or Post Route
- show/hide attachments
- MySQL update text field with ‘
- WP_Query based on another query on the page
- Cross origin ajax request always returns 0 when calling get_current_user_id();
- One folder to be accessible by one user
- Create custom API endpoint to change custom header image
- how to indicate on post listing title if user already liked this post