Blog

Moving a WordPress content site to Pushword

Pushword is an open-source WordPress alternative for editorial sites whose layouts a developer maintains. Editors work in a browser. With Flat enabled, the same pages sync between the database and Markdown files, so your team can review content changes in Git.

Try one real article before you plan the whole move. Convert its WordPress export to Markdown and open the result on staging. Then check whether the old link still takes readers to the article.

What editors and developers would change

TaskWordPressPushword
Update a paragraphEdit a block in the browser. WordPress stores the serialized blocks in the post.Edit Markdown in the admin or use the Editor.js block editor. Both save Markdown.
Review edits in GitTrack theme and plugin code in Git. For page content, use revisions in WordPress or add an export workflow.Sync pages to files with Flat. Review a diff in Git or use the Version extension for revisions in the admin.
Change a page layoutUse the Site Editor on a block theme or work in the theme’s code.A developer edits Twig. Editors work with the content and any fields or blocks the project provides.
Reuse plugin behaviorKeep the installed plugin and its configuration.Map the content to fields or snippets. Rebuild any behavior the site still needs.

WordPress block serialization and the Site Editor explain what sits behind the WordPress editor. See Pushword’s block editor, version history and theme guide for the corresponding workflows.

Stay with WordPress if editors depend on the Site Editor to change the design without a developer, or if a plugin runs an essential part of the business. For example, a WooCommerce product export can give you a catalogue. It leaves you with checkout, payments and order history to account for. Pushword ships the publishing workflow in this article. A shop needs its own migration plan. WooCommerce migration documentation

Rehearse the move with one post

Start on a fresh Pushword install with Flat enabled. Pick a published post with a meaningful old URL. Include a post with a plugin block in your next batch so you can price the manual work before scheduling the cutover.

Export the post and collect its files

Download a WXR file from Tools > Export in WordPress. With WP-CLI you can also run wp export --stdout > site.xml. WXR includes attachment records. Download the actual media from the original site or its storage separately. Record the public URL alongside the post ID. Use the URL that readers and search engines see, including the path set by your permalink rules. WXR export · WordPress permalink settings

In the example, post 42 is titled Field notes and lives at /2024/03/field-notes/. It links to the visitor guide and shows a photo named trail.jpg. The WXR item carries the HTML in content:encoded. Extract it with Python and convert it with Pandoc. Change the ID to match the post in your export.

python3 - site.xml 42 > field-notes.html <<'PY'
import sys
import xml.etree.ElementTree as ET

namespaces = {
    "wp": "http://wordpress.org/export/1.2/",
    "content": "http://purl.org/rss/1.0/modules/content/",
}
items = ET.parse(sys.argv[1]).findall("./channel/item")
item = next(entry for entry in items
            if entry.findtext("wp:post_id", namespaces=namespaces) == sys.argv[2])
print(item.findtext("content:encoded", namespaces=namespaces), end="")
PY
pandoc --from=html --to=gfm --wrap=none field-notes.html > field-notes.md

In this rehearsal, Pandoc converted the paragraph and link and left the image’s WordPress figure as HTML. Replace it with a Markdown image and a local media path. Inspect the rest of the output for block comments, plugin shortcodes and references back to the old host.

Write the destination file

Save this draft of the conversion as news/field-notes.md in the destination host’s Flat content directory. The path gives the page its slug. Copy trail.jpg under that content directory’s media/ folder for the import. Add the visitor guide as visit.md in the same content directory.

---
title: Field notes
h1: Field notes
publishedAt: '2024-03-08 09:00-05:00'
redirectFrom:
  2024/03/field-notes: 301
---

The north trail reopens in April. Read the [visitor guide](/visit).

![Trail marker at the north gate](/media/trail.jpg)

Write the time from wp:post_date_gmt with +00:00, or pair the local time with its historical offset as above. Map a WordPress draft to publishedAt: draft. If you can keep a public path, put the Markdown file at that path. Use redirectFrom when you need to move the page. A different domain needs redirects on the old host. Flat import and redirects

Check what the destination serves

Run these commands on the staging install. Replace staging.example with its configured host. A full Flat import can delete destination pages absent from the content files, so use a fresh staging host for this sample.

php bin/console pw:flat:lint staging.example
php bin/console pw:flat:sync staging.example --mode=import
curl -sS -o /dev/null -w '%{http_code} %{redirect_url}\n' \
  https://staging.example/2024/03/field-notes/
curl -fsS https://staging.example/news/field-notes
php bin/console pw:page-scan staging.example --skip-external

The sample imported two pages and one image in a fresh test database. The old path returned 301 to /news/field-notes. The new page linked to the visitor guide and kept the image’s alt text. Both the visitor guide and the image returned 200. Repeat the redirect check against the public server after the switch, especially if you deploy a static export. Page Scanner

Inventory the pieces that need a separate move

The example converts a small slice of WXR. Pushword’s shipped import reads Markdown and its metadata. Plan a separate mapping for WordPress records.

Inventory itemDecision to make before importing
Gutenberg blocks and shortcodesParagraphs and ordinary links can convert to Markdown. A dynamic block can store only its attributes in WordPress. Rebuild it as a component, capture its rendered output as a fixed snapshot, or retire it.
Layout and custom fieldsChoose a Twig layout and rebuild navigation from the intended destinations. Map each ACF field your templates use to a declared Pushword property.
Media and linksKeep a map of old upload URLs to imported files. Use distinct filenames where uploads in different folders share a name. Remap featured images separately from images in body content.
Search metadata and bylinesMap the bylines and search titles you want to keep. Move meta descriptions to searchExcerpt and check the rendered canonical URLs.
Forms and other plugin behaviorRebuild the forms your site still uses. Submit one of each on staging and check that it reaches the intended mailbox or service.

Dynamic WordPress blocks · Declared page properties

Count published items and drafts before and after each batch. Tally media separately. Check the URL list from the old site against the final server. An old URL should serve its retained page or redirect directly to its replacement. Review the converted Markdown and serve a staging preview before changing traffic.

If a dedicated WordPress importer is a deciding factor, start your evaluation with Statamic’s WordPress importer recommendation or Ghost’s migration tools. To see whether Pushword fits your team, install a test site and ask the person who owns publishing to edit the imported article. See the CMS comparison if you’re still choosing a platform.