How to backup WordPress to Google Drive

How to backup WordPress to Google Drive

How to backup WordPress to Google Drive
Checkout the benefits of a WordPress Backup to Google Drive.
Before storing your WordPress backups in Google Drive, you need a Google account. You can find a guide how to set up it here. After this, you need to authenticate BackWPup in Google Drive. Follow these steps:

Log in to your Google account.
Visit https://console.developers.google.com/apis/library.
Create a new project and select it.
Create a new project
Create project
Activate the Google Drive API for this project.

Activate the Google Drive API for this project
Enable Google Drive API
In the sidebar, click on Credentials, and then, if a consent screen configuration is requested because was never set before, like in the picture below, proceed to click on CONFIGURE CONSENT SCREEN
Click on CONFIGURE CONSENT SCREEN if no consent screen is set
And in the next screen select the External option:
Select the external option for the User Type
Finally, in the next screen set an application name, your google account for email support and your own email address at the bottom for Developer contact.
After that, you can complete the process by pressing the Save button in the next screens until you get back to the Dashboard.
After these settings, your Authentication is set in Testing mode as default: in order to set it in Production, when your App has to be used in production mode,  select the OAuth consent screen link in the left menu and then click on PUBLISH APP.
Work in testing mode will limit the access to Google Drive, providing more restrictions to the authentication process. See the picture below:
Select the OAuth consent screen link in the left menu and then click on PUBLISH APP
Now, if the consent screen is set, from the main dashboard click on the Credentials link, and then click in the link + CREATE CREDENTIALS and selectOAuth client ID.
Click on the Credentials link, and then click in the link + CREATE CREDENTIALS and selectOAuth client ID
Here you are redirected in a new page: select Web application under Application type and fill in a name for the web application. Leave the field Authorised JavaScript origins empty. For the field Authorised redirect URIs you need to go your WordPress Dashboard (see next Step).
Set the Web Application
In your WordPress admin area go to BackWPup → Settings → API Keys and there to the section Google API Keys.
BackWPup → Settings → API Keys and there to the section Google API Keys
Copy the displayed URL under Redirect URIs and paste it into the Authorized redirect URI field in the Google Drive form.
Now click on Create.
Create the Redirect URI
After that, the client is created and a form shows the Client ID and Client Secret.
Client ID and Client Secret form
Copy the Google Drive Client ID and Secret and paste them into the BackWPup backend in the field Client ID and Client Secret.
Save the BackWPup settings.
Edit the desired backup job and choose Google Drive as backup destination. Or create a new job: BackWPup → Add new job → General, section Job Destination.
BackWPup → Add new job → General, section Job Destination
Now you can see a new tab To: GDrive. Click on the tab.
GDrive. Click on the tab
Click on Reauthenticate to authenticate BackWPup in Google Drive.
You are redirected to Google and have to allow BackWPup access to Google Drive. Click on Allow.
BackWPup access to Google Drive
After this, you will be redirected to your WordPress admin area, where you should see the successful authentication.
Please note: If you want to set up multiple WordPress backup jobs to the same Google Drive account, you can run into trouble with the authentication. Instead of creating a new job, copy the job where you first set up Google Drive. Make the changes to the copied job to keep the same authentication details.

On the settings page, there are some more options:

Folder in Google Drive: Name of the folder, where all backups will be stored.
File Deletion: The maximum number of backups to be stored. Older backups will be deleted.
Checkbox below File Deletion: Pushes the old backups to the Google Drive trash instead of deleting immediately.

Test the correct Google Drive authentication by starting a backup job with this destination. If the run was successful, you should see your backup in Google Drive.
You should see your backup in Google Drive

How can I encrypt backups before I upload them?

How can I encrypt backups before I upload them?

How can I encrypt backups before I upload them?
As of version 3.6, BackWPup Pro offers the option to encrypt backups for upload to the backup target – a great feature for the security of your data and that of your customers and users.
And – because of the GDPR regulations – an absolute must for all those that store personal information in their backups and are based in the EU or have personal data of users residing in the EU in their WordPress installation.

Table of Contents

What exactly is an encrypted backup and why should you make use of the feature?Encryption procedureGenerating encryption keysEncrypting the backup during creationRestoring an encrypted backupDecrypting a backup
1. What exactly is an encrypted backup and why should you make use of the feature?
Whenever you create a backup with BackWPup or any other backup plugin, the result is usually uploaded to a backup target. That could be your FTP server, Google Drive, or any other cloud service.
In the event that someone gains access to the backup target, they are able to read the data in your backup without any problem. Unencrypted backups are a security gap and run the risk of your data and that of your customers and users falling into the wrong hands.
Encrypting a backup means that the data is made unreadable by way of an encryption process. You will have to generate a key (or a key pair) before encrypting. This key must then be kept in a safe place. The key is needed in the encryption algorithm to render the data unreadable and to decrypt the data as well. Only those in possession of the key are able to make the backup readable again.
Caution: You will no longer be able to access the data if you lose the key.
2. Encryption procedure
BackWPup offers two procedures for encryption: one symmetrical and one asymmetrical procedure.
The symmetrical procedure works with a single key and is based on the popular AES 256 procedure (AES = Advanced Encryption Standard). The same key is used for encrypting and decrypting.
The asymmetrical procedure uses the RSA algorithm and the AES procedure. Here we generate a random AES-256 key, which is then used for the encryption. Additionally, the AES key itself is then encoded using the RSA procedure (hybrid procedure).
The RSA procedure requires a key pair consisting of a public key and a private key. These can be generated via BackWPup Pro. The private key must be kept in a safe place and must only be known to you.
If you aren’t sure which of the two procedures to use – here are their advantages and disadvantages:

The symmetric procedure is easier to use because we simply store the key in the BackWPup Pro database once it has been generated. You don’t have to worry about keeping the key safe: you can copy-paste the key value that is available in the BackWPup Pro → Settings in the Encryption tab. But anyway we always strongly suggest creating and keeping a copy of your key. Your backup is safe as long as the database of your WordPress installation doesn’t become compromised: if your database is damaged, you could lose the key, and so you could not be able anymore to decrypt your backup unless you have a copy of the key. So, after the key is generated in your system, it has to be downloaded using the related button, otherwise the encryption cannot be properly activated.
The asymmetrical procedure is the safer option because it uses two keys. You are the only one in possession of one of those two keys. Disadvantage: You have to ensure the safekeeping of the private RSA key. You will no longer be able to access your data if you lose the key. Also in this case the download of the private key is required after the generation.

3. Generating encryption keys
You will first have to generate the key before you can create an encrypted backup with BackWPup Pro:

Go to BackWPup Pro → Settings and then select the Encryption tab.
Select the encryption procedure you want to use: symmetrical or asymmetrical.
Click Generate Key.

If you have selected the symmetric method, a single key will be generated and stored in BackWPup Pro. You should also save it to another location to be on the safe side.
If you have selected the asymmetric method, BackWPup generates an RSA key pair. Both keys will be offered to you for download. You should download the private key at least. Next, click Use these keys.

Click Save Changes.

Generate encryption key – symmetric (AES) or asymmetric (RSA)
4. Encrypting the backup during creation
For each backup job you can decide individually whether to create the backups with or without encryption. Simply check the Encrypt Archive box when creating or editing a backup job.
Activate encryption for backups
5. Restoring an encrypted backup
A backup is there to be able to restore your site in case of an emergency. Our BackWPup Pro Restore feature can restore both encrypted and unencrypted backups. Simply follow our BackWPup Restore instructions.
6. Decrypting a backup
In the event that you want to decrypt an encrypted backup, please download it from the backend of your WordPress installation as follows:

Go to BackWPup Pro → Backups.
Hover the mouse over the desired backup.
Click Download.
The backup is decrypted. If you have chosen the asymmetric method for encryption, you must enter your private RSA key in the window that opens, otherwise, you have to enter the symmetric key.

Note: You will need BackWPup Pro to decrypt the backup. You will not be able to decrypt the backup with any other tool.

Dropbox Token and Permission Updates

Dropbox Token and Permission Updates

Dropbox Token and Permission Updates
Starting September 30th, 2021, the Dropbox Authentication model will change: OAuth flow will no longer return long-lived access tokens.
In order to manage such a change also BackWPup has been properly updated: version 3.10.0 implements all the needed updates that let you continue to use BackWPup as usual.
What should I do as a BackWPup user?
In general there are no particular changes to perform. The important thing is to update your plugin to version 3.10.0 in order to manage the new authentication model set by Dropbox.
After updates, if you currently don’t have any job connected to Dropbox, then there are no further steps to perform.
Instead, if you already have some jobs created and connected to Dropbox using a previous BackWPup version, you will need to re-authenticate to Dropbox.
If this is your case, right after installing the latest version, you will get a notice that warn you to re-authenticate your jobs as reported in the following picture.
Dropbox Authentication Notification
In order to re-authenticate your jobs you can refer to: How to backup WordPress to Dropbox.

How to migrate your site with BackWPup

How to migrate your site with BackWPup

How to migrate your site with BackWPup
Starting from version 3.9.0, BackWPup extends the restore feature: it is now possible to restore your site to a new URL, hence is possible to easily migrate your site with BackWPup.
In this tutorial we are going to show how to perform a migration to a new URL with BackWPup. Let’s check it out!

Table of Contents

Create the back up archiveInstall the standalone Restore appMigrate your site to the new URLMigrate your site to the new URL through the plugin
1. Create the back up archive
The first step to perform is to create a back up archive of your site through BackWPup Pro.
There are several ways to perform this action, in fact with BackWPup is possible to create a back up of your system defining different settings and also creating the archive using several destinations. For our example here we just need a full back up, no matter which destination we want to use.
So you can refer to the following tutorial: Create a WordPress full backup: Database and files
After the full back up is performed you can download the backup archive in your local computer and proceed then with the next step.
2. Install the standalone Restore app
The migration feature can be performed in the new server via the standard BackWPup plugin or using the Standalone Restore App, which is also provided in the BackWPup package.
In this example we will use the Standalone App, because a site migration usually is performed from a source site to a new “clean” server. So, for more information on how to install the Standalone App you can refer to Install BackWPup Restore stand-alone App
If the App is in place, is now the time to perform the actual migration. Proceed further in the next section.
3. Migrate your site to the new URL
With the Standalone App, first we upload the back up archive package created as described in the above sections, then we can select the restore strategy. In our case we select the full option.
After that, in step 3, we need to fill the Database Connection parameters: these refers to the database in the remote server, hence the database has to be previously created. If you already have a WordPress installation set in the remote server these info are also available in the wp-config.php file.
Database connection settings
After filling the credentials click on the TEST CONNECTION button in order to check that the connection can be established. Finally click on the CONTINUE button to proceed further.
Migrate URL option
In the step 4 the migration option is available. If we do not select that option the back up archive package will be restored on the remote server referencing the URL value of the source server.
Since we want instead to perform a migration we need to select the migration option, as shown in the picture below.
Migrate URL option selected, source (Old) and remote (New) URL are shown
When the Migrate URL is selected the Old URL and New URL values are shown. The first one is read from the back up archive, while the second one from the server where the site will be migrated.
Click on the CONTINUE button in order to confirm the settings.
Ready to migrate
At this point everything is set. The restore process now can be activated clicking on the START button, as shown in the picture above.
The process will set up the same WordPress installation stored in the uploaded archive back up, but every occurrence of the Old URL will be properly replaced with the one specified as the New URL.
Let’s start the process.
Migration successfully completed
When the migration is successfully completed a message is shown, as reported in the above picture.
Follow the clean up instruction and the try to access with your browser to the New URL to check that the migration has been properly performed.
4. Migrate your site to the new URL through the plugin
As said, the migration can be performed not only through the Standalone Restore App, but also using the standard plugin. As an example we provide a brief description of the main migration steps, to show how they are rendered in the plugin.
In order to perform a migration we follow the usual restore process that is described in How do I use the BackWPup Restore feature?
When the database connection is successfully tested, the page with the migration option is shown
Migration option in BackWPup back end settings
Here, after enabling the option, the Old URL and New URL fields are provided. As before the default values for such URL are automatically detected, but the new URL can be also edited.
Old URL and New URL in BackWPup back end settings
Finally, click on CONTINUE to complete the migration process as described before.

How do I upgrade BackWPup Free to BackWPup Pro?

How do I upgrade BackWPup Free to BackWPup Pro?

How do I upgrade BackWPup Free to BackWPup Pro?
You want to install BackWPup Pro but have the free version already running in your WordPress installation? To keep the settings of the free version, please follow this guide to upgrade to the Pro version.
This tutorial can be applied only for BackWPup free version equal or higher than 3.8.0 . So if your current free version is lower than 3.8.0 first perform an upgrade on your site. If instead you do not want to perform such upgrade, you can stop reading this tutorial and refer instead to How do I upgrade BackWPup Free (version lower than 3.8.0) to BackWPup Pro?
BackWPup Pro can be purchased at BackWPup.com. The plugin zip file is available in your account after the purchase.

Login to your WordPress installation and go to BackWPup → Settings

Keep BackWPup data option
If the checkbox option Keep BackWPup data stored in the database after uninstall is not selected, select it and then press the Save Changes button
Now go to Plugins → Installed Plugins.

Deactivate and uninstall BackWPup.
Buy BackWPup Pro and download the zip file to your computer.
Proceed installing and activating the new plugin via WordPress. For further support you can also refer to How to install BackWPup Pro and activate your licence
Finally enter your licence data on the license tab settings page (BackWPup Pro → Settings) to receive automatic updates and get support if needed.
Enter your Master API Key and Product Id to activate your licence

How do I upgrade BackWPup Free (version lower than 3.8.0) to BackWPup Pro?

How do I upgrade BackWPup Free (version lower than 3.8.0) to BackWPup Pro?

How do I upgrade BackWPup Free (version lower than 3.8.0) to BackWPup Pro?
If you want to install BackWPup Pro and you have the free plugin with version lower than 3.8.0 already running in your WordPress installation, then check out this tutorial.
We are going to show you how to keep the settings of the free version after the pro one is installed and activated.
Before to go on we also want to suggest you the quickest way to achieve your goal: simply upgrade your free plugin to version 3.8.0 or higher, and then follow How do I upgrade BackWPup Free to BackWPup Pro?.
But if you instead do not want to upgrade your free version, continue reading this tutorial.
BackWPup Pro can be purchased at BackWPup.com. The plugin zip file is available in your account after the purchase.

Buy BackWPup Pro and download the zip file to your computer.
Unzip the zip file. The unzipped folder is called backwpup-pro.
Login to your WordPress installation and go to Plugins → Installed Plugins.

Deactivate BackWPup. DO NOT delete the plugin.
Via FTP, go to the /wp-content/plugins/ folder of your WordPress.
Deactivate BackWPup
Delete the folder backwpup.
Upload the folder backwpup-pro, which you have unzipped in step 2, to the /wp-content/plugins/ folder.
Go to Plugins → Installed Plugins of your WordPress. Maybe you have to reload the page, to see the newly uploaded Pro plugin.
Plugins → Installed Plugins
Activate BackWPup Pro.
Enter your licence data on the license tab settings page (BackWPup Pro → Settings) to receive automatic updates and get support if needed.
Enter your Master API Key and Product Id to activate your licence

How many BackWPup Licenses do I need?

How many BackWPup Licenses do I need?

How many BackWPup Licenses do I need?
You do not necessarily need a license for each domain. Instead, the number of necessary BackWPup licenses depends on the number of your single- and multisites.
Examples: BackWPup Licenses
In the following we would like to show some examples so that you can have a quick overview:

One single site = one BackWPup license – example: 5 pages in an own installation = 1 license
One multisite = one BackWPup license – example: 5 pages in one multisite = 1 license
A network of multisites = one BackWPup license for each multisite
redirections do not need an extra license – example: 1 installation on example.com + redirection from example.de to example.com = 1 license

TIP: If you need a couple of licenses, take a look at our product website backwpup.com, you’ll find interesting offers for sure.

How to backup WordPress to OneDrive

How to backup WordPress to OneDrive

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.

Table of Contents

Register an ApplicationSetting the APi Key and the Redirect URIRun a job in BackWPup: create back up archive in OneDrive
1. 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
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:
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
2. 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.
Setting the OneDrive Api Key in BackWPup
Then, in the same section, copy the Redirect URI as specified in the picture below
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
3. 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.
Select the OneDrive destination option in BackWPup
Then, head to the To: OneDrive tab, and in the Login, click the Reauthenticate button.
Reauthenticate the OneDrive connection
This way you should see the Authenticated! message highlighted in green.
OneDrive connection authenticated
Finally we have a job ready to be executed: go into the Jobs screen and run it:
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:
Check the the back up archive created is available in OneDrive

cURL error 28: Connection timed out after 5000 milliseconds

cURL error 28: Connection timed out after 5000 milliseconds

cURL error 28: Connection timed out after 5000 milliseconds
BackWPup license activation attempt could lead to this error message:
cURL error 28: Connection timed out after 5000 milliseconds
This problem is very rare and usually related to conflicts between your hosting provider and our licensing server. If you experience this error, it will not be possible for you to activate your product license.
We are working on a solution, but currently a fix is not available.
Alternatively, you can just use BackWPup Pro without activating the license. This does not prevent the plugin from working as expected, and when a new version release is available, you can download it in your My Account section and manually update your previous installation.
If you have doubts or need support for the manual update you can always contact our premium support here.
Instead, if you want a refund, consider that this is always granted within 30 days from the first purchase date, as reported in our policy.

How to exclude files and directories

How to exclude files and directories

How to exclude files and directories
BackWPup let you exclude some files and folders in the back up process through is settings page. We recently implemented new hooks to let you manage and extends these setting via code. Here follows a brief tutorial on how to achieve that result.

Table of Contents

Jobs files settings pageAdd folders to exclude in Backup content folder listAdd folders to exclude in other settings listsExclude files and folders
Jobs files settings page
If you create a new Job going to BackWPup->New Job and then select the Files tab, you land into the Folders to backup settings section.
Excluding files and folders settings page
From here you can exclude some folders and some file of your installations from the back up process.
But now you can also extend some of that options through new filter hooks.
Besides you can alternatively set an option using a filter, instead of managing it in the back end.
Let’s have a look to every hooks.
Add folders to exclude in Backup content folder list
The hook backwpup_content_exclude_dirs let you add directories in the list of the ones that you wish to exclude from the back up process in your wp-content WordPress directory.
Suppose you have the folders named as just-a-folder and another-folder in your WordPress wp-content directory. If you want to add these folders in the in Backup content folder exclude list, you can implement the following filter:
add_filter(
‘backwpup_content_exclude_dirs’,
function ($directories) {
array_push(
$directories,
‘just-a-folder’,
‘another-folder’
);
return $directories;
}
);
Here below you can see how the filter affects the Backup content folder exclude list, the new folder are added as an option.
Folders added in the in Backup content folder exclude list
Add folders to exclude in other settings lists
Similarly as described in the previous section, if you need to add new directories to be excluded from the back up in your job settings lists, you can create your own filter.  You can achieve that using the hooks listed here below:
backwpup_plugins_exclude_dirs
This hook let you extend the Backup plugins list. It lets you add the folders you want to exclude in your WordPress wp-content/plugins directory.
backwpup_themes_exclude_dirs
This hook let you extend the Backup themes list. It lets you add the folders you want to exclude in your WordPress wp-content/themes directory
backwpup_upload_exclude_dirs
This hook let you extend the Backup upload folder list. It lets you add the folders you want to exclude in your WordPress wp-content/upload directory
Exclude files and folders
If you need to exclude any folder or file from the WordPress root directory in your server you can use the Exclude files/folders from backup text area in the GUI: just add the folders and the file extensions you want to exclude separated by comma.
But if you want to achieve the same result using a filter this is again possible via the hook backwpup_file_exclude .
Here below we provide an implementation example that let you add two file extensions (.pdf and .epub) in the list of files you want to exclude from the back up.
add_filter(
‘backwpup_file_exclude’,
function ($fileExtensions) {
return $fileExtensions . ‘,.pdf,.epub’;
}
);
Then, if we head to our back end settings, we can see how these two extensions have been properly set in the Exclude files/folders from backup text area, as shown below.
Exclude folders and/or file extensions