WordPress Backup

The Ultimate Guide to WordPress Backup and Migration

WordPress backup and migration are two of the most daunting tasks for the majority of the average WordPress users. But does it really have to be?

WordPress Backup

You can sure hire people to have it done for you. But if you are willing to pay a little attention and time it is something you can all manage on your own. If you want to know how this article is for you.

With the help of this article, you will be able to learn about all the steps and requirements for carrying out WordPress Backup and Migration tasks on your website. By the time you finish reading this article, you would surely feel confident about tackling them on your own.

So, let’s get started then.

What Does WordPress Backup Include?

WordPress backup is a copy of all WordPress database and files that make up your entire website. This backup copy is kept safely somewhere to use as and when needed.

A WordPress backup contains the website files such as themes, plugins, scripts, media, etc., and your MySQL database that stores your blog posts, comments, and the options you configure in your WordPress admin area.

Why Should You Keep a Backup of Your WordPress Website?

Some of the most probable incidents that might make you say “thank god, I have got a backup!” are as follows.

  • Your WordPress website gets hacked.
  • Your website goes through a server crash or failure which results in losing all your site’s data.
  • You made a mistake of accidentally deleting one of the important WordPress files, posts, or pages.
  • An issue caused during an update results in your site’s content disappearing or become unusable.

Would you be willing to lose all the time, money, and effort that you have devoted to building your website just disappear like that? If not, get a backup and save your data.

If you are unsure about how to backup your website, we have got you covered with all the right information that you will need to do it properly.

How to Backup Your WordPress Website?

There are different ways that you can opt to get a backup done for your WordPress website. It’s great to have different options for backups since you don’t have to rely on one single method for backups and choose whichever one you feel the easiest to handle.

It’s also important to keep different copies of backup if one of them gets destroyed or becomes inaccessible for you.

But if you don’t want to do so or think it’s a lot of work you can choose one method based on how much time you are willing to spend on the process, the nature of your website (whether it’s constantly updated or not), etc.

You can backup your WordPress website through the following methods.

  • Manual WordPress backup
  • Backup through your hosting provider
  • Automatic backup using a plugin

Now, let’s see how each of its done.

Manual WordPress backup (step by step)

Although a bit time consuming, Manual WordPress backup are a much reliable option since you are in full control of the entire backup process. Plus it doesn’t need any other resources than what you already have access to.

Your WordPress website consists of two main components – the WordPress database and files. A complete WordPress backup would mean the backup of both these components. WordPress database backup can be accessed through phpMyAdmin. Usually, it comes pre-installed in the cPanel of your hosting account. You only need your hosting account credentials to proceed with the process.

Your WordPress files are available on your web host’s server. You can access them either via your website’s cPanel or FTP. Now, let’s begin the manual WordPress backup with the backup of the database.

Its good practice to create a folder for saving your backup data before beginning the backup. You can create a folder and two sub-folders in it for database and WordPress files.

WordPress Database Backup

Follow the below steps to backup your WordPress database via phpMyAdmin.

Step 1 – Login to your website’s cPanel.

cPanel

Login to the admin interface of your website’s cPanel by using your login details.

Step 2 – Select php myAdmin

Once you login to your cPanel, click on the databases drop-down and select phpMyAdmin. Now the phpMyAdmin console will open in a new tab.

Step 3 – Select the database

Database

In the opening phpMyAdmin page, you need to select the database of your website. If the server itself is hosting a number of websites, you’ll see a list of available, linked websites. Once you’ve selected the correct database, the right-hand panel will display all of the tables associated with the site.

Step 4 – Select the database tables and click the export tab.

Export

Here you may select a preferred export method from Quick and Custom, then choose the format as SQL.

Now hit the Go button.

This will start the database download process. Once it’s completed, you may move the database file having the extension .sql to the previously created sub-folder named “database” inside the main folder backup.

But in case the download doesn’t automatically start, it may display directly within your php myAdmin console. Now you may simply copy the entire display content and paste it into a new IDE file (Sublime, Brackets, or your computer’s default TextEdit). Then save the file as db.sql or something similar and move it to the database sub-folder.

This ends the database backup of your WordPress website.

The next part is the backup of the WordPress files. Let’s get into that.

WordPress files backup

You have two ways to backup all your WordPress files. Either via using cPanel or FTP. At first, let’s see how it’s done via the cPanel.

1. Using WordPress cPanel

Follow the below steps to backup your WordPress files through cPanel.

Step1 – Login to cPanel

Check This Post:-   How Does WordPress Compare with Other CMS Platforms?

Once you log in to cPanel expand the files tab and click the file manager.

File Manager

Step 2 – Select the public.html file

Once you open the file manager navigate to the right-hand column and select the folder named public.html.

Step 3 – Compress the file

Once you have located the public.html folder right click on it and choose compress.

Now a dialog box will appear asking you to choose the compression type.

Choose Zip archive and click the compress files button.

Step 4 – Download the zip file

Once the zip file is ready select and download it. Now you may move the file to the previously created sub-folder “WordPress files”.

Now you have successfully made a copy of all your WordPress files.

2. WordPress Backup via FTP

Taking a manual backup using FTP can be slightly complex as you need to know your FTP credentials, requires third-party software and is also dependent on the connection between your server and FTP.

Having said that, this method will come handy as some of the managed WordPress hosting providers such as FlyWheel doesn’t give access to the cPanel of your website.

Once you have the FTP credentials and FTP software (FTP client) like FileZilla installed on your computer, let’s get started with the process.

Step 1 – Open the FTP client and connect to the server.

Filezilla

Open the FTP client (Filezilla is used in this example) installed on your computer and after entering your credentials connect it to the server.

Step 2 – Choose public.html folder from the remote site panel.

Public Folder

Once the connection becomes successful you will be able to see the list of your website’s files and folders. Choose the public_html folder from the list. This folder is also called the root folder as it is the entire collection of your website’s site files.

Step 3 – Download the folder to your local system.

Now you have successfully created a manual backup of your entire WordPress website.

Backup from Your Hosting Provider

Most hosting providers offer backups with their package, which takes away your burden of performing backups on your website. They offer automatic, complete, daily backups of your website. But the real question is, are those backups reliable?

Despite being a great solution for your website’s backup, you need to think twice if you are choosing solely this method to create backups for you. Here are a few points that you need to look into before choosing your host to create backups for you.

First and foremost, since the backup is done out of your control and presence, you won’t be able to make sure if they are done properly or as ensured by your host. This would make it hard for you to trust their backups.

Another major issue is that if you are running a number of sites on the same hosting account, it may not be easy for you to restore a single site from the backups without restoring all the sites.

If your backup fails for some reason, you won’t be notified thus there will be no backup available when you need them. Unlike other backup methods, you will not be in control of the backup data. Thus when you need to restore your backup you will have to request to your host and some hosts may not be as responsive as you think.

While the manual backup is a time-consuming process, host backups are risky. This calls for the need for a backup method that is both reliable and easy at the same time. Using a backup plugin to address your backup needs would be a perfect solution to this.

Automatic Backup Using Plugins

There are a number of WordPress backup plugins both free and paid that are specifically designed for the backup and restore of your WordPress website’s data. All you have to do is install one of them on your website, do a little configuration and you are all set to go.

In this example, I have chosen the Updraft Plus plugin (free version) to show you how to backup your WordPress website using a plugin. It is one of the most popular backup plugins for WordPress with over 2 million active installations. Here is a brief review of the plugin.

UpdraftPlus – Brief Review

UpdraftPlus

UpdraftPlus uses up only fewer server resources thus a faster solution for WordPress backups. Using UpdrfatPlus, you can set up automatic backup schedules to make things easy for you.

It lets you backup your website data to more cloud options than any other backup plugin could offer.

Dropbox, Google Drive, Amazon S3 (or compatible), UpdraftVault, Rackspace Cloud, FTP, DreamObjects, Openstack Swift, and email are the remote options provided by UpdraftPlus free version to upload your data.

By upgrading to its premium version you can avail even more awesome features as listed below.

  • Incremental backups
  • Multisite/multi-network compatibility
  • Easy website migration
  • Additional backup options – Microsoft One-Drive, Microsoft Azure, Google cloud storage, Backblaze B2, SFTP, SCP, and WebDAV.
  • Database encryption
  • Advanced reporting
  • Supports WP-CLI
  • And more

It’s time to take a look at how the plugin helps you perform backups on your WordPress website. You may follow the below steps to learn about it.

Step 1 – Install and activate the plugin on your WordPress website.

UpdraftPlus WordPress Plugin

Click Install Now and Activate the plugin.

Step 2 – Open the configuration page of the plugin.

To get to this page, you can navigate to Settings > UpdraftPlus backups from your WordPress dashboard.

Open the Backup/Restore tab.

Hit the Backup Now button to create an instant backup of your WordPress website.

Backup

This triggers a pop-window as shown below.

Backup Now

Click Backup Now.

This starts the backup process and once complete will be shown the below screen.

UpdraftPlus Backup

It shows the date of the backup and backup data by name for you to download also the options to restore or delete your website’s backup data.

Scheduling Backups with UpdraftPlus

Apart from instant backups UpdraftPlus also allows you to schedule backups on your website. You may follow the below steps to carry out on your website.

Step 1 – Open the settings on the plugin page

UpdraftPlus Settings

Step 2- Select a backup schedule from the drop-down

You can choose to schedule backups on an hourly (every 2,4,8,12 hours), daily, weekly, fortnightly, or monthly basis. You have to choose a backup schedule for both files and database.

Step 3- Choose your remote storage location

Now you have to choose a remote storage location for storing all the backup data of your website. You can choose one from the available options by clicking on the respective icons. You can configure the rest of the settings as per your preferences.

Check This Post:-   8 Essential WordPress Plugins for Your Small Businesses

Once you complete it, you can scroll down to the end of the page and click the Save Changes button.

Now a small pop-up window will appear asking you to configure the authorization settings for the chosen remote location. You can click the link on the pop up to authorize the remote storage. Without authorization, you will not be able to backup data to it.

Following a screenshot of the remote storage authentication popup for Google Drive.

Google Drive

You may click on the link to proceed with the authorization process.

Step 4 – Authorization of the selected storage location.

Authenticate Google Account

Hit the Allow button.

This will take you to the following page.

Send Backups

Click the Complete setup button to finish the scheduling of backup. Now you will be redirected to the Backup/Restore page of the plugin where you will be able to see the upcoming scheduled date of the backup (as you configured) and corresponding backup restore options.

Backup Restore

Now that you have learned everything you need to know about WordPress backups, it’s time we moved to the next important section of the article – WordPress migration.

Let’s go from the basics to the step by step process of migration.

What is WordPress Migration? When Do You Need It?

WordPress migration is the process of moving a WordPress website from one server to another without affecting its functionality. There are several circumstances under which you will be required to migrate your website.

  • You wish to move to a different host for better performance of your website or for affordability.
  • For moving your website to a new domain.
  • To push a local WordPress website to a live server.

Just like backups, Migration can also be done through multiple ways. You can either do it manually, with the help of a WordPress plugin or have it done by your hosting provider itself.

How to Manually Migrate your WordPress Website

Although there are multiple ways available for handling the migration of your website, learning how to do it on your own has its benefits. For instance, certain migration plugins may have compatibility issues with your website or your host may not be offering migration services for you, and even if they do you may have to pay extra charges for it.

You could avoid all these uncertainties if you know how to carry out these tasks yourself. Thus if you are ready to do it, follow the below steps.

Step 1 – Backup your Website files

It is the first step to migrating your WordPress website. As it’s already been explained in the first part of the article, it doesn’t have to repeated here. But, if you feel you need to read it again, you can sure give it another look.

The time required for your backup may vary depending on the number of media uploads you have in your site. Thus while the backup is underway, you may move on to the next step.

Step 2 – Export the WordPress database

You need to export your WordPress database to a SQL file. You can do this via your website’s phpMyAdmin.

  1. Select the existing site’s database.
  2. Click the Export tab.
  3. Select Quick for the export method
  4. Select SQL for the format.
  5. Click Go.
  6. Save the file to your local machine.

Step 3 – Create a database

You need to create a database on your new host server for importing the database exported in step 2. For that,

  1. Login to your new web hosts’s cPanel.
  2. Open the MySQL database and create a new database with an appropriate name for your website.
  3. Click Create Database.

Step 4 – Create user

Now you have to create a user who has access to the database created in step 3.

  1. Navigate to the MySQL Users section.
  2. Provide a user name and password.
  3. Click Create User.
  4. In the Add User to Database section, select the database and user.
  5. Click Add.
  6. Now add the following privileges to the newly created user: Select, Insert, Update, Delete, Alter, Create, Drop, and Index.
  7. Click Make Changes.

Step 5 – Edit the wp-config.php file

Go to the folder on your local computer where you have downloaded the website files in the first step. Among those files you will be able to locate a file called wp-config.php (it controls the access between WordPress and your database).

Open the file with any of the text editors and make the following changes into it.

Note: To be on the safe side make a copy of the file and save it in another location so you can retrieve it anytime if something goes wrong while making changes to the file.

  1. Change the database name: The name of the database (db_name) on the file will be that of your old database which you need to set it to the current one.
  2. Change the database username: Change the username (db_user) to the newly created one.
  3. Change the database user password: Finally, change the password (db_pass) as well.

Once you have made all the changes save and close the wp-config.php file.

Step 6 – Import your WordPress database

Now that you have created a new database on your new host server, it’s time to import your WordPress database into it. For this launch phpMyAdmin from the cPanel software on your new server and select your new database from the list on the left hands sidebar. Once it opens,

  1. Select the Import tab from the navigation menu.
  2. In the File to Import section, click choose file and select the SQL file you exported in the previous step.
  3. Click the Go button (make sure the partial import checkbox is not selected and that the format is set to SQL)

This will commence the data import process. Once it’s completed you will get the message that informs you of the successful completion of the import.

Step 7 – Upload the WordPress files to your new host

Now that you have completed the import of your WordPress database, it’s time to upload your WordPress files (which are exported in one of the previous steps). For this follow the steps as shown below.

  1. Connect to your new web host using an FTP program.
  2. Locate the public_html folder
  3. Upload files to the public html folder (If it is the primary or only site being installed on the webserver)
Check This Post:-   How to Resolve ‘Error Connection for Database in WordPress’ Conveniently?

Step 8 – Swap database values with search and replace script

(This step is only required if you are moving your website to a new or different domain. Otherwise, you may skip this step.)

Although we have moved the files and database from the old site to the new one, there will be internal links and insert images that point to URLs in the old server. When moved to a new domain these links will break. To avoid this, you need to swap all the references (from your database) to the old site URL with the new site URL.

The quick and easy way to do that is by using a search and replace script. This script searches for a value in a database and swaps it with data from another while also performing serialization and deserialization.

Step 9 – Reconfigure DNS settings

Before you can use the site on your new host you will need to reconfigure your domain’s DNS settings. They will be set to point to your old host and you will need to point the correct records to the new server IP address.

DNS changes can take up to 48 hours to fully take effect. It’s best to do this at a period when you expect lower levels of traffic to your site. During this 48 hour window, you should avoid making any changes to your website as you may be changing the old version of the site. After the expiration of a 48-hour period, you should now be able to access the new web host when you go to your website.

WordPress Migration Using Plugins or Via Your Host

If you think manual migration process is too much for you or you don’t have time to spend on it, the best bet is to go for WordPress migration plugins or the migration services provided by your hosting provider.

There are a number of plugins both free and paid versions you can find for this purpose. Most plugins come with both backup and migration features as backup is one of the important steps in website migration.

As for the migration done by your host, you should pick the right and a high-quality hosting company that can do the job for you. The best thing about letting your host take care of the job is that they do all the testing for you without letting your website suffer any downtime. It’s especially a great choice for sites having heavy traffic or if you have multiple sites to migrate.

On the downside, through hosts you will only be able to carry out the migration between hosts. It won’t support domain name migration. The primary reason hosting companies offering this feature (for free) is for encouraging websites to migrate to their hosting platform.

Best Plugins for WordPress Backup and Migration

Duplicator

Duplicator WordPress Plugin

Duplicator is an easy, fast, and powerful WordPress plugin that helps you duplicate, clone, backup, move, and transfer an entire site from one location to another. It is one of the popular migration plugins that offer zero downtime migrations.

Using this plugin you can migrate your website in just a few minutes. It comes with a number of cloud storage options for backing up your WordPress data and handles serialized and base64 serialized replacements.

UpdraftPlus

UpdraftPlus Plugin

UpdraftPlus is another popular and reliable option for WordPress backup and migrations. It comes with a plethora of cloud storage options for storing your WordPress data. It even lets you separately schedule backups for WordPress files and database.

But for availing migration features, you will either need to upgrade to the premium version of the plugin or buy an addon.

All-in-one WP Migration

All in One WP Migration

All-in-one WP Migration is another great choice for WordPress migration. It comes with an easy to follow set up for migration and has no limitations on host or operating systems it can work with.

Using this plugin you can apply a number of finds and replace operations on your database during the export process. It is also capable of bypassing the upload restrictions that certain hosts set by letting you import your site by chunks.

Hosting Companies Offering Free WordPress Host Migration Services

Here are the popular hosting companies that offer free WordPress migration services along with their hosting package.

SiteGround

SiteGround is one of the popular hosting platforms currently available. They provide an excellent free migration service along with their hosting package.

InMotion Hosting

With InMotion Hosting, website transfers consisting of 3 or fewer cPanel accounts, databases, or websites are free. To avail of this feature, you need to log in to your account management panel and click on Website Transfer Request to raise a ticket.

HostGator

In addition to offering cheap hosting services, HostGator also lets you migrate your website for free. But it only allows the free migration of one site. Thus you may want to make sure that your primary domain name is the site you want to migrate.

Flywheel

Flywheel is a managed WordPress host that offers you unlimited free website migrations.

Wrapping Up

Having learned all the different ways you can handle these tasks on your WordPress website, its time you made up your mind about how you choose to go about it. While manual backup and migrations are doable, it takes up a lot of your time and energy leaving you exhausted at the end. It might even cause significant downtime for your website as its progress is slow.

Hence, for more efficient and easy migrations it’s best to go for either a WordPress backup and migration plugin to automate the process or let your host help you with it.

Vaibhav S
Myself, Vaibhav S is a Founder and Editor-in-Chief of TechnoGiants, working Software Professional, and an avid lover of Software's and Web Services. I love computers and also love to write and share about Tech-related Stuff, Computers etc with others.
https://technogiants.net/

8 thoughts on “The Ultimate Guide to WordPress Backup and Migration

  1. I am really impressed along with your writing abilities as neatly as with the layout for your weblog. Stay up the nice high quality writing, it’s uncommon to look a nice blog like this one today.

  2. Wow that was unusual… Thanks for such nice brilliant knowledge and just wanted to say excellent blog!

  3. This was an ultimate guide, thanks for this post admin. This saves huge time in migration.

  4. Thank you. This is extremely helpful. I am not a beginner to websites, but I am to Word Press, so this helps.

  5. Thank you for a great informative blog. It’s thanks to people like you that help newbies like me ? Much appreciated…

  6. Very clear! I was just doing a website migration and seems like you got it all covered. It’s pretty much like working in a mine. ?

Comments are closed.