Wagtail WordPress Image Importer
A Django management command to import images from a WordPress XML export into Wagtail.
Installation
pip install wagtail-wordpress-image-importer
Configuration
Add to your INSTALLED_APPS in Django settings:
INSTALLED_APPS = [
...
'wagtail_wordpress_image_importer',
...
]
Usage
Export your WordPress content as XML from WordPress admin (Tools > Export).
Then run:
python manage.py import_wordpress_images /path/to/your/wordpress-export.xml
Options
--debug: Show detailed debug information during import--collection: Import images into specified collection--delete-existing: Delete all existing Wagtail images before importing (for specified collection, if provided)
License
MIT License
Development
Local development
# Clone the repository
git clone git@github.com:tomdyson/wagtail-wordpress-image-importer.git
cd wagtail-wordpress-image-importer
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
# Install dependencies
pip install -e .
Releasing a new version
- Update the version number in
pyproject.toml - Commit your changes
- Create and push a new tag:
git tag v0.1.1 git push origin v0.1.1
- Create a new release on GitHub using this tag
- The GitHub Action will automatically build and publish to PyPI
Release files for wagtail-wordpress-image-importer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wagtail_wordpress_image_importer-0.1.1.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / wagtail_wordpress_image_importer-0.1.1.tar.gz
| Download URL | wagtail_wordpress_image_importer-0.1.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43a6ca84da34d1030dfb81ef357f9baed2cca3fd331fcbf83718c098e3fc9634
|
|
BLAKE2b-256 checksum How to use checksums |
d9ee3ee3de9411d8ab5a630031587393884c23bf7c7b6c1ee53243f20e2161a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl
| Download URL | wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
927a60f9a3fb1e2a339e67745b990c8a1525d0b9f97fad98e59b9848ec48610d
|
|
BLAKE2b-256 checksum How to use checksums |
28072bd1ee0112966b5b2b0c1683ec8827e16dccd80c1f13e67c1d1eac50bd5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|