How to backup WordPress to OneDrive

In this tutorial we explain how to connect your Microsoft OneDrive cloud storage with BackWPup, and we also provide an example about how to execute a back up in OneDrive.
Let’s have a look to the topic.

Register an Application

In order to backup your WordPress site to OneDrive you´ll need a working OneDrive Application.

Proceed first to log in into the Microsoft Azure Portal

If you don’t have a Microsoft Account you will be prompted for creating a new one.

When you are logged in into the Microsoft Azure Portal Registration page, register your Application using the available links as shown in the picture below

Microsoft Azure Portal with links to register an Application
Use the available links to access to the Application registration section in the Microsoft Azure Portal

This way you head to the Registration page where is possible register your application: fill all the requested data and get an Application ID to represent your application in API calls.

Please note: make sure you choose one of the options that use the personal Microsoft account like indicated in the picture below

Microsoft Azure Portal: fill the Application registration Form fields in order to get the Application Id

After registration, in the Application Overview you can find the Client ID:

ClientID in the application Overview
Get the Application Client ID value

The next step now is to create the client secret, in order to to connect BackWPup with OneDrive.

In the Application page created in the steps above go to Certificates & secrets and then click on the New client secret link in the page.

A form will be open: fill the needed values and create the client secret.

Create the client secret
Create the client secret

Setting the APi Key and the Redirect URI

Now proceed in your WordPress site and go to BackWPup Settings → API Keys tab and in the OneDrive Api Keys section fills the Client ID and client secret using the values from your OneDrive Application as shown in the previous section.

OneDrive APi Key settings
Setting the OneDrive Api Key in BackWPup

Then, in the same section, copy the Redirect URI as specified in the picture below

Redirect URI detail
Copy Redirect URI in your BackWPup settings

and paste it to your OneDrive Application in Microsoft Azure, going to Authentication link on the left menu, and then in the Redirect URI section:

Set the Redirect URI in the Microsoft Azure page
Set the Redirect URI in the Microsoft Azure page

Run a job in BackWPup: create back up archive in OneDrive

The Application has been properly set in the previous sections, hence let’s go on creating a new job: select Backup to Microsoft OneDrive from the Job Destination options and save the job.

OneDrive destination option
Select the OneDrive destination option in BackWPup

Then, head to the To: OneDrive tab, and in the Login, click the Reauthenticate button.

Authenticate button for OneDrive
Reauthenticate the OneDrive connection

This way you should see the Authenticated! message highlighted in green.

OneDrive connection authenticated
OneDrive connection authenticated

Finally we have a job ready to be executed: go into the Jobs screen and run it:

Run Now link to start the Job
Run the OneDrive back up job

And once the job is successfully finished, you should see the backup archive file uploaded correctly in your OneDrive App:

Back up archive file stored in OneDrive
Check the the back up archive created is available in OneDrive