Download and extract WordPress quickly from the command line

Here’s a really quick way to get the latest version of WordPress and you don’t even need to open a browser. We’re going to do this all from the terminal.

This is really helpful when you’re starting a new site, just grab the newest version of WordPress then get going. And you can do that in just a few steps and a few seconds.

Open Terminal

cd into the directory where you want to download WordPress.

Download WordPress

You can always find the latest version of the WordPress install at

curl -O

Don’t forget the -O otherwise the file is going to download to your terminal and it’s going to do things you don’t want it to.

Extract WordPress

Now that we have the file, let’s extract it:

tar -xzvf latest.tar.gz

All the -xzvf gobble-dee is just telling tar what to do with the file.
-x extract
-z because this is a gzip file (.gz)
-v verbose which will output information about the files that are being extracted. Not necessary, but nice to have.
-f for file

That’s it. Now you have the newest version of WordPress ready to go for your new website.

Leave a Reply

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