100% found this document useful (1 vote)
111 views

Backup Wordpress

This document provides instructions for backing up a WordPress database using various methods: 1. Using phpMyAdmin by logging in, selecting the database, clicking export, selecting tables and options, and saving the file. 2. Using MySQL commands like mysqldump to dump tables to a compressed file. 3. Using MySQL Administrator graphical software to login, select backup, and create a project to back up the database.

Uploaded by

mrapplegate
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
111 views

Backup Wordpress

This document provides instructions for backing up a WordPress database using various methods: 1. Using phpMyAdmin by logging in, selecting the database, clicking export, selecting tables and options, and saving the file. 2. Using MySQL commands like mysqldump to dump tables to a compressed file. 3. Using MySQL Administrator graphical software to login, select backup, and create a project to back up the database.

Uploaded by

mrapplegate
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Backing Up Your Database « WordPress Codex http://codex.wordpress.

org/Backing_Up_Your_Database

Search the Codex Go

Home About Extend Docs Blog Forums Hosting Download

Codex Codex tools: Log in / create account

Home Page Backing Up Your Database


WordPress Lessons
It is strongly recommended that you backup your database at regular intervals and before an
Getting Started
upgrade.
Working with
WordPress
Restoring your database from backup is then possible if something goes wrong.
Design and Layout

Advanced Topics
Using phpMyAdmin Contents
Troubleshooting

Developer Docs phpMyAdmin is the name of the program used


[hide]
About WordPress to manipulate your database.
1 Using phpMyAdmin
1.1 Backup Process with phpMyAdmin
Information below has been tried and tested
Codex Resources
using phpMyAdmin versions 2.5.3, 2.5.7-pl1,
Community portal 2 Using Straight MySQL Commands
and 2.6.1-pl3 running on Unix.
Current events 3 Using MySQL Administrator
3.1 Getting MySQL Admin
Recent changes
Backup Process with phpMyAdmin
3.2 Backing Up the Database
Random page
1. Log into phpMyAdmin on your server 3.3 Restoring From a Backup
Help

2. From the main login screen, select 4 Using WordPress Database Backup Plugin
'Databases' 4.1 Install the Plugin
4.2 Activate the Plugin
4.3 Backing up
4.4 Restoring the Data

5 Using CocoaMySQL
6 Resources and Backup Plugins

3. Now click the name of your database - or your WordPress database if you have several databases.

4. The next screen will show you all the tables inside your WordPress database.
Ignore those, and click the 'Export' tab on the top set of tabs.

1 of 6 7/15/08 7:33 PM
Backing Up Your Database « WordPress Codex http://codex.wordpress.org/Backing_Up_Your_Database

5. Look at the left box at the top of the Export section. All the tables in the database you selected are
in that box.

If you have other programs that use the database, then choose only those tables that correspond
to your wordpress install. They will be the ones with that start with "wp_" or whatever
'table_prefix' you specified in your 'wp-config.php' file.
If you only have your WordPress blog installed, leave it as is (or click 'Select All' if you chenged
selection)
Ensure that SQL is checked!

6. The SQL section


Tick the following boxes:
'Structure'
'Add DROP TABLE'
'Add AUTO_INCREMENT' and
'Enclose table and field names with backquotes'

7. The DATA section


Leave the boxes inside this section unticked, but make sure to keep the checkbox next to the
"DATA" heading checked.

2 of 6 7/15/08 7:33 PM
Backing Up Your Database « WordPress Codex http://codex.wordpress.org/Backing_Up_Your_Database

8. Tick the 'Save as file' option, and leave the template name as is.

9. Now click 'Go' and you should be prompted for a file to download. Save the file to your computer.
Depending on the database size, this may take a few moments.

10. You have now backed up your database.


If you wanted, you could download a backup in each of the compression formats. Your choice. For
example: None and "zipped":

Remember - you have NOT backed up the files and folders - such as images - but all your posts
and comments are now safe.

Using Straight MySQL Commands


phpMyAdmin can not handle large databases so using straight MySQL code will help.

1. Change your directory to the directory you want to dump things to:

user@linux:~> cd files/blog

2. Use mysqldump to dump all database tables. To dump only certain tables from the database, give
their names at the place shown by (tablename tablename tablename), and omit the parentheses ( )
in any case. (For help, try: man mysqldump.):

user@linux:~/files/blog> mysqldump --add-drop-table -h mysqlhostserver


-u mysqlusername -p databasename (tablename tablename tablename) | bzip2
-c > blog.bak.sql.bz2

Enter password: (enter your mysql password)


user@linux~/files/blog>

Example:
mysqldump --add-drop-table -h db01.example.net -u dbocodex -p dbwp | bzip2 -c > blog.bak.sql.bz2

Enter password: my-password


user@linux~/files/blog>

The bzip2 -c after the | (pipe) means the backup is compressed on the fly, and the >

3 of 6 7/15/08 7:33 PM
Backing Up Your Database « WordPress Codex http://codex.wordpress.org/Backing_Up_Your_Database

blog.bak.sql.bz2 sends the bzip output to a file named blog.bak.sql.bz2. It does in one line the
same thing that these two commands do:

mysqldump --add-drop-table -h db01.example.net -u dbocodex -p dbwp > blog.bak.sql


bzip2 blog.bak.sql

Using MySQL Administrator


MySQL Administrator is a program for performing administrative operations, such as configuring your
MySQL server, monitoring its status and performance, starting and stopping it, managing users and
connections, performing backups, restoring backups and a number of other administrative tasks. You
can perform most of those tasks using a command line interface such as that provided by mysqladmin
or mysql, but MySQL Administrator is advantageous in the following respects:

Its graphical user interface makes it more intuitive to use.

It provides a better overview of the settings that are crucial for the performance, reliability, and
security of your MySQL servers.

It displays performance indicators graphically, thus making it easier to determine and tune server
settings.

It is available for Linux, Windows and MacOS X, and allows a remote client to backup the database
across platforms. As long as you have access to the MySQL databases on the remote server, you can
backup your data to wherever you have write access.

There is no limit to the size of the database to be backed up as there is with phpMyAdmin.

MySQL Administrator is designed to work with MySQL servers versions 4.0 and above.

Getting MySQL Admin

MySQL Admin may be downloaded from the MySQL.Com site. Installation binaries and documentation
may also be found there.

Backing Up the Database

This assumes you have already installed MySQL Admin and set it up so that you can login to the MySQL
Database Server either locally or remotely. Refer to the documentation that comes with the installation
package of MySQL Admin for your platform for installation instructions.

1. Open the MySQL Admin client and login as you had previously set up to do.

2. From the icon menu on the left hand side of the client window select Backup.

3. If you have not already created a Backup Project, do this now by clicking on the "New Project" button
at the lower part of the window and type in a name for the Backup Project where prompted.

4. Select one or more databases that you want to Backup (in the MySQL Admin client these are called a
"Schema" (pl. "Schemata")). Add them to the Backup Content window on the right using the right-
pointing arrow button.

5. When you have selected the Schema(ta), you can save the Backup Project. Or you may simply choose
to Backup Now using the button on the lower right of the window.

6. A dialogue will come up asking you where to put the Backup. Enter the pathname or browse to the
location using the dialogue.

4 of 6 7/15/08 7:33 PM
Backing Up Your Database « WordPress Codex http://codex.wordpress.org/Backing_Up_Your_Database

7. Assuming all is correct (and you have write permissions in the directory to which you are writing the
Backup), the backup will complete shortly.

Restoring From a Backup

1. Open the MySQL Admin client and login as you had previously set up to do.

2. From the icon menu on the left hand side of the client window select Restore.

3. Click the "Open Backup File" button on the lower right of the window.

4. Type in or browse to the Schema(ta) backup file and select. Click "Open".

5. The Target Schema(ta) will most likely be the "Original Location", or you may choose an alternate
location using the drop-down menu.

6. Click the "Start Restore" button on the lower right of the window. The database restore will
commence.

Using WordPress Database Backup Plugin


Austin Matzko maintains a WordPress plugin originally created by Skippy called WordPress Database
Backup. It was bundled with WordPress 2.0 but is no longer included with WordPress 2.1.

Install the Plugin

1. If you do download the plugin, follow the directions in the wp-db-backup.txt file to install the
plugin correctly.

Activate the Plugin

1. Make sure the wp-content folder is writeable by your server (change its CHMOD)
2. Go to your Administration > Plugins > Plugins Panel and activate the plug-in

Backing up

1. Navigate to Administration > Manage > Backup Panel


2. Select any tables, in addition to the core WordPress tables, that should be backed-up. Select the
Backup Options; the backup can be saved on the server, downloaded, or emailed. Finally, click on
the Backup button to actually perform the backup. If you have installed the WP-Cron plugin, you
can schedule daily backups.

Restoring the Data

The file created is a standard SQL file. If you want information about how to upload that file, look at
Restoring Your Database From Backup.

Using CocoaMySQL
CocoaMySQL is a free MySQL client for Mac OS X.

Open your database from CocoaMySQL and choose File → Export → MySQL file…, and check these
options:

Add drop table


Add create table
Add table content

5 of 6 7/15/08 7:33 PM
Backing Up Your Database « WordPress Codex http://codex.wordpress.org/Backing_Up_Your_Database

Resources and Backup Plugins


Backup at its elementary level
How to backup and restore a WordPress database
Plugins/BackUpWordPress for automated backups.
WordPress Database Backup Plugin
Reduce Database Backup Size: Delete Akismet Spam

Categories: Getting Started | Advanced Topics | Troubleshooting

Report a Site Bug | Privacy | GPL | Browse Happy | WordPress Updates RSS

6 of 6 7/15/08 7:33 PM

You might also like