Read all of the other posts in our series on Creating Azure (hosted) WordPress Websites without knowing php or MySql!

Another level of assuring data safety (WP Pages, Posts, etc.) besides full website backups to Azure Backup and Recovery Web App Servicesince a website can always be rebuilt, but losing data is not an option – is to export a latest copy of the website contents to a ‘safe place’. If necessary, the website WP infrastructure could always be reproduced and the saved website contents imported back in.

The exported copy of the website contents (Posts, Pages, Layouts, Media, etc) can be easily imported into the newly built website. That is, it can be easily imported, as long as the xml file created by the Export Tool is less than 8MG. Even our largest website with over 700 pages, is less than 6 MG, since we do not store media or documents within the website, but use only hyperlinks to an Azure Storage Blob containing the images, documents etc. (Learn about setting up Azure Blob Storage for media & documents in an Azure hosted WP site.)

To Export WP Contents > Dashboard > Tools > Export > All Contents > Download Export File:

While it is possible to export only individual elements of the website, such as all the Posts, or all the Pages – we use this to keep current exported copies of all content, so that in the event that a Restore process fails from a saved backup, the WP website structure could be rebuilt, and then all of the exported content data could be easily imported.

(In fact, one of our redundant DR options, is to keep a copy of the completed WP site structure, fully updated with all WP core and required plugins, WITHOUT any Contents, so that in the event of a Restore Failure, we can import the latest xml File Contents quickly change the DNS of the reserve website. Less than 5 minutes downtime once the whole DR process starts. Then we do an internal link check using a temporarily installed plugin Velvet Blues Update URLs which completes the check and renaming in less than 3 minutes from our testing of over 1500 links being changed – the website is again active within 5 minutes of discovering the error.)

We save a local copy and then for redundancy, drag and drop a copy of the Contents Exported xml file into a folder of the same Azure Storage Account that the websites backups are kept.

We use Microsoft’s Azure Storage Explorer (MASE) installed locally, to be able to easily drag and drop local files up to the Azure Storage Account:

To import the saved Contents file into a website:

  1. Install the WordPress Importer:

Admin Dashboard > Tools > Import > select WordPress system > Install Now > Run Importer

On the Import WordPress page: Choose a file from local computer > Upload File and import:

For this example, we have selected an 5MG xml file from a website with Exported Contents that has 635 Pages and 4 Posts. Following with the Assign Authors suggestion for ease of editing and saving the imported content, we will assign the imported items to an existing user of this site. We will also choose to Import Attachments:

The resulting import operation shows 636 Pages and 4 Posts (635 added to the 1 existing page) and the process took less than 3 minutes to complete:

Read all of the other posts in our series on Creating Azure (hosted) WordPress Websites without knowing php or MySql!