Saturday, December 06, 2008

a simple script to install remotely plugins and theme to wordpress

when I want to install a plugin or a theme on my distant server, I merely copy the URL in the clipboard and type in the terminal of my macbook
>plugin www.../theplugin.zip
To do this, just add to your .bashrc :
plugin () { ssh nrolland@xquant.net "cd /var/www/xquant.net/subdomains/blog/httpdocs/wp-content/plugins; wget -O toto $1; unzip toto; rm toto" } theme () { ssh nrolland@xquant.net "cd /var/www/xquant.net/subdomains/blog/httpdocs/wp-content/themes; wget -O toto $1; unzip toto; rm toto" }