GoDaddy apply_filters() error with WP-CLI Solution

Do you get this error when working with WP-CLI in GoDaddy?

Fatal error: Call to undefined function apply_filters()

Easy solution is to update your WP-CLI with

$ wp cli update

Update on this post

When I ran the above code on the godaddy shared server I got this error:

Error: /opt/wp-cli/bin/wp is not writable by current user

To fix this I used this reference goddady fix

which tells you to go to your home directory $ cd

install wp-cli

$ curl -O

give the proper permissions

$ chmod +x wp-cli.phar

test to make sure it is working

$ php wp-cli.phar --info

create an alias in your .bashrc so you can just use wp in your terminal commands

$ echo "alias wp='~/wp-cli.phar'" >> .bashrc

refresh that file

source .bashrc

if you test this out inside a wordpress install, you should see it working

$ wp plugin list

Leave a Reply

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