Quick WP upgrading with WPCLI

This is the easiest way to upgrade WordPress. You’ll execute these commands on the server itself.


  • ssh access to your server
  • wp-cli command installed (instructions for installing wp-cli at http://wp-cli.org/)

Install/Upgrade WP CLI

  • wp-cli should be upgraded each time a WordPress installation is upgraded.

Upgrade WP

Prep work

Change into the WP directory

Make a list of active plugins

Update all plugins

Deactivate all of the plugins

Upgrade WordPress

Reactivate all of the previously active plugins.

Check the site in various browsers (make sure cache has been cleared).

Grab all of the domain names in Apache host file

Quick script I whipped up today to grab all of the domain names on a server.


This gets all of the domains from ServerName and ServerAlias lines, takes out all of the white space and empty lines, and creates a file with just a list of the unique domain names.

This accounts for subdomains that use ‘www’ or have port :80 on the end.

For instance, www.somedomain.com and somedomain.com are the same, so the script takes out the ‘www.’ which leaves to copies of somedomain.com, which it then deletes one of them in the final output to the file. The same for ‘:80’.


Upgrading Omeka and Neatline

A first project at my new job at the Scholar’s Lab at UVA was to update some old Omeka/Neatline sites. I wrote a script to take care of the process now and in the future. https://github.com/mossiso/onus I perhaps went a little overboard and made it pretty robust. I was going to take the opportunity to […]

Setting up a Hosting Environment, Part 5: Apache and PHP

Figuring out the possibilities for Apache and PHP reminds me of a Dr. Seuss book, “Fox in Sox”. It’s a favorite of mine. I love reading it to the kids. In it, Mr. Fox tries to get Mr. Knox to say all kinds of ridiculous (in meaning and hard to say) tongue twisters. At one […]

Atop – Apache Top, for keeping tabs on the web servers

When I first became a systems administrator of a large web server, I wanted to know what the current traffic to all of the virtual hosts (vhosts) looked like. I wanted to see which domains were getting the most traffic and where that traffic was coming from. So began my long search for a sufficient […]

An Epic day – January 20, 2014

When I was a teenager, my mom started taking note of everything the family did on January 20. It was just some random day, and some random idea to do as a fun thing for the family. Over the years we’ve kept that up as a family; sometimes more or less involved. A couple of […]

History Lab: rethinking the Western Civ course

So, I finally get to teach a college course this semester. Way excited! But I refuse to do the normal lecture format. Seriously, we are still stuck on that teaching method after all the research and scholarship about the best ways to teach? (These all came up as results for searching in Google Scholar with […]

It has been two years.

My dad passed away two years ago today. I was recently in Arizona, but didn’t visit his grave site. This is what I wrote to my family about that. It was great to be in Arizona at the end of June and July. I had really wanted to visit Dad’s grave while I was there. […]