Skip to content

Instantly share code, notes, and snippets.

@loorlab
Forked from mklasen/Instructions.MD
Last active September 21, 2022 02:21
Show Gist options
  • Save loorlab/9337e64452ead936bc4fd350c7bc88ee to your computer and use it in GitHub Desktop.
Save loorlab/9337e64452ead936bc4fd350c7bc88ee to your computer and use it in GitHub Desktop.
Install WP-CLI on Shared Hosting (Antagonist) + Ultimate Linux Hosting With cPanel (GoDaddy)

Download WP-CLI

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Test to see if it works correctly

php wp-cli.phar --info

Add extra permissions

chmod +x wp-cli.phar

Create a directory for tools like these

mkdir ~/tools/

Move wp-cli.phar to tools

mv wp-cli.phar ~/tools/

Edit your ~/.bash_profile

nano ~/.bash_profile

Add the following line

alias wp="php ~/tools/wp-cli.phar"

Reload your profile

source ~/.bash_profile

Test if it works with the alias

wp --info

All done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment