Make a Backup Copy of your Production WordPress Blog on Ubuntu

You’ve just thought of a great new layout for your blog… but making changes to your blog while visitors are accessing it is generally a bad idea, especially if you are running an ad-supported blog. This How-To shows you the list of steps you need to take to get a copy of your production WordPress blog copied down to your local Ubuntu machine. (Should work for any debian linux)

Adding extra Repositories on Ubuntu

Repositories on Ubuntu are the locations that you can download software from. As a general rule, the default repositories don’t contain the right locations for most software packages that you’ll want to install. You will want to open up the /etc/apt/sources.list file, find and uncomment the following lines

Backup MySQL Database to a file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.

Change or Set the MySQL Root password

For every database, you should set the root or sa passwords to something other than the default, unless you want to get hacked. For mysql, the system administrator user is called root. You will use the mysqladmin utility from a command line to set the new password. Notice that there are two commands to be run.