Arriera: Download Your Media Libraries from WordPress.com
Downloading my media libraries from WordPress.com blogs was practically impossible for me, so I wrote Arriera to make things easier. This post will show you how to install and use Arriera in Debian-based systems.

Figure 1. Screenshot of Arriera downloading a media library from a blog.
Arriera is a console application for Debian-based systems that allows you to download all your media files from WordPress.com blogs.
The Problem
WordPress.com allows you to export your blog to an XML file that, "contains information about your site's posts, pages, comments, categories, and other content." But there is no easy way to export the files in your media library to your computer, as you can see in the following support requests from WordPress.com users:
- July 22, 2009. I wan to backup my own media library, is there any way?
- March 13, 2011. Downloading all media from Media Library
- December 3, 2013. How can I export my media library?
A solution
Arriera takes WordPress.com XML export files and uses them to download all the files in the blog's media library, which otherwise would have to be downloaded manually, one by one, when backing-up your blogs.
Installation
Download Arriera and install it as you would install any Debian package. That is, double click on it or open a terminal and run the following command:
# gdebi arriera_x.y.z_all.deb
Usage
First of all, you need to export your blog. Save the resulting XML file anywhere you want in your computer.
Then, run the application to download your media library:
$ arriera -f /home/user/path/to/yourblog.wordpress.yyyy-mm-dd.xml
And that's it. All the downloaded files will be saved to a directory next to the blog's export file.
Options
To see all the download options provided by the application, run the following command:
$ arriera --help
- --type
You can use this option to limit the type of media files that will be downloaded. To use it, pass to it a comma-separated list of file extensions. For example:
$ arriera --type png,odt,ogv -f /home/user/yourblog.wordpress.yyyy-mm-dd.xml
Running the command above will download only PNG images, ODT documents, and OGV videos.
- --subdirs and --no-subdirs
If you want the files to be saved in year/month subdirectories, use the --subdirs option like this:
$ arriera --subdirs -f /home/user/yourblog.wordpress.yyyy-mm-dd.xml
This way, the files will be saved in a directory structure like this:
myblog-media-backup/ |-- 2013 | |-- 05 | | `-- a-dog-jumping.png | `-- 11 | `-- submarino.ogg `-- 2014 |-- 03 | `-- blue-sky.jpg `-- 07 `-- tutorial.odt
The --no-subdirs option is activated by default when you run the application providing the --file argument only. When this option is used, the download directory will have a structure similar to the one bellow:
myblog-media-backup/ |-- 2013-05-a-dog-jumping.png |-- 2013-11-submarino.ogg |-- 2014-03-blue-sky.jpg `-- 2014-07-tutorial.odt
All media files will be stored in a single directory, and file names will have year and month of publication prefixed.
The End.
Related topics: