PHPackages                             inspiredminds/contao-wordpressimport - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. inspiredminds/contao-wordpressimport

ActiveContao-bundle

inspiredminds/contao-wordpressimport
====================================

Contao 4 bundle that allows you to import news articles from WordPress posts via the WordPress JSON API.

2.2.1(1y ago)91.7k↓25%3LGPL-3.0-or-laterPHPPHP &gt;=7.1

Since Oct 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/inspiredminds/contao-wordpressimport)[ Packagist](https://packagist.org/packages/inspiredminds/contao-wordpressimport)[ Docs](https://github.com/inspiredminds/contao-wordpressimport)[ GitHub Sponsors](https://github.com/sponsors/fritzmg)[ RSS](/packages/inspiredminds-contao-wordpressimport/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (16)Used By (0)

[![](https://camo.githubusercontent.com/b446062f69ad9fabf306084a8d4bf3608eae53d7964a59a4b3a40ab54ef906dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e7370697265646d696e64732f636f6e74616f2d776f72647072657373696d706f72742e737667)](https://packagist.org/packages/inspiredminds/contao-wordpressimport)[![](https://camo.githubusercontent.com/b4ee6781bca1adbcc13025d38db69d45f1177ee85b0d1c00a73a7efca4a9f559/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e7370697265646d696e64732f636f6e74616f2d776f72647072657373696d706f72742e737667)](https://packagist.org/packages/inspiredminds/contao-wordpressimport)

Contao WordPress Import
=======================

[](#contao-wordpress-import)

Contao 4 extension that allows you to import news articles from WordPress posts via the WordPress JSON API.

Installation
------------

[](#installation)

Require the bundle via composer:

```
composer require inspiredminds/contao-wordpressimport

```

If you use the Contao Standard Edition, you will have to add

```
new WordPressImportBundle\WordPressImportBundle()
```

to your `AppKernel.php`.

Then execute the Contao Install Tool to update the database.

Usage
-----

[](#usage)

Once installed, you will have new options within a news archive:

[![Contao news archive settings](https://github.com/inspiredminds/contao-wordpressimport/raw/master/newsarchive-settings.png)](https://github.com/inspiredminds/contao-wordpressimport/raw/master/newsarchive-settings.png)

- **WordPress URL**: This is the URL to your remote WordPress installation, from which you want to import news. This WordPress installation must have the [WP REST API](http://v2.wp-api.org/) available. It's included and active by default in WordPress 4.7 and higher.
- **Import periodically**: Instead of importing the WordPress posts via console command (see below), you can activate a periodic import here, which will be done via Contao's cronjob.
- **Default author**: Every imported news item will have this author assigned, if no other author is available (see next option).
- **Import authors**: This will generate new backend users for each new found author. Existing authors are identified by their name, so if your Contao installation already has a backend user with the same name as an author from a WordPress post, that backend user will be used as the author. *Note:* the automatically generated authors are just bare entries. They will only have their name set. They will not have a username or password and they will be disabled by default.
- **Import comments**: This will import the comments of each WordPress post, if the Contao Comments Bundle is present. *Note:* the email field of each commenter will **not** be filled, since that is obviously not available via the public WP REST API.
- **Import folder**: When a WordPress posts gets imported, its teaser image and all images from its detailed content are saved to this folder.
- **Category**: This is an optional root category, under which every imported category of the WordPress posts will reside. If you do not specify a root category, the imported categories will be imported to the root. *Note:* this option will only be available, if you have the [`news_categories`](https://github.com/codefog/contao-news_categories) extension installed.

### Console Command

[](#console-command)

To import the WordPress posts into your Contao installation, you can use the following console command:

```
vendor/bin/contao-console wordpressimport

```

Optionally you can define the limit of how many WordPress posts are imported in one go:

```
vendor/bin/contao-console wordpressimport 10

```

This will only import 10 WordPress posts at a time.

Use `bin/console` in the Contao Standard Edition.

### Periodic import

[](#periodic-import)

If you activated the periodic import, the WordPress posts will be imported *hourly* by Contao's cronjob.

*Note:* by default only **10** items will be imported with each cronjob execution. The import can take a long time (depending on the number of WordPress posts and the number of images to be downloaded). This limit is there so that a cronjob execution does not block a user's request for a long time (or at least until the `max_execution_time` limit is hit) in case you are relying on the web cron. You can change this limit in the *System Settings*.

Events
------

[](#events)

Version `2.1.0` introduced an `WordPressImportBundle\Event\ImportWordPressPostEvent` which is fired for each imported WordPress post after it has been fully processed by the extension. It holds references to the used HTTP client instance, the WordPress post object and the `Contao\NewsModel` instance. This allows you to modify the imported news article.

Since version `2.2.0` there is also an `WordPressImportBundle\Event\ApiResponseBodyEvent` which is fired for each response of WordPress' REST API. This will let you fix invalid JSON output for example, before processing the response further (see [here](https://github.com/inspiredminds/contao-wordpressimport/pull/9)).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance46

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Recently: every ~241 days

Total

15

Last Release

404d ago

Major Versions

1.4.3 → 2.0.02022-08-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f6ec05570f72d0fcc4d0a4fef2309799d53badf8b30484284e73724661e0d8?d=identicon)[fritzmg](/maintainers/fritzmg)

---

Top Contributors

[![fritzmg](https://avatars.githubusercontent.com/u/4970961?v=4)](https://github.com/fritzmg "fritzmg (59 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (2 commits)")[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (1 commits)")

---

Tags

contaocontao-bundlewordpresswordpressimportcontao news

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/inspiredminds-contao-wordpressimport/health.svg)

```
[![Health](https://phpackages.com/badges/inspiredminds-contao-wordpressimport/health.svg)](https://phpackages.com/packages/inspiredminds-contao-wordpressimport)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
