Can I update themes without enabling maintenance mode?
I would like to update only themes in my WP without enabling maintenance mode. Is it possible?
Topic maintenance automatic-updates themes Wordpress
Category Web
I would like to update only themes in my WP without enabling maintenance mode. Is it possible?
Topic maintenance automatic-updates themes Wordpress
Category Web
3 years later I solved this issue with this below shell script:
#Getting list of outdated themes
/usr/local/bin/wp theme list --update=available --allow-root --path=/var/www | sed -n '1!p' | awk '{print $1}' > /tmp/theme.list
#Update them one by one
while read -r themename
do
#Store the old version number of theme
OLDVER="$(grep Version: /var/www/wp-content/themes/"$themename"/style.css)"
#Download theme
wget -q https://downloads.wordpress.org/theme/"$themename".zip -P /tmp/
#Uncompress .zip file
unzip -oq /tmp/"$themename".zip -d /var/www/wp-content/themes/
#Store the new version number of theme
NEWVER="$(grep Version: /var/www/wp-content/themes/"$themename"/style.css)"
#Create simple log file of theme update
[[ "$OLDVER" != "$NEWVER" ]] && echo "$themename" >> /tmp/success.list || echo "$themename" >> /tmp/failed.list
#Remove downloaded theme file
rm /tmp/"$themename".zip
done < /tmp/theme.list
rm /tmp/theme.list
You can also use the Easy Theme and Plugin Upgrades plugin: https://en-ca.wordpress.org/plugins/easy-theme-and-plugin-upgrades/
Download the plugin and upload your updated theme. The plugin will replace your outdated theme with your new one. I've used it on many sites, it's quick and easy and your site won't go into maintenance mode.
Sure, just upload them to their directories with ftp. After all, updating themes is not much more than copying the files.
If you update the active theme in this way, some unexpected results may occur for pages that are generated halway the uploading, part by the old theme, part by the new theme.
Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.