PHPackages                             rarst/wprss2hugo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rarst/wprss2hugo

ActiveProject[API Development](/categories/api)

rarst/wprss2hugo
================

WordPress eXtended RSS to Hugo Import

0.2(6y ago)1081[3 issues](https://github.com/Rarst/wprss2hugo/issues)MITPHPPHP &gt;=7.3

Since Oct 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Rarst/wprss2hugo)[ Packagist](https://packagist.org/packages/rarst/wprss2hugo)[ RSS](/packages/rarst-wprss2hugo/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (3)Used By (0)

wprss2hugo — WordPress to Hugo importer
=======================================

[](#wprss2hugo--wordpress-to-hugo-importer)

*Go static. Hugo static.*

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fa23a0bde36dae752d45c59f37cd3846fb7c6a02700022664f8d4f6d5b5f48f2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f52617273742f7770727373326875676f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Rarst/wprss2hugo/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/f2c9cfa941494214db813b4593efbea790790e574ebe21c770d23e74680efc71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72617273742f7770727373326875676f2e7376673f6c6162656c3d76657273696f6e)](https://packagist.org/packages/rarst/wprss2hugo)[![PHP from Packagist](https://camo.githubusercontent.com/1d2704332f51f9789f1afb99e285f3a8f74b8f483aed0177284a002deffd60c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72617273742f7770727373326875676f2e737667)](https://packagist.org/packages/rarst/wprss2hugo)[![PDS Skeleton](https://camo.githubusercontent.com/a8ce1f2a7b71f101b18fc0393ba5bf89b7a5b1f9d08a31b658ca0eab0064c0f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e737667)](https://github.com/php-pds/skeleton)

wprss2hugo is an importer from the [WordPress](https://wordpress.org/) eXtended RSS export file format to the [Hugo](https://gohugo.io/) static site generator.

It aims to be comprehensive and reasonably flexible, but mostly to lower my hosting bill.

Install
-------

[](#install)

wprss2hugo is a command line PHP 7.3+ project and installs with [Composer](https://getcomposer.org/):

```
composer create-project rarst/wprss2hugo
```

Use
---

[](#use)

```
cd wprss2hugo
php bin/wprss2hugo.php example.WordPress.YYYY-MM-DD.xml
```

Results are generated in the `output` folder.

*Note:* WordPress might not store and export valid HTML paragraphs markup. You might want to add something like `add_filter( 'the_content_export', 'wpautop' );` to the WP installation before export.

### Command line arguments

[](#command-line-arguments)

```
php bin/wprss2hugo.php --help

Arguments:
  file                      Path to a WordPress export XML file.
Options:
      --content-type=       html|md [default: "html"]
      --front-matter-type=  yaml|toml|json [default: "yaml"]
      --data-type=          yaml|toml|json [default: "yaml"]
```

*Note:* conversion to Markdown for the post content is best effort and might be suboptimal on complex markup.

*Note:* TOML format is not meant for data, data files in TOML will have the data assigned to a dummy `data` root key.

Data map
--------

[](#data-map)

SourceDestinationsite title, URL, description`config.[data type]`posts, pages, attachments, custom post types`content/[post type]/[slug].[content type]`tags, categories, formats, terms`content/[taxonomy]/[term]/_index.[content type]`authors`content/authors/[login]/_index.[content type]` (taxonomy)comments`data/comments/[post ID].[data type]`Data retrieval
--------------

[](#data-retrieval)

### Attachments

[](#attachments)

Attachments are stored as `attachment` page type and can be retrieved by a parent post ID:

```
{{ $attachments := where (where .Site.Pages "Type" "attachment") "Params.parentid" .Params.id }}

{{ with $attachments }}
    Attachments
    {{ range . }}

    {{ end }}
{{ end }}
```

### Comments

[](#comments)

Comments are stored as data files and can be retrieved by a parent post ID:

```
{{ with .Site.Data.comments }}
    {{ with index . (string $.Page.Params.id) }}
        Comments

            {{ range sort . "id" }}
                {{ .author }} says: {{ .content | safeHTML }}
            {{ end }}

    {{ end }}
{{ end }}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

2392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/689ddc4f33541ac4a001d247e560f8805d219a95e7e42a16e0d22b9409f385cb?d=identicon)[Rarst](/maintainers/Rarst)

---

Top Contributors

[![Rarst](https://avatars.githubusercontent.com/u/737584?v=4)](https://github.com/Rarst "Rarst (7 commits)")

---

Tags

hugoimporterwordpress

### Embed Badge

![Health badge](/badges/rarst-wprss2hugo/health.svg)

```
[![Health](https://phpackages.com/badges/rarst-wprss2hugo/health.svg)](https://phpackages.com/packages/rarst-wprss2hugo)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[jane-php/jane-php

All jane libraries into one repository

678254.7k4](/packages/jane-php-jane-php)[code-lts/doctum

Doctum, a PHP API documentation generator. Fork of Sami

35077.9k31](/packages/code-lts-doctum)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4048.2k4](/packages/soneso-stellar-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
