手动升级wordpress themes或plugins
2017-08-03wordpress升级插件和升级主题总要求网站ftp账户密码,为了避免输入ftp帐户密码,我们从服务器直接下载themes或plugins解压缩即可。
1、升级plugins
[root@server14 opt]# more upgrade_plugin.sh
#!/bin/sh
cd /opt
plugin_dir=/data/wallcopper/wp-content/plugins
zipfile=wp-pagenavi.2.92.zip
wget -c https://downloads.wordpress.org/plugin/$zipfile; #-c是为了重复覆盖下载
unzip -ou /opt/$zipfile -d $plugin_dir #-o是为了覆盖解压 -d是指定解压路径
zipfile=akismet.3.3.4.zip
wget -c https://downloads.wordpress.org/plugin/$zipfile;
unzip -ou /opt/$zipfile -d $plugin_dir
2、升级themes
[root@server14 opt]# more upgrade_themes.sh
#!/bin/sh
cd /opt
themes_dir=/data/wallcopper/wp-content/themes
zipfile=twentyfourteen.2.0.zip
wget -c https://downloads.wordpress.org/theme/$zipfile;
unzip -ou /opt/$zipfile -d $themes_dir
zipfile=twentythirteen.2.2.zip
wget -c https://downloads.wordpress.org/theme/$zipfile;
unzip -ou /opt/$zipfile -d $themes_dir