Friday night was a little longer yesterday. I had to migrate and upgrade three wordpress 2.3.x based blogs to a new server. When you look at the version number you can be pretty sure that all those three moves and upgrades did not went that flawlessly. Those installs just did not get any love over the last years months.
So we had everything you could imagine, from corrupt databases and filesystems, hacked setups, 1.5 gigabyte of spam in a single blog. You just name it – we got it.
Nevertheless that are those scenarios which will help you learn a lesson: Web-interfaces are nice put unleashed power lies within the shell. Be it transferring the application files and data via SCP, dumping and importing of MySQL databases, packing and extracting, searching for malicious code or just running a new install. It pays to have shell and ssh at hand on the boxes. Gladly this is more and more the standard with todays hosting. Many of the Cpanel or Plesk based products you can get for some bucks out there have it nowadays. Let’s say, most of the Linux based hosts :D.
The Day After
For those of us who are not a sysadmin but know that those *nix commands can be extremely powerfull, it’s good to have some reference at hand.
~ wget -qO- http://wordpress.org/latest.tar.gz | tar --strip=1 -xz
(Download and Extract WordPress via Shell)
I therefore started a document in wordpress codex providing some commandlines that are helpfull while doing wordpress administration. I hope this is helpfull for others as well: Grep and friends. It’s not completely finished right now but some gems like the wordpress installation one-liner above are already in. Have fun!
Just let me know your favorite commandlines or let me know about those tasks you do not know which commands to use for in the comments.
Man have I been there before… Is this in the codex? I’d like to help…
You’re welcome 🙂 Just use the discussion for that page, it’s in codex: Grep and Friends
Pingback: Cheap Hack/Worm Protection for your WordPress Blog | hakre on wordpress