How to backup WordPress to OneDrive

In this post, we explain how to connect your Microsoft OneDrive cloud storage to BackWPup, and we also give an example of how to perform a backup to OneDrive.

Application Registration

To save a backup of your WordPress site to OneDrive, you first need a working OneDrive Application.

First, log in on the Microsoft Azure Portal.

If you don’t have a Microsoft Account you will be prompted to create a new account.

Once you are logged in to the Microsoft Azure Portal, register your Application using the available links, as shown in the figure below.

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

This will take you to the registration page: fill in the requested data and get an Application ID to represent your application in API calls.

Please note: make sure you choose an option that is relevant to your Microsoft account.

Microsoft Azure Portal: fill in the registration form fields to get the registration ID.

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

ClientID in the application Overview
Get the Application Client ID value

The next step is to create the client secret to connect BackWPup to OneDrive.

On the Application page created in the previous steps, go to Certificates & Secrets and click on the New Client Secret key.

A form will open: Enter the required values and create the client secret.

Create the client secret
Create the client secret

Set Up the API Key and Redirect the URL

In your WordPress backend, go to the BackWPup → Storage of job → add the Client ID and client secret of the OneDrive Application under OneDrive API Keys.

Next, copy the Redirect URL from the section.

Then, paste it to your OneDrive Application in Microsoft Azure, by going to the Authentication link on the left menu, and then into the Redirect URL 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 the Backup Archive in OneDrive

The Application has been properly set in the previous sections, now it only needs to be authenticated.

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

Finally, you have a job ready to be executed! 

When the job completes successfully, you should see the correctly uploaded backup archive file in your OneDrive app: Backup Archive to OneDrive.

Back up archive file stored in OneDrive
Check if the created backup archive is available in OneDrive.