Importing the Sample Content
What you need before starting
| Requirement | Why |
|---|---|
| Fresh WordPress (installation wizard just finished) | The importer creates content; it cannot replace or merge it |
| Admin access | Importing, menus, front page and permalinks are all admin tasks |
| Theme Blogtail General active | The sample is meant to be viewed with this theme |
| WindPress plugin active (Tailwind CSS v4 mode) | Without it the sample renders unstyled |
| The sample file | Not attached yet — its name/location will be filled in once provided |
| A database backup | The importer has no undo |
Step 1 — Prepare the empty install
Take a backup first
docker exec wordpress_db sh -c \
'mariadb-dump -u root -p"$MYSQL_ROOT_PASSWORD" --single-transaction --databases wordpress' \
> ~/wordpress-before-sample-$(date +%F).sqlRemove the default content
A fresh install ships one post (Hello world!), one page (Sample Page) and a privacy policy draft. Delete them so the sample is the only content on the site.
Activate the theme and the plugin
Appearance → Themes → Blogtail General; Plugins → ensure WindPress is active in Tailwind CSS v4 mode.
Step 2 — Import the sample
Open the importer
Tools → Import → WordPress → Install Now (installs the wordpress-importer
plugin) → Run Importer.
Upload the sample file
Choose the sample file (WordPress export format, .xml) → Upload file and import.
If the sample ships as a ZIP, extract it first and upload the .xml inside.
Assign an author
Only content is imported — users are not. Either pick an existing admin under Assign posts to an existing user, or create an author user first and pick that one.
Import the attachments
Tick Download and import file attachments if the sample references images; they are
fetched into wp-content/uploads/. If the sample bundles the images locally, upload them
afterwards through Media → Add New.
Run the import
Click Submit and wait — the importer processes items one by one and normally reports which item failed, if any.
Step 3 — Finish the setup (not part of the file)
Set the front page
Settings → Reading → Your homepage displays → A static page → pick the sample’s home page, plus a posts page if the sample provides one.
Assign the menu
Appearance → Menus (or Appearance → Customize → Menus) → select the menu the import brought in → tick the theme’s menu location → Save.
Check widgets
Appearance → Widgets: this theme registers no widget areas — the sidebar in a single
post is rendered by the theme’s own template (sidebar-single.php).
Flush permalinks
Settings → Permalinks → Post name → Save Changes, so the imported posts resolve instead of returning 404.
| Verify | Expected |
|---|---|
| Home | Hero plus the “Latest Articles” card grid |
| Single post | Breadcrumb, category badge, meta row, sidebar, author box, Related Posts |
| Archives / search | Archive header + the same card grid |
| Media | Images under wp-content/uploads/<year>/<month>/ |
How it works (so you understand what the importer does)
The sample is a WXR file — WordPress eXtended RSS — the XML produced by Tools → Export. Knowing what is and is not inside it explains both the “new WordPress only” rule and why a few steps stay manual.
| In the WXR file | Not in the WXR file |
|---|---|
| Posts, pages, custom post types | Users (only author names, as strings) |
| Categories, tags, terms | Theme settings and Customizer values |
| Comments | Widgets and their assignments |
nav_menu terms and menu items | Menu locations (theme-specific) |
Attachment records + wp:attachment_url | The image files themselves, unless reachable at that URL |
Post meta, incl. _thumbnail_id | Plugin settings (including WindPress) |
What actually happens during the import:
- Parse & create. Each
<item>becomes a new post with a new ID. Items are matched against existing content by GUID: if a post with the same GUID already exists the item is skipped — nothing is ever updated. - Terms. Categories, tags and nav-menu terms are created, and the post↔term relationships are restored from the file.
- Attachments. With Download and import file attachments enabled, each media URL is
fetched and stored as an attachment. Files land in
wp-content/uploads/<year>/<month>/, and the importer does not de-duplicate — import twice and you have two copies. - Thumbnails. Featured images are post meta pointing at an attachment ID; if the attachment did not import, the post shows up without a thumbnail.
- Menus. Menu items are imported as content, but which menu shows in which location
is the theme’s
nav_menu_locationsoption and is never imported — you assign it. - Everything else stays untouched. Front page / posts page (
page_on_front,page_for_posts), permalink structure, WindPress settings and plugin options live in the database’s options table, not in the file.
Bootstrap alternative: snapshot after the import
Once the sample looks right, capture it so new environments don’t repeat the import:
# database
docker exec wordpress_db sh -c \
'mariadb-dump -u root -p"$MYSQL_ROOT_PASSWORD" --single-transaction --databases wordpress' \
> ~/wordpress-with-sample-$(date +%F).sql
# uploaded media (host path on this server)
tar -czf ~/wordpress-uploads-$(date +%F).tar.gz \
-C /home/www/project/wordpress/web/web/wp-content uploadsRestoring that dump plus the uploads folder on a fresh stack reproduces the sample
without running the importer again — the fastest way to get identical environments.
If something goes wrong
| Symptom | Cause / fix |
|---|---|
| Everything exists twice | The site was not empty → restore the backup, then re-import on a clean install |
| Posts return 404 after import | Settings → Permalinks → Post name → Save Changes |
| Home page shows the blog listing | Settings → Reading → set the static front page |
| No menu in the header | Assign the imported menu to the theme’s menu location |
| Images missing | Attachments were not imported (URL unreachable, or the checkbox was off) → upload via Media |
| Sample looks unstyled | WindPress inactive, or not in Tailwind CSS v4 mode |
Reference (this server)
| Item | Value |
|---|---|
| WordPress root | /home/www/project/wordpress/web/web |
| Themes | .../wp-content/themes/ (Blogtail General 1.0.4 installed) |
| Uploads | .../wp-content/uploads/ (currently 2026/ and windpress/) |
| Database container | wordpress_db (MariaDB; dump with the MYSQL_ROOT_PASSWORD env) |
| WP-CLI | not available in the wordpress_php container → use wp-admin |
Not documented yet
- The sample file itself: name, format (single
.xmlor ZIP), where it lives, and how it is distributed (release asset, repository asset, or attached to this page). - What the sample contains: number of posts/pages/categories, whether menus and images are included, and which page should become the front page.
- Whether a dedicated author user should be created for the sample content.
- Whether the sample expects the theme’s options (logo, colours) to be set manually.