How To Create WordPress Backups?
- July 15, 2015
- Leave a comment
WordPress database includes all the data like posts, pages, links, comments etc. If the database gets corrupt due to some reason, you’ll lose every thing that you have written to your WordPress blog. This can happen due to any reason and everything cannot be controlled even. Therefore, it is recommended to backup the database often, so that you can restore the things back to normal. WordPress backups are divided into two parts: Database and Files.
WordPress File Backups:
A general WordPress installation includes the following files:
- WordPress core files
- WordPress themes
- WordPress plugins
- Images and Files
- Other files or static HTML files
All the above mentioned files are used in different combinations to generate your website. Your database contains most of the data generated on your website, but it does not include the code written in these files. These files are equally important for your website as database. There are different ways to create backup for your files:
Backups Provided By Web Hosting:
Many web hosting companies provide softwares to backup your files. Most commonly cPanel’s File Manager of Softoculus is used by web hosts to get backup for your files.
Backup By Syncing Website:
WinSCP or similar programs can be used as they will allow you to sync your website and will create mirrors on your server and/or your local hard drives.
Backup Files On Desktop:
You can use your favorite FTP client or UNIX Shell to copy/download files to your local computer. Once downloaded, you can compress these files to save space.
WordPress Database Backup:
Backing up your WordPress Database depends upon how frequently you post on your blog. For this purpose, you can use phpMyAdmin. There are several different ways to connect to phpMyAdmin, depending upon your web host. You need to contact your web hosting company for more details on connecting to phpMyAdmin.
Following are the steps that should be used to get the database backed up:
- Click on “Databases” from top menu, it will list all your databases. Newer versions of phpMyAdmin provides a list of databases on the left side panel as well.
- Once you are on the database page, choose the desired database you want to backup.
- Once the database is selected, there is another screen which shows the listings of tables that your database contains.
- Click “Export” from the top menu. There are two different methods: Quick and Custom; if you choose Custom, then you need to follow these steps:
- Select all tables
- In output section, select Output as a file option
- Select Compression method. This step is optional but you should compress if the database is large
- Select SQL from Format dropdown/radio.
- Check “Add DROP TABLE”: this can be useful if the table already exists and needs over-writing in any existing database.
- Check “IF NOT EXISTS”: this prevents errors during restores if the tables already exists.
- Click Go. The data will be saved to your computer.
This will create the backup for your database. Keep these files safe and create copies for both WordPress files and database files to different media storage.