jcadima
8/2/2017 - 8:39 PM

Download Wordpress unzip and move to current directory

Download Wordpress unzip and move to current directory

https://code.tutsplus.com/articles/download-and-install-wordpress-via-the-shell-over-ssh--wp-24403

1) download the latest zip file
wget https://wordpress.org/latest.zip

2) unzip the "wordpress" file
unzip latest.zip

3) after unzipping you will have a "wordpress" directory where all the contents
are going to be,  move all those files to the current directory,
leaving the "wordpress" directory empty

mv wordpress/* ./

======================  For .bashrc  ===============================

function installwp() {
	echo "Downloading the latest version of Wordpress...[DONE]"
	wget https://wordpress.org/latest.zip
	echo "Extracting Files...[DONE]"
	unzip latest.zip
	echo "Moving files to current directory...[DONE]"
	mv wordpress/* ./
	echo "Removing zip files...[DONE]"
	rmdir ./wordpress/
	rm -f latest.zip
}