Skip to content

Instantly share code, notes, and snippets.

@VirtuBox
Last active August 3, 2022 13:21
Show Gist options
  • Save VirtuBox/387da3d427b46cbac00812817c8cd6be to your computer and use it in GitHub Desktop.
Save VirtuBox/387da3d427b46cbac00812817c8cd6be to your computer and use it in GitHub Desktop.
wp-cli install & useful packages

install wp-cli

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

download wp-cli bash_completion

wget -O /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash

change /var/www owner

chown www-data:www-data /var/www

download .profile & .bashrc for www-data

wget -O /var/www/.profile https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/var/www/.profile
wget -O /var/www/.bashrc https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/var/www/.bashrc

set owner

chown www-data:www-data /var/www/.profile
chown www-data:www-data /var/www/.bashrc

useful packages

# general
wp package install danielbachhuber/wp-cli-stat-command
wp package install aaemnnosttv/wp-cli-login-command
wp package install wp-cli/find-command

# performance & troubleshooting
wp package install wp-cli/profile-command
wp package install runcommand/query-debug 
wp package install pantheon-systems/wp_launch_check
wp package install wp-cli/doctor-command

# security 
wp package install szepeviktor/wp-cli-database-prefix-command
wp package install anhskohbo/wp-cli-themecheck


# dev
wp package install jaywood/jw-wpcli-random-posts

# plugins
wp package install GeekPress/wp-rocket-cli
wp package install buddypress/wp-cli-buddypress
wp package install dereckson/wp-cli-polylang
wp package install wp-cli/wp-super-cache-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment