PHPackages                             wikibase/import - 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. wikibase/import

ActiveMediawiki-extension[Utility &amp; Helpers](/categories/utility)

wikibase/import
===============

Import entities from another Wikibase instance (e.g. Wikidata)

0.1(10y ago)28318[22 issues](https://github.com/filbertkm/WikibaseImport/issues)[9 PRs](https://github.com/filbertkm/WikibaseImport/pulls)PHPPHP &gt;=5.5.0

Since Apr 8Pushed 5y ago4 watchersCompare

[ Source](https://github.com/filbertkm/WikibaseImport)[ Packagist](https://packagist.org/packages/wikibase/import)[ RSS](/packages/wikibase-import/feed)WikiDiscussions master Synced today

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

WikibaseImport
==============

[](#wikibaseimport)

[![Build Status](https://camo.githubusercontent.com/2edfc55ca5cfebb87d1d8d99d4a795a9c39c72b7131536d686c97109d1aec9ee/68747470733a2f2f7472617669732d63692e6f72672f66696c626572746b6d2f57696b6962617365496d706f72742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/filbertkm/WikibaseImport)

WikibaseImport is a MediaWiki extension that provides a maintenance script for importing entities from another Wikibase instance. (e.. Wikidata)

The script imports the specified entity or entities, including statements, sitelinks, labels, descriptions and aliases. The extension tracks the newly assigned entity id and the original id, so that any other entity that references can be linked appropriately.

The script also imports any referenced entities (e.g. properties, badge items, wikibase-item values) without the statements.

Install
-------

[](#install)

Clone `https://github.com/filbertkm/WikibaseImport.git` to the extensions folder of your MediaWiki instance.

Then go into the WikibaseImport extension directory and run `composer update`.

Then, to enable the extension, add it in your `LocalSettings.php` file:

```
wfLoadExtension( 'WikibaseImport' );

```

The extension requires a new database table to map entity ids from the foreign wiki to corresponding ids in the local wiki.

To add the table, run MediaWiki's `update.php` maintenance script.

Usage
-----

[](#usage)

First, navigate to *WikibaseImport* ’s extension folder.

Import a specific entity:

```
php maintenance/importEntities.php --entity Q147

```

Import a list of entities from a text file:

```
php maintenance/importEntities.php --file presidents.csv

```

You need to create the csv with a list of entity ids. For example, get a list of entity ids from a query (e.g. Wikidata sparql).

Import all properties:

```
php maintenance/importEntities.php --all-properties

```

Import Wikidata entities with specified property:entityId value pair:

```
php maintenance/importEntities.php --query P131:Q64

```

Import a range of entities:

```
php maintenance/importEntities.php --range Q1:Q20

```

Import a list of entities printed by another program:

```
printf 'Q%s\n' {1..20} {100..120} | php maintenance/importEntities.php --stdin

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

3738d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://avatars.githubusercontent.com/u/135401?v=4)[Katie Filbert](/maintainers/filbertkm)[@filbertkm](https://github.com/filbertkm)

---

Top Contributors

[![filbertkm](https://avatars.githubusercontent.com/u/135401?v=4)](https://github.com/filbertkm "filbertkm (16 commits)")[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (8 commits)")[![lucaswerkmeister](https://avatars.githubusercontent.com/u/2346599?v=4)](https://github.com/lucaswerkmeister "lucaswerkmeister (7 commits)")[![jdittrich](https://avatars.githubusercontent.com/u/3416487?v=4)](https://github.com/jdittrich "jdittrich (1 commits)")[![JonasKress](https://avatars.githubusercontent.com/u/13198391?v=4)](https://github.com/JonasKress "JonasKress (1 commits)")

---

Tags

mediawikiwikibasewikidatawikidatawikibase

### Embed Badge

![Health badge](/badges/wikibase-import/health.svg)

```
[![Health](https://phpackages.com/badges/wikibase-import/health.svg)](https://phpackages.com/packages/wikibase-import)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[wikibase/data-model

PHP implementation of the Wikibase DataModel

40246.3k23](/packages/wikibase-data-model)[data-values/data-values

Defines the DataValue interface and some trivial implementations

171.1M24](/packages/data-values-data-values)[professional-wiki/wikibase-local-media

Adds the local media data type to Wikibase

128.8k](/packages/professional-wiki-wikibase-local-media)

PHPackages © 2026

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