Install Wordpress From Mac Os X terminal bash/shell/terminal profile function

February 22, 2013    terminal Wordpress

Sometimes staying on top of the latest version of Wordpress can be quite annoying when your testing things locally or rolling out regular wordpress sites. I normally install with .svn but this is a neat little bash script function I threw together to grab the latest version of Wordpress and unzip into the current directory through Mac OS X Terminal command.

Open up your

vim ~/.bash_profile

and paste the following code into it.

wp-install(){
	wget http://wordpress.org/latest.tar.gz;
 	tar xfz latest.tar.gz;
	mv wordpress/* ./;
	rmdir ./wordpress/;
	rm -f latest.tar.gz;
}

Now quit and re-open terminal or type ./profile for the changes to take effect.

CD into the desired directory and type wp-install and let magic behold you, you'll shortly have the latest version of Wordpress downloaded and installed.


blog comments powered by Disqus