There are two parts to backing up your WordPress site: Database and Files. You need to back up the entire site, and you need to back up your WordPress database.
WordPress Files Backup
Your WordPress site consists of the following:
- WordPress Core Installation
- WordPress Plugins
- WordPress Themes
- Images and Files
- Additional Files and Static Web Pages
All of these are used in various combinations to generate your website. The database contains your posts and a lot of data generated on your site, but it does not include the above elements that all come together to create the look and information on your site. These need to be saved. Remember, keep at least three backups on file, just in case one is corrupted or lost, and store them in different places and on different mediums
WordPress Database Backup
1. Click on Databases in your phpMyAdmin panel. (It may not be necessary to do this, depending on your version of phpMyAdmin)
2. You may have several databases. Click the one that holds your WordPress data, the database you created when you installed WordPress. (In older versions this may be done through a pull-down menu.)
Click Export. There are two methods to export, Quick and Custom; if you choose Custom, follow these steps:
- Select all the tables.
- In the Output section check Save output to a file and select None for Compression. (If your database is very large use a compression method)
- Select SQL from the Format drop-down menu.
- Check “Add DROP TABLE”: this can be useful for over-writing an existing database.
- Check “IF NOT EXISTS”: this prevents errors during restores if the tables are already there.
- Click Go. The data will now be saved into your computer.
4. Keep these files safe, copied and stored in separate places on separate media.
Restoring Your Database From Backup
- Login to phpMyAdmin.
- Click “Databases” and select the database that you will be importing your data into.
- You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a location of text file box, and next to that a button named Browse.
- Click Browse. Locate the backup file stored on your computer.
- Make sure SQL is selected in the Format drop-down menu.
- Click the Go button.