How to Backup WordPress Site Files and Databases

backup wordpress site

Last updated - July 8, 2021

Despite the thousands of themes and plugins available for WordPress, there may come a time when you need to make changes to the source code files of your site. It could be to make an installed plugin compatible with your site theme, upgrading your site or after a malicious attack to fix things. Whatever the need might be, playing around with your site source code when you know nothing about PHP, HTML or CSS is not recommended. One mistake could render your site completely non-operational. Hence it is important to backup WordPress site files and databases before you make any changes.

In addition to this, it’s best if you regularly backup WordPress site files and databases as a general practice. Having that to fall back on will ensure that in unforeseen circumstances, your WordPress site can be up and running in record time.

There are several methods by which you can go about backing up your WordPress site. Several third-party plugins and services exist that can automatically create WordPress site backups. The problem is that they’re not open source and usually, charge for their services. Backing up and restoring their WordPress site is something every owner must know.

Most hosting companies like Bluehost can backup WordPress site files downloads as a part of their subscription. Contact your hosting provider to find out if they do. In any case, knowing how to backup and restore by yourself is good. So we will be going over how you can backup WordPress site files and databases as well as restoring them.

Understand more about the process step by step through this video:

Backing Up your WordPress site:

When you back up your site, you have to choose whether you want to include your databases or no. The databases contain user information and should be backed up if you wish to upgrade your WordPress site. If all you need to do is change how your site looks and feels, you can skip database backups. However, including database backups in your scheduled WordPress site backup is highly recommended.

Backing Up and Restoring WordPress Databases:

For this, you need access to the cPanel of your server. You then access MyPhpAdmin from the Databases section of your cPanel Admin section. After this, select the database from the section on the left. 

Then simply go to the Export Tab. Here you have the option to make a Quick Export or with Custom Options. For now, we will choose Quick Export, and export our database in the SQL format. This will download a SQL file with your database name, onto your machine.

Restoring it is just as simple: Access MyPhpAdmin from the cPanel again and click on the Import tab. Make sure the database you need to import has been created and is empty. Leaving everything as is, click on the Browse button and navigate to the SQL file and upload it.

Backing up and Restoring WordPress Files: 

For this, you will need a File Transfer Protocol client. We recommend FileZilla for this purpose. You will be needing FTP credentials to your server for establishing a connection. Your hosting provider will have sent an email with all the details including FTP credentials when you signed up for your server. If you don’t have your credentials, contact your hosting provider.

Inside FileZilla, in the left-hand window, you will see file navigation for your local machine and on the right for the remote site. The remote site refers to your WordPress server. Once you’re in, all the files in your WordPress server will be in the right, ‘Remote Site’ window. Choose the files that need to be backed up or simply choose all to make a complete one.

 

Navigate to the directory you want to save the files in. And then, simply drag and drop the chosen files from the right window to the left. This will take time to complete as there could be many files being downloaded to your machine.

You can then compress the downloaded files to save space if you want. Keep in mind cPanel also lets you download files from your WordPress server in ZIP format. You can simply download this file off your site. But make sure to not leave the zip file on your server as it poses security threats.

Restoring the files is just as simple: connect to your WordPress server using the FTP credentials via FileZilla, then drag and drop the files you wish to restore from the left side window to the right. The files will then be uploaded to the server.

Keep in mind, in case you’re restoring your site completely, simply uploading the files through FileZilla will prompt a fresh installation of WordPress. You need to restore your databases after restoring your files to truly restore your WordPress site.

Maintaining regular backups of both your WordPress files and databases is important but often overlooked. We hope this article showed you how simple it is to backup and restore your WordPress site.

Further Reading:

1 COMMENT

  1. Thanks for sharing this info, I am having no technical knowledge but after going through your article I am glad to know that managing wordpress is never to tough, I always use to hire freelancers for my wordpress issue or for site transfer. But now I will try to do by myself. Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here