Keep WordPress & phpMyAdmin up-to-date with a single command II
A few years ago I wrote about keeping WordPress & phpMyAdmin up-to-date with a single command. While those methods still work it is time to make a few changes (and revive this blog while I’m at it, it has been too long).
First off, using Subversion to track stable versions might keep WordPress itself up-to-date (unless something breaks due to subtle changes in the repository as I found out with WordPress 4.1), it won’t do anything for your themes or plugins.
If you like to keep everything in WordPress up-to-date through the command line (instead of FTP, which I don’t even have installed) there now fortunately is a tool called wp-cli. Updating all plugins for example is as simple as:
wp plugin --all update
There is loads more it can do, see the wp-cli site for documentation of all commands and features.
Second, while the method of using git to update phpMyAdmin in my previous article wasn’t inaccurate, it was highly inefficient. The commands would first download the whole phpMyAdmin repository (including all branches and commit history) and then switch to tracking the stable branch. This was slow and wasted a lot of space.
So here are the updated commands:
git clone --depth=1 -b STABLE https://github.com/phpmyadmin/phpmyadmin.git git pull -q origin STABLE composer update --no-dev
With this we tell git that we want only the latest commit (depth flag) in the stable branch (b flag). This executes must faster and occupies only about 70 MB of space instead of nearly 500 MB. I recommend calling the git pull command from a cron job every day, so that your phpMyAdmin is always up-to-date.
- Corrupted files during development using PhpStorm & Vagrant
- Getting snmpd to work through IPv6
- Mac OS X Time Machine backup on a Debian server
- Hiding MySQL/PostgreSQL password from the “ps” command
- Arrays in Linux shell scripting
- Configure exim4 to send mail to other hosts
- Solving “IPv6 addrconf: prefix with wrong length 48” permanently
- How to prevent cron & PowerDNS clogging syslog
- Multiple DNS servers with PowerDNS and MySQL replication
- Keep WordPress & phpMyAdmin up-to-date with a single command