WP-CLI is a handy command line tool for WordPress administration that works in the shell. It allows you to make blazing fast upgrades of core WordPress, plugins or themes, new WordPress installations and any kind of administration tasks you usually do over the web administration interface. Actually it offers even a little bit more.
In my recent talk at the WordPress MeetUp in Ljubljana, I have presented WP-CLI mostly from the point of view of an administrator, who manages many WordPress installations for his clients. In this post, I will present the main points of my talk.
The upgrades problem
The biggest issue when you have to take care of some 30+ wordpress installations are the upgrades. Normal web interface upgrades are fine for individual blogers and one site administrators (actually, they are quite user friendly compared to many other publishing platforms). However, just to login to every site, when you have 30+ installations, may take quite some time. To be precise, upgrading 30 sites took me about two days of work.
I tried to solve this problem in many ways. One of them was the WordPress multi site install. It was a bad idea. The migration from individual sites to network is already a hassle and it’s not worth the effort: although it was said the WordPress network is now mature since it became part of the core, it’s still pretty buggy and there are bugs no one seems to care about. I had problems with user management and https. I will not go into details here, but fortunately, I’ve abandoned the idea of multisite soon enough …
Don’t trust autoupdates
Since the version 3.7 WordPress offers autoupdates. Actually, they are enabled by default for new installations. If you’re a good system administrator, then they won’t work anyway (because you set the permissions right). Everyone I met agrees pretty much that autoupdates are not to be trusted. Some random visitor will fire the upgrade process, and if anything goes wrong, you won’t be there to fix it soon. Besides this, for auto upgrades to work, you need either give the permissions to your server to write to php files, which is considered as bad practice in system administration, or to store your ftp password in your wp-config.php file. You shouldn’t do any of that.