PHP code example of waaseyaa / migrate-source-wordpress
1. Go to this page and download the library: Download waaseyaa/migrate-source-wordpress library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
waaseyaa / migrate-source-wordpress example snippets
use Waaseyaa\Migrate\Source\WordPress\Migration\WpUsersToAccounts;
use Waaseyaa\Migrate\Source\WordPress\Migration\WpPostsToArticles;
use Waaseyaa\Migrate\Source\WordPress\Wxr\WxrReader;
$reader = new WxrReader('/path/to/wp-export.xml');
return [
(new WpUsersToAccounts($reader, $yourAccountDestination))->definition(),
(new WpPostsToArticles($reader, $yourArticleDestination))->definition(),
// …users → terms → media → posts → comments, per FR-024
];