83 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Drupal2WP Toolkit
Flexible content migration and taxonomy structuring for modern WordPress sites.
Drupal2WP Toolkit provides an extensible command-line and plugin-based bridge between Drupal 8 or higher and WordPress 6, optimized for developers handling structured content migration. It includes taxonomy mapping, sortable categories, UI enhancements, and future-ready plans for block-based template integration.
---
## ⚙️ Features
- **Drupal → WordPress Migration**
- Imports all Drupal nodes as WordPress **Pages** by default
- Vocabulary terms are converted into **top-level categories**
- Associated Drupal terms become **sub-categories** under their vocabularies
- Drupal content types are added as **top-level categories** for structural clarity
- **Admin UI Enhancements**
- Adds a sortable **Last Modified** column to Pages view
- Top-level categories are also **sortable**
- Category filters available directly in admin for Pages
- **WP-CLI Utilities**
- Run `wp drupal2wp_toolkit --help` to learn about Drupal content porting
- Easily convert migrated Pages into **Posts**, retaining taxonomy mapping
---
## 🚀 Future Plans
- **Block Theme Editor Integration**
- Assign categories to custom templates or reusable block layouts
- Enable GUI-based taxonomy-driven theming inside WordPress's Site Editor
- **Advanced Taxonomy Mapping**
- Support for custom post types and multi-taxonomy assignment
- **Content Blueprinting**
- Define reusable structures based on imported vocabularies and content types
---
## 🧰 Installation
### 🔐 Drupal Database Configuration
Drupal2WP Toolkit connects to your Drupal database using WordPresss native `wpdb` class, with credentials securely managed via **environment variables**.
This approach keeps sensitive connection details out of your codebase and allows flexible configuration across environments (local, staging, production).
#### ✅ Required Environment Variables
Set the following in your server environment or `.env` file:
```env
DRUPAL_DB_USER=your_drupal_db_username
DRUPAL_DB_PASS=your_drupal_db_password
DRUPAL_DB_NAME=your_drupal_db_name
DRUPAL_DB_HOST=your_drupal_db_host
```
1. Clone the repository into your WordPress plugins directory:
```bash
git clone https://git.bikeshopi.dev/bike/drupal2wp_toolkit.git wp-content/plugins/drupal2wp_toolkit
```
2. Activate the plugin:
```bash
wp plugin activate drupal2wp_toolkit
```
3. Run the import command:
```bash
wp drupal2wp_toolkit --type=story,hidden_content,vidcast,news_article,resources
```
## 🙌 Credits
Contributions and feedback welcome, For contributions, reach out to @bike — this is a toolkit built for extensibility.
## 📄 License
GNU GENERAL PUBLIC LICENSE