How to backup your WordPress database in 2020

Your WordPress database contains all kinds of vital data. Firstly, all of your content is in there, such as pages, blog posts, and comments. But it goes much deeper than that. The WordPress database contains critical information, including theme settings, plugin settings and much more.  

The problem is that, on its own, WordPress will not save all of the critical information stored within the database. That means if something goes wrong, such as your website being hacked, you’ll be unable to restore your WordPress site to its previous state.  

There’s good news though, it’s not difficult to backup your WordPress database with a little help. 

So, by the end of this article, you’ll know exactly how to backup your WordPress database. The best part? You’ll be able to do it in 4 steps with the WordPress backup plugin, UpdraftPlus.

Why you should backup your WordPress database

As a website owner, you should always plan for the unexpected. A malware attack or a website update gone horribly wrong could leave you having to restore your website to a previous date

Your site’s database contains a treasure trove of data that reaches far beyond your theme or plugin settings. 

It contains vital data such as:

  • User logins and passwords. 
  • Widget configurations.
  • Website customisations.
  • And a range of other site-wide settings. 

If these aren’t backed up correctly, you could lose them all in an instant. Can you imagine losing every page, post, and link you’ve ever created? For most, a permanent loss of data on this scale doesn’t bear thinking about.   

Fortunately, with the help of UpdraftPlus, you’ll never have to fear losing critical data from your WordPress database ever again.  

How UpdraftPlus works

UpdraftPlus backs up everything you could possibly need to restore your site to its previous settings in the event of your site being compromised. With this free plugin, you can restore your website with the click of a mouse. 

UpdraftPlus allows you to achieve this outcome by backing up all WordPress data contained within the database, including: 

  • Content files including pages and blog posts.
  • Comments data and metadata.
  • All links.
  • Plugin settings.
  • Theme settings.
  • User account data.
  • WordPress site-wide settings and customisations.
  • All media/upload records.

UpdraftPlus Premium takes this a step further, you can backup unlimited WordPress and non-WordPress files. These can be saved to more than one cloud storage locations for a more thorough and secure backup. 

You can also take advantage of the UpdraftPlus Vault, which, as part of the UpdraftPlus plug, backs up your data at predetermined intervals and is encrypted for an additional layer of security. 

Now we’ve covered how the plugin works, let’s show you how to backup your WordPress database.

How to backup your WordPress database

To backup your WordPress database, you’ll need to:

  1. Install the WordPress backup plugin, UpdraftPlus.
  2. Adjust your database backup settings.
  3. Select where you’d like your backups to be stored.
  4. Backup your WordPress root database.

That’s it. Below, we’ll outline these steps in detail so that you can backup your WordPress database and have greater peace of mind. 

Let’s make a start with step one, installing UpdraftPlus.

Step #1: Install UpdraftPlus

The process of backing up your WordPress database starts with installing UpdraftPlus. Fortunately, this is a process that only takes a couple of minutes. The process is much the same as any other WordPress plugin. 

To install UpdraftPlus, take the following steps: 

1. In your WordPress dashboard, navigate to Plugins > Add New

2. In the search bar, type UpdraftPlus

3. Find the UpdraftPlus WordPress Backup Plugin within the search results and then press Install Now

4. Once installed, click Activate.

Now that we have UpdraftPlus installed, we can move onto creating a backup of your WordPress database.

Step #2: Adjust your database backup settings

Once installed, you need to adjust your database backup settings before performing your first backup. 

  1. Navigate from the WordPress dashboard to Settings > UpdraftPlus Backups. This will open your UpdraftPlus settings page.
  2. Next, select the Settings tab from the choices at the top. 

Here, you’ll be offered several options concerning how often you would like UpdraftPlus to make a backup of your WordPress website. 

If you’re in charge of a sizable website with new posts and pages created each day, then the incremental options of 2, 4, 8, or 12-hourly backups may suit you best. 

Alternatively, should you operate a smaller site that doesn’t need to be backed up as frequently. You can configure UpdraftPlus to backup daily, weekly, fortnightly, or monthly.   

You also have the opportunity to determine how many of these backups should be stored at any one time. Subsequent backups will override the existing ones. UpdraftPlus also allows you to schedule backup files and databases separately or together.

Step #3: Select where you’d like your backups to be stored

If you scroll down the page a little further, you’ll notice you’re given the option of where you’d like your file backups to be stored. There are numerous options here. Including leading providers of cloud-based storage such as Dropbox, Amazon S3, and Google Drive. 

Top tip: If you’d like to store your backups remotely, UpdraftPlus Premium comes with a free 1GB of storage using UpdraftVault for 1 year.

Once selected, follow the on-screen instructions. 

Each storage option comes complete with its own set of instructions for setting up. Once you have completed those instructions, select which files you want to include within the backup and press the blue Save Changes button positioned at the bottom of the page.

If you upgrade to Updraft Premium, you can choose to spread your backups across multiple storage locations. Alternatively, you can purchase the Multiple Storage Destinations Add-On on its own.

Step #4: Backup your WordPress root database

With the free version of the plugin, UpdraftPlus creates backups of everything in the WordPress content directory, including but not limited to database files, plugins, uploads, themes, and so on. 

However, if you upgrade to UpdraftPlus Premium, you can perform a complete backup of your WordPress website. 

With Premium, you can back up all files from your WordPress install. This includes files you’ve added in a non-standard way, and you can even backup directories from your web server that aren’t even part of WordPress. 

All in all, you can take backups of the following: 

  • Any modifications you’ve made to the WordPress core. 
  • New files uploaded to WordPress using non-standard mechanisms. 
  • Other resources (or even sub-sites) in the same folder as WordPress.
  • Files from other directories on your server
  • Your wp-config.php file, which allows you to avoid re-entering database settings and other customisations upon restoring.
  • You can also browse your backups and download individual files from them from within your WordPress dashboard.

Backup your WordPress database with UpdraftPlus

That’s it, you now have a secure backup of your WordPress database with UpdraftPlus

With this up and running, you’ll be able to create secure backups of crucial data and broader site settings governing your plugins, theme, and user accounts. 

Whether your hosting company folds or you’ve performed an update that has ruined your website’s functionality, with UpdraftPlus, you can rest assured that your WordPress website is only a click away from being restored.

With UpdraftPlus Premium, you can go one step further. You can take advantage of the included add-ons to:

  • Schedule your backups at specific times of the day to avoid high-traffic periods.
  • Spread your storage files across multiple locations for enhanced security.
  • Receive detailed reports of your backups.
  • Limitless backups of all files, including those not contained within WordPress.
  • Multi-site network compatibility.
  • Free, rapid-response support from technical experts.

The post How to backup your WordPress database in 2020 appeared first on UpdraftPlus. UpdraftPlus – Backup, restore and migration plugin for WordPress.

UpdraftPlus 1.16.30 Update Released

The latest updates for UpdraftPlus 1.16.30 update has now been released. This latest version has various performance tweaks and bug fixes to make UpdraftPlus backups better than ever.

One of the main performance improvements for the latest update is for websites/hosts. Where mysqldump is disabled, UpdraftPlus will now extract database data via the primary key (where one is available). This improvement results in a substantial performance increase when fetching large tables using PHP.

We have also undertaken various fixes when importing settings into UpdraftPlus. These include the fixing of an issue that caused all database tables that were not selected, to be backed up in a “Backup Now” backup during a resumption. Additionally some under the hood improvements have been implemented to allow faster booting of UpdraftClones in the future.

The change-log for the latest update is as follows:

  • PERFORMANCE: Where a table has a numerical primary key, extract its data using that index. This results in a substantial performance increase when fetching large tables using PHP. (The filter updraftplus_can_use_primary_key_default can be used to de-activate this behaviour)
  • FIX: Remove incorrect decodeURIComponent() parsing when importing settings, which could prevent import of settings containing some special characters
  • FIX: An issue where database tables that were not selected to be backed up in a “Backup Now” backup would get added to the backup during a resumption (i.e. if it did not finish in a single run)
  • TWEAK: Catch errors from Google Cloud when the bucket is not found
  • TWEAK: Fix undefined variables instead of expected values in message prior to settings import
  • TWEAK: Strip the redundant WHERE for the –where parameter to mysqldump (which modern versions strip out, but a version was found that didn’t)
  • TWEAK: Handle hosts that have disabled the session_id() function
  • TWEAK: Provide SQL mode information in the ‘Site Information’ section under the ‘Advanced Tools’ tab and in the database backup’s header
  • TWEAK: Show a notification of UpdraftPlus plugin updates even if the associated user account is not connected to the UpdraftPlus website
  • TWEAK: Add mechanism to detect what hosting provider is being used and use it to make UpdraftPlus comply with Kinsta’s backup limit policies (thus removing it from the list of disallowed plugins)
  • TWEAK: When booting a clone if it’s claimed from the clone queue then update the token being used
  • TWEAK: Tweaked downwards the minimum time in the future for rescheduling a resumption

The post UpdraftPlus 1.16.30 Update Released appeared first on UpdraftPlus. UpdraftPlus – Backup, restore and migration plugin for WordPress.

How to add BackBlaze to your UpdraftPlus account settings

UpdraftPlus has lots of options when it comes to backing up to a remote storage location.We recently updated the instructional videos for several of the most popular remote storage options, including Azure, RackSpace, Amazon S3, DropBox, Microsoft OneDrive and Microsoft Cloud.    

Our newest instructional update video is for the BackBlaze remote storage option. You can open a free BackBlaze account today and receive 10GB of free storage. Just watch the short video below for all the information you need on connecting your accounts. 

Written instructions on how to add BackBlaze to your UpdraftPlus backup account can also be found here.

The post How to add BackBlaze to your UpdraftPlus account settings appeared first on UpdraftPlus. UpdraftPlus – Backup, restore and migration plugin for WordPress.

Setup Bedrock for WordPress Development on Windows OS

As an experienced PHP Developer, I have more often or not used WordPress when working on my web projects. Like many other developers, I have started to lose the same level of excitement I used to have when working within its rigid structure, as I found it has restricted form and limited functionality over time.

Recently however, I found a WordPress boilerplate called ‘Bedrock’ – which was created by the guys from Roots that pleasantly surprised me. It works by allowing the user to leverage a modern day development workflow that can help speed up your development process.

In this blog, we will go through the steps to set-up Bedrock for WordPress development. Throughout this tutorial, I will be using and referring to the Windows OS only. When working on other operating systems, the steps to set-up the document root will differ slightly, but everything else should be broadly similar.

Installation of Bedrock
Using a Windows computer with XAMPP already set-up, install Bedrock to begin setting up the WordPress boilerplate for development. We’ll use Composer to create our project, so make sure it is installed on your system before proceeding.

To create the project using Composer, head over to your htdocs directory from the command line and run the following command:

composer create-project roots/bedrock

This command creates a bedrock folder inside the htdocs. You can also pass the directory name as follows:

composer create-project roots/bedrock DIRECTORY_NAME

If you jump into your project directory, you will notice a few files such as;
.env, composer.json have been created. There is also a pre-filled .gitignore file with all rules defined already in it.

Next, go to the project directory in the terminal window/command line and install the dependencies using the command:

composer install

This installs all the dependencies required for the development and adds them inside the vendor folder created on your project’s file system.

We are now done with the installation, so let’s go ahead and configure Bedrock.

Bedrock setup and configuration

Start with the document root set-up on your OS for the Bedrock project.

Open xamppapacheconfextrahttpd-vhosts.conf in your text editor to configure the virtual hosts.

Add the following to the end of the file.

[php]
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/bedrock/web"
ServerName bedrock.local
</VirtualHost>
[/php]

Here I have entered the directory path of the project – i.e. “D:/xampp/htdocs/bedrock/web” You can adjust this path as per your XAMPP setup.

Next, we need to make a small change to the Windows system file.
Open C:WindowsSystem32driversetchosts in the Notepad application.

Be sure you have opened the Notepad application with administrator access to make this change. To do this, Right-click on the App icon > Run as administrator.

Add the following lines to the end of the file.

[php]
127.0.0.1 localhost
127.0.0.1 bedrock.local
[/php]

Note that I passed ‘bedrock.local’ as the local IP address with the same string (‘bedrock.local’) added in the ‘httpd-vhosts.conf’ file and it is mapped to my project directory path. If I now run bedrock.local on the browser it will point to the project directory that is associated with the above steps.

The final step in our setup is to create an empty database for our website and add its credentials in the .env file.
You can find this file in the root directory of the project.
Open the .env and add the DB Credentials as constants.

DB_NAME=bedrock
DB_USER=ADD_DB_USERNAME
DB_PASSWORD=ADD_DB_PASSWORD

Also, add the WP_HOME URL & the salt key (You can generate a salt key at https://roots.io/salts.html)

[php]
WP_HOME=http://bedrock.local
[/php]

Keep the rest of the document as is, save and close the file.

Restart the Apache server and go to the URL: http://bedrock.local in your browser. It should redirect you to the famous 5-minute WordPress installation.

How to use Bedrock for WordPress development

We have so far learned how to install and set-up Bedrock, so let’s see how we can use Bedrock to develop a WordPress project.

In a default WordPress installation, the themes and plugins folder are found inside the ‘wp-content’ directory. With Bedrock, they are situated inside the ‘web/app’ folder. To set-up themes or plugins for Bedrock, add your theme(s) in ‘web/app/themes/’ and your plugins in the ‘web/app/plugins’ directory.

Using Composer, you can install the plugin as follows:

composer require wpackagist-plugin/updraftplus

Here ‘updraftplus’ is a slug of a plugin. This means you just need to use the ‘slug’ and Composer will install the plugin for you. There is no need to follow the manual process for installing plugins as you can search for the plugin packages on WordPress Packagist.

This concludes our quick tutorial on how to setup Bedrock – a very useful tool to manage your development. I recommend using it for all your upcoming WordPress developments.

Please share your thoughts or suggestions in the comment section below.

Sajid Sayyad

The post Setup Bedrock for WordPress Development on Windows OS appeared first on UpdraftPlus. UpdraftPlus – Backup, restore and migration plugin for WordPress.

How to add Microsoft Azure to your UpdraftPlus account settings

Backing up your website to the remote storage location of your choice is something UpdraftPlus have put a lot of time and effort into working on. We currently have a wide-range of supported remote storage options including Google Drive, Amazon S3 and DropBox.

Another remote storage option UpdraftPlus supports is Microsoft Azure. You can create a free Azure account for 12 months that offers users a wide choice of free Azure products and includes 5GB of LRS-Hot Blob Storage with 20,000 read and 10,000 write operations.

While connecting an Azure account may not be quite as simple as Google Drive, by following our easy to understand ‘step-by-step’ instructional video below, you can start backing up your website to Azure in next to no time. 

The post How to add Microsoft Azure to your UpdraftPlus account settings appeared first on UpdraftPlus. UpdraftPlus – Backup, restore and migration plugin for WordPress.