Run WP-CLI commands on Pagely without errors from PHP version

I hit an issue on Pagely where I was running a WP-CLI command – via SSH – but I kept hitting a PHP fatal error.

When I looked into the error it was because the site was running PHP 7.4, but WP-CLI on Pagely was running PHP 7.3 so my code was breaking on the command line.

Turns out all you need to do is use pagely-wp instead of wp (thanks Kevin!) and the command will run at the correct version of PHP.

So instead of:

wp search-replace


pagely-wp search-replace

Leave a Reply

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