PHPackages                             pragmaticweb/pragmatic-drupal7-importer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pragmaticweb/pragmatic-drupal7-importer

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

pragmaticweb/pragmatic-drupal7-importer
=======================================

Developer framework for importing data from Drupal 7 into WordPress.

v0.1.1(5y ago)1831GPL-3.0-onlyPHPPHP &gt;=7.3CI failing

Since Feb 17Pushed 5y ago6 watchersCompare

[ Source](https://github.com/PragmaticWebLimited/pragmatic-drupal7-importer)[ Packagist](https://packagist.org/packages/pragmaticweb/pragmatic-drupal7-importer)[ Docs](https://pragmatic.agency/)[ RSS](/packages/pragmaticweb-pragmatic-drupal7-importer/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (7)Versions (3)Used By (0)

Drupal 7 Importer
=================

[](#drupal-7-importer)

**A project by [Pragmatic](https://pragmatic.agency).**

 [![Version 0.1.0-dev](https://camo.githubusercontent.com/34816c996d49c7e5d0852adf2943abd44371f98a115792fc7514b77febacd76e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e302d2d6465762d626c75652e7376673f63616368655365636f6e64733d3836343030)](https://camo.githubusercontent.com/34816c996d49c7e5d0852adf2943abd44371f98a115792fc7514b77febacd76e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e302d2d6465762d626c75652e7376673f63616368655365636f6e64733d3836343030) [![License: GPL 3.0 only](https://camo.githubusercontent.com/bd970efd5735cd2f7e43bcd74808d443968ee7256f1ce21fc1d46ed67b8c9950/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d332e302d2d6f6e6c792d79656c6c6f772e737667)](https://camo.githubusercontent.com/bd970efd5735cd2f7e43bcd74808d443968ee7256f1ce21fc1d46ed67b8c9950/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d332e302d2d6f6e6c792d79656c6c6f772e737667)

> Developer framework for importing data from Drupal 7 into WordPress.

---

- [Requirements](#requirements)
- [Installation](#installation)
- [Development Process](#development-process)

---

Requirements
------------

[](#requirements)

### Usage Requirements

[](#usage-requirements)

Ensure you have the prerequisite software installed:

- [Composer](https://getcomposer.org/) 1.8+, installed globally.
- [PHP](https://php.net/) 7.3+.

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

[](#installation)

1. Add this plugin to your project with Composer: `composer require pragmaticweb/pragmatic-drupal7-importer`.
2. Activate the plugin as usual, and use it via WP-CLI.

The plugin assumes a database called `wordpress_test` exists and is accessible using the credentials in your WordPress' `wp-config.php` file. If you will be working on PHPUnit tests, you will need to manually make sure the database exists.

Use the filter `pragmatic.drupal7_importer.map_drupal_roles_to_wp.roles_mapping` to map how Drupal user roles map to WordPress user roles.

Development Process
-------------------

[](#development-process)

### Contributions

[](#contributions)

This plugin mostly follows the standard [Git Flow](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) model.

Development happens in feature branches, which are merged into `develop`, and then eventually merged into `master` for deployment to production. When making changes, a feature branch should be created that branches from `develop` (and the corresponding pull request should use `develop` as the target branch).

#### Philosophy

[](#philosophy)

PHP files should either declare symbols (classes, functions, etc) or run code (function calls, etc), but not both. Generally speaking, only one file per plugin should run code.

An exception is allowed for require statements only if there isn't a better way to include those files. As an example, a namespace file may require the namespace file for sub-namespaces, since PHP doesn't have a way to autoload namespaced functions.

For namespaced functions which are primarily action and filter callbacks, the `add_action/filter` calls should generally live in a `bootstrap()` function in the namespace. This allows the file to be loaded without adding hooks immediately, but still allows the hook declarations to live with the callbacks.

As an example, for a plugin called "pragmatic-coffee" with a namespace of `Pragmatic\Coffee`, the directory structure should look like this:

- plugin.php – Declares autoloader and runs bootstrap functions.
- inc/ – Contains PHP code for `Pragmatic\Coffee` namespace.
    - functions.php – Declares functions and constants in the `Pragmatic\Coffee` namespace.
    - class-cup.php – Declares the `Pragmatic\Coffee\Cup` class.
    - beans.php – Declares functions and constants in the `Pragmatic\Coffee\Beans` namespace. (Good approach for simpler plugins)
- sweeteners/ – Contains sub-namespace `Pragmatic\Coffee\Sweeteners`. (Good approach for larger plugins)
    - functions.php – Declares functions and constants in the `Pragmatic\Coffee\Sweeteners` namespace.
    - class-sugar.php – Declares the `Pragmatic\Coffee\Sweeteners\Sugar` class.

### Plugin Structure

[](#plugin-structure)

This plugin maintains a basic file structure. The key areas are:

- `plugin.php` – The main plugin loader.
- `inc/` – PHP.
- `tests/` – Test files.

Within the `inc/` directory, files should be organised hierarchically based on namespaces. If a namespace only contains functions, the filename should be `functions.php`.

If a namespace also contains classes, group those classes together with the namespace file in a `{sub-namespace}/` directory. The main functions file for this namespace would be`{sub-namespace}/functions.php`, while classes should be in a file prefixed with `class-` with a "slugified" class name.

### Scripts and Tooling

[](#scripts-and-tooling)

- `composer run tests` -- run all of the following tasks:
    - `composer run test:phpunit` -- run PHPUnit tests.
- `composer run lint` -- crun all of the following tasks:
    - `composer run lint:phpcs` -- check PHP quality with a PHP linter and, PHPCS.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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 ~160 days

Total

2

Last Release

2115d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1393b89707c4c14b7eeb67e5d2528b1bcc2862dfa44d9e233fb81ee7cf1d74a4?d=identicon)[paulgibbs](/maintainers/paulgibbs)

![](https://www.gravatar.com/avatar/c57c0562afd756fb924232057012d3bdd3d61cd4703100fd0981141f73a5fdab?d=identicon)[theskinnyghost](/maintainers/theskinnyghost)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pragmaticweb-pragmatic-drupal7-importer/health.svg)

```
[![Health](https://phpackages.com/badges/pragmaticweb-pragmatic-drupal7-importer/health.svg)](https://phpackages.com/packages/pragmaticweb-pragmatic-drupal7-importer)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

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