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
- Uncaught Error: Class ‘WP_Upgrader_Skin’ not found
- WP-CLI PHP Deprecated Warning
- Run a WP-CLI command from within PHP without using shell_exec()
- Running WP-Cron on Multisite networks the right way?
- Save Option on Database
- .htaccess on multisite and roots theme?
- Get permalink for a post from inside WordPress and route to a related site
- Sidebar doesnt get updated?
- How does one programmatically manage posts from a external php script?
- Edit the Publish Widget Options
- how to set category name for a post
- Change order that the menu is generated with wp_list_pages
- Move wordpress sidebar on homepage up to new position
- How can I print out a single stylesheet or javascript link?
- Determine if only one image attached to a post/page
- Converting Menu Links to List Elements
- Cannot Upload Custom Header Image into WordPress Dashboard
- Force string into signup form
- When I use rewind_post() it shows menu items in my loop
- Problem using explode inside add_shortcode() callback funciton [closed]
- Code that displays images – images get shown multiple times
- I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?
- How to call a specific value within the functions.php file?
- Error on Include php:/usr/share/pear
- custom data in url
- How to define template directory in this widget code
- Dynamically append custom post type to end of url
- WordPress: Create A Widget to Accompany Plugin
- Warning: Cannot modify header information (with a twist)
- Automatically load WordPress page on server every XX hours
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Fix My Custom Function: Remove Automatic
- PHP Puzzle: Unique Styles with PHP loop
- Change default comments form title [duplicate]
- Programmatically change post templates? [duplicate]
- custom contact form no longer working (because of 3.2?)
- Catchable fatal error in appcloud free theme by Tokokoo
- Add Column to Term Database
- File Upload with Server in safe_mode
- I want Page titles and excerpts to show up on home.php in certain order
- WP plugin updates [duplicate]
- Hide a nav menu item based on get_user_meta results
- Custom Archive Page
- How to change a specific character in a theme option value – replace a space with a plus sign
- Crop images in both sides on wordpress [duplicate]
- 2 small questions: How to redirect to a created page & show that pages title in wp, bp
- Custom query_posts() parameter
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- Incomplete term slugs output from a foreach loop with get_the_terms
- Posts sortable column not sorting properly for custom field numbers
- How to set if meta_value is lower < than other meta_value in a get_posts array?
- How to include support for all page types, calendar urls, archive, etc
- How can I add page template after post of a post type?
- Custom Shortcode with Dynamic Button
- Is it possible to display conditional HTML based on page name in wordpress?
- Global variables and re-use
- Cannot get custom javascript to execute on page
- How to declare a variable at the bottom of the page and use its value at the top?
- How do I modify the with wp_nav_menu()
- How to add custom checkout field in user details mail template
- The search engine of my website finds only posts and not pages, how can I solve this problem?
- MySQL update text field with ‘
- Pull GET parameter from URL in functions.php
- Shortcode working in page.php but not in category.php in wordpress
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- How to NOT override inline css rules
- WP_Query based on another query on the page
- WordPress Memory limit not increasing
- Open all external links in new window – need help with the code