PHPackages                             symbiote/silverstripe-wordpressmigrationtools - 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. symbiote/silverstripe-wordpressmigrationtools

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

symbiote/silverstripe-wordpressmigrationtools
=============================================

A wordpress importer that handles various operations.

2.0.0(7y ago)271BSD-3-ClausePHPPHP &gt;=5.3.0

Since Aug 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/symbiote/silverstripe-wordpressmigrationtools)[ Packagist](https://packagist.org/packages/symbiote/silverstripe-wordpressmigrationtools)[ RSS](/packages/symbiote-silverstripe-wordpressmigrationtools/feed)WikiDiscussions master Synced 1mo ago

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

Wordpress Migration Tools
=========================

[](#wordpress-migration-tools)

A Wordpress Importer that handles various operations:

- Import Pages (WordpressImportService::importPages)
- Update imported pages to have same Wordpress page hierarchy (WordpressImportService::updatePagesBasedOnHierarchy)
- Fix $Content or Elemental's ElementContent $HTML to point assets to local URLs or shortcodes as appropriate (WordpressImportService::fixPostContentURLs)
- Update Home page to match Wordpress home page (WordpressImportService::setHomepageToWordpressPageAndDeleteCurrentHomePage)
- Update imported pages to have match the provided Wordpress menu hierarchy (WordpressImportService::updatePagesBasedOnNavMenu)
- Import Gravity Forms data as UserDefinedForm pages (WordpressImportService::importGravityForms)

Quick Start
-----------

[](#quick-start)

- Configure WordpressImportBasicTask items in in YML

```
---
Name: wordpress_import
After:
  - 'framework/*'
  - 'cms/*'
---
WordpressImportBasicTask:
  default_db:
    database: 'my-wordpress-db'
    username: 'root'
    password: ''
    table_prefix: 'wp'
  navigation_slug: 'top-navigation'
```

- Run "Wordpress Basic Import Task" from /dev/tasks

Modifying/Extending the importer
--------------------------------

[](#modifyingextending-the-importer)

This Wordpress importer is designed to allow you to take the functionality you want to use specifically and then easily tack your own logic on top. The simplest way to do this is to create your own task that extends 'WordpressImportBasicTask' and override the 'runCustom' function. From here you can either choose to call 'parent::runCustom()' or copy-paste the seperate import function calls and comment out what you don't need.

```
