Import WordPress images into Wagtail
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_wordpress_image_importer-0.1.1.tar.gz.
File metadata
- Download URL: wagtail_wordpress_image_importer-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43a6ca84da34d1030dfb81ef357f9baed2cca3fd331fcbf83718c098e3fc9634
|
|
| MD5 |
466a1da851b64e21f6973eb90123ffcc
|
|
| BLAKE2b-256 |
d9ee3ee3de9411d8ab5a630031587393884c23bf7c7b6c1ee53243f20e2161a6
|
File details
Details for the file wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
927a60f9a3fb1e2a339e67745b990c8a1525d0b9f97fad98e59b9848ec48610d
|
|
| MD5 |
23848739f09a16d7d02bc1ae2778faf4
|
|
| BLAKE2b-256 |
28072bd1ee0112966b5b2b0c1683ec8827e16dccd80c1f13e67c1d1eac50bd5a
|