Last updated on Januar 29, 2024

As a precaution for crashes of my hosted, managed WordPress installation or me accidentally destroying my content, I frequently export all content to an XML file (5MB) via Tools > Export. I had doubts about being able to restore my content from such a small export file. To avoid risking destroying my life WordPress site, with a test restore, I successfully restored an export file into a local WordPress test installation.

Content

Here are my steps to import and view the exported content in a local WordPress installation. I used an effortless WordPress install, without having to manually install a database system or web sever. This even worked in a Windows Sandbox on my Windows on ARM PC.
I used Windows Sandbox to avoid polluting my Windows Installation with a complex tool and its components. The performance was surprisingly good.

The site Installing WordPress on your own Computer – Documentation has links to some WP installers. I used the free, one-click WordPress installer
Local – Local WordPress development made simple (localwp.com)

Install WordPress

Takes 6 mins only!

  • Start Windows Sandbox
  • Download Windows installer from localwp.com
  • Run installer
  • Run local
  • Ignore missing Microsoft Visual C++ 2015-2019 Redistributable
  • The installer seems to hang but finally completes
  • The localwp UI shows:
  • Clicking „Open Site“ the browser cannot reach the WP site
  • Change „router mode“ to „local host“
    via hamburger menu > Preferences > Advanced > Router Mode
  • After closing the Advanced menu, an error with a „Fix“ option appears
  • „Fix“ changes the site domain. The Fix error shortly appears again.
  • But now my WordPress test site opens
  • Click WP admin and log in

Import my WP Content

  • Install WP importer
    via Tools > Import
  • Copy WP export file to Sandbox
  • Run Importer
    Seemed to do nothing, but after a while completed successfully.

Most of my posts and pages were imported and visible with correct formatting, including pictures. Even my embedded Excel worksheets showed up fine.

My photo gallery, created via Photo Gallery by 10Web – Mobile-Friendly Image Gallery – WordPress plugin | WordPress.org, was not available as it was not exported by the WP exporter. I sporadically create a backup (3.5 GB) of the photos via FTP using FileZilla.
Some links lead to posts on my online Website, but opening these posts via WP > All Posts works fine.

Thus, I have verified a way to restore my content from a WP export.