This is one of those things that I don’t do often enough to commit to memory, so for future reference:
sudo aptitude safe-upgrade;
sudo aptitude full-upgrade;
#tada!
This is one of those things that I don’t do often enough to commit to memory, so for future reference:
Okay, so wow. I had a pretty obese database I wanted to move from one server to this one (my Slicehost acct) and PHPMyAdmin just couldn’t handle an 11MB table or something; I was even breaking it down so that it only had to import one table at a time, to no avail.
So naturally this seemed like something that could be done from the command line with ease. Heh.
First, I uploaded the exported version of my gzipped database to the root of my home directory.
gunzip mydb.sql.gz #unzip the database
mysql -u username -p newdbname < ~/mydb.sql
That's it. Seriously.
One thing to note is that I already had '
' created. But otherwise it was extremely straightforward (after I spent at least an hour figuring it out :P).
I’ve got at least 4 installs of WordPress on my server and I have them all checked out from WordPress’ SVN repository because uploading WordPress files whenever there is an update is incredibly annoying.
I know this means I may be using unstable and unreliable code and all that, but so far I haven’t had much of an issue. Worst case scenario I have to do a server rollback or something.
But anyway, having something like 4 SVN WordPress Installs it’s become apparent that I need an easier solution to running svn update on all the directories.
SO I MADE A BASH SCRIPT.
#!/bin/bash
# Updates all of my wordpress installations at once ...
echo '--Updating benwatts.ca';
cd ~/benwatts.ca
svn update
#[..] repeat for the other installs
echo "Done and done.";
Then I created a bin folder in my user folder
and moved it there
.
Unfortunately, to use it you have to specify the path (so …
). That kind of sucks. Not a whole lot … but I wanted to be a bit adventurous and make it so that I just have to type ‘updatewordpress’ and it’ll go ahead and do it. As it turns out, at least in my version of linux it already searches ~/bin for shell scripts … so all I had to do was log out and log back in again and now the command is there … NICE!
‘list’ … lists the contents of the directory you’re in. The [-l] flag adds detailed info about the files/folders in the directory. The [-a] flag shows hidden files.
‘change directory’ … the main way you navigate the filesystem.
‘make directory’
‘remove’ … deletes a file. to delete a directory you need the [-r] flag. It recursively deletes the directory and all sub-directories.
‘move’ AND rename. It can move a file/directory and at the same time rename it.
‘link’. Creates a shortcut to a file or folder in the directory you’re in. Can prevent a lot of extra typing. Always use the -s flag. It keeps the links symbolic. I don’t know what that means … but it’s the only way you can create a shortcut to a folder.
Calculates the size of a directory. -s = summary, -h = human readable.
Calcualtes disk usage. -h = human readable.