

If you get a list, kudos, you can skip the next little section. Now let’s see if we can get a list of the available WP-CLI commands. In my case, I’m running XAMPP, and WordPress is installed in a subdirectory called stable, so In Terminal, navigate to the root of your local WordPress install. Good job!īut now we have to to do the real test.

You should be getting that same info we got earlier. Without changing directories, run wp -info. Just run sudo !! to rerun the last command as sudo, and enter your password. Now we’ll rename it to a nice short ‘wp’ and move it so it’s available from anywhere, not just the current directory.Īt this point, you may be told permission denied. Of course, we don’t want to constantly preface the command with ‘php’ so let’s make it executable. If you get nothing, the phar was not downloaded correctly – try that again. You should get output like this PHP binary: /usr/bin/php To test, we can run a simple command (from the same directory where we’ve just downloaded wp-cli.phar), php wp-cli.phar -info. You should go grab the url for the most recent version instead of whatever was current when I wrote this, especially in case the files have moved. I have intentionally not included the valid URLs. With curl, you might get an “SSL certificate problem” warning, in which case just add the -k flag. You can use curl or wget to download it (sure, you could just click the button, but where’s the command line love?). Or, should always be the latest stable package. Go to the releases page and grab the link to the latest phar file. You may also clone the git repo if you wish, but I’m not covering that here.
Xampp install wordpress in subdirectory archive#
WP-CLI is available as phar file, that is, a php archive – all of the files needed bundled into one easy to manage file.

Downloadįirst, we need to download the application. I’m going to install this on my local machine, but you could just as easily do this on a web server. WP-CLI is a command line tool, so presumably you already have some familiarity with Terminal, or your command line application of choice. Yes, the instructions for installing WP-CLI can be found on its site, but sometimes I just like to reiterate and expand. In case of XAMPP (or MAMP), add its binary directory to PATH (need to make sure XAMPP’s php is used, and not your machine’s).Make it executable from the command line.Here’s a summary of what we’re going to do: If your local development environment is on VVV, then stop reading, you’ve already got WP-CLI installed! I think once you do, you’ll take off on your own.
Xampp install wordpress in subdirectory how to#
I’m just going to show you how to get WP-CLI running. By getting started, I mean really just getting started.
