Javatpoint Logo
Javatpoint Logo

How to backup WordPress site

A backup is just the copy of your original site through which you can restore your original site if anything goes wrong. Keeping backup on safe side is always advisable.

A site is generally made up of two parts. One is all the installed themes/plugins, media, etc and other is Database which stores all your blogs, posts and comments, etc. Without files there is no site and without database there is no data. Hence both of them is important and need a backup.

Why Backup is important

Backup allows you to retrieve your site back if something goes wrong or if your site breaks. There could be many reasons for this like external attack, hacking, server down, etc.

You can lose everything from data to all the posts on your site. To avoid this, backup is important.

Securing your backup is also an important issue. Make sure to update your plugins and themes regularly or in a certain interval. Use strong Username and Password. Database name should also be uncommon.

Backup WordPress root Files

There are many files in your WordPress directory. These files can be downloaded back from site. Some of them can be retrieved back but some can't.

The wp-content directory contains all your installed themes and plugins including all your media files like images, audio or video files which you uploaded on your site. Hence, it makes it personnel and unique.

The wp-config.php file consists of your Database and other personnel options which make it also a unique file.

Both the above files can't be replaced by other default files hence, they need to be backed up.

Backing up site

Most hosts allow backup the entire server, including your site but this process takes some time in recovery. Check your host for what programs and services they are providing.

Using FTP clients you can copy the files on your system and zip them. It is better to make three or four copies of your backup for safe side.

Backing up Database

In the database all your posts, media files, comments and metadata will be stored. It also contains user's information and all your plugin settings. All these informations are personnel and unique, if you'll lose them they will be gone permanently.

The entire WordPress table in your database will start from the prefix wp_. So it will be easily recognizable.

  • First of all, go to phpMyAdmin on local host.
  • Wordpress How to backup wordpress site1

    Look at the above snapshot, click in Databases to access all the databases.

  • Select your WordPress database (which you created during installation of WordPress).
  • You will see a lot of tables from the WordPress database.
  • Wordpress How to backup wordpress site2

    Look at the above snapshot, all the above tables will be in your WordPress database. If you have some more tables then they may be anti-spam plugins or static plugins.

  • Click on Export.
  • Wordpress How to backup wordpress site3

    Look at the above snapshot, there are two methods to export, Quick and Custom.

    Quick is used when the database is small.

    Custom is used when the database is large.

    We are choosing Custom.

  • After choosing Custom, a table will appear. Select all the tables.
  • Wordpress How to backup wordpress site4
  • Now come to the Output section. Following screen will appear.
  • Wordpress How to backup wordpress site5

    Look at the above snapshot, select Save output to a file and None for Compression.

  • Choose SQL from Format drop-down menu.
  • Check "Add drop table". This is useful for over writing an existing table.
  • Check "If not exists". It prevents from errors when tables are already there.
  • Now click Go. Your data will be saved in your system.
  • Store these files at various places for backup.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA