wpcli custom php version - Download WP-CLI & set custom PHP Version

Download WP-CLI & set custom PHP Version

Recently I was migrating a website from GoDaddy shared hosting using WP-CLI and noticed the PHP version in cli was outdated. Here is how to install WP-CLI and set custom PHP version for the cli. Setup WP-CLI To download WP cli: To run it use php wp-cli.phar To make it easier to call We’ll rename … Read full article →

wpcli autocomplete - Setup tab completions for WP-CLI

Setup tab completions for WP-CLI

Tab completion is a useful time-saving feature of command line interfaces. To enable tab completion for WP-CLI We need to edit the ~/.bash_profile file. Step 1. In your home directory download WP-CLI tab completion file Step 2. Edit your ~/.bash_profile and add the following line: source ~/wp-completion.bash Save and exit. Step 3. Source the profile … Read full article →

wp package install - Install a WP-CLI Package

Install a WP-CLI Package

Packages can be installed to add functionality to WP-CLI, for example wp-cli/wp-super-cache-cli package will add functions for managing WP Super Cache plugin from the terminal. Here is a list of My favourite packages from the wp-cli/package-index: billerickson/wp-cli-plugin-install-missing install any plugins that are “active” but not installed binarygary/db-checkpoint create quick db snapshots for development purposes jaywood/jw-wpcli-random-posts … Read full article →

wpcli regex search - Use Regex with WP CLI to 🔎 Search & Replace in Database

Use Regex with WP CLI to 🔎 Search & Replace in Database

When cleaning websites that have large databases, regular text editors can’t even open the database dumps (Notepad++ supports files up to 2GB in size). So to run a search and replace on large database dumps I suggest using regex-replace line-by-line in PHP, or setting up WPCLI and running regex search & replace. Here is a … Read full article →

wpcli password reset - Reset WordPress user password using WP-CLI

Reset WordPress user password using WP-CLI

In this guide We’ll cover how to reset a WordPress user password using WP-CLI. Step 1. Ensure WP-CLI is installed and you are in the website directory run the following command to check if you are in the right folder: Step 2. List all users and note user_login for the user Step 3. Replace the … Read full article →

how to install wpcli on cpanel shared hosting - Install WP-CLI on cPanel shared hosting

Install WP-CLI on cPanel shared hosting

If you have root-level access to the server you can follow this guide to install WP CLI on your WHM/cPanel server: https://blog.cpanel.com/wp-cli-install-and-manage-wordpress-on-the-command-line/ If you don’t have access to the root account nor can run sudo, but still have a user/level access to the terminal like from the cPanel terminal let’s say, then you can still … Read full article →