Skip to main content

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

  1. Update the version number in pyproject.toml
  2. Commit your changes
  3. Create and push a new tag:
    git tag v0.1.1
    git push origin v0.1.1
    
  4. Create a new release on GitHub using this tag
  5. The GitHub Action will automatically build and publish to PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail_wordpress_image_importer-0.1.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file wagtail_wordpress_image_importer-0.1.1.tar.gz.

File metadata

File hashes

Hashes for wagtail_wordpress_image_importer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 43a6ca84da34d1030dfb81ef357f9baed2cca3fd331fcbf83718c098e3fc9634
MD5 466a1da851b64e21f6973eb90123ffcc
BLAKE2b-256 d9ee3ee3de9411d8ab5a630031587393884c23bf7c7b6c1ee53243f20e2161a6

See more details on using hashes here.

File details

Details for the file wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_wordpress_image_importer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 927a60f9a3fb1e2a339e67745b990c8a1525d0b9f97fad98e59b9848ec48610d
MD5 23848739f09a16d7d02bc1ae2778faf4
BLAKE2b-256 28072bd1ee0112966b5b2b0c1683ec8827e16dccd80c1f13e67c1d1eac50bd5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page