LibreOffice Importer
Import Libreoffice Writer files as Wordpress posts
by Johannes Wilm · github.com/johanneswilm/wordpress-libreoffice-importer · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/johanneswilm/wordpress-libreoffice-importer/archive/refs/heads/main.zipLibreOffice Importer for WordPress
A powerful WordPress plugin that allows you to easily import posts from LibreOffice Writer documents. Import via ODT files or copy/paste formatted content directly, with automatic extraction of title, author, abstract, images, and footnotes.
Features
-
Multiple Import Methods
- Upload ODT (OpenDocument Text) files
- Copy and paste formatted content directly from LibreOffice Writer
-
Intelligent Content Extraction
- Automatic title detection from the first line
- Author name extraction and matching with WordPress users
- Abstract/summary extraction from first few paragraphs
- Preservation of all text formatting (headings, bold, italic, underline, etc.)
-
Rich Media Support
- Automatic image extraction and upload to WordPress media library
- Image embedding with proper linking
- Support for various image formats (PNG, JPG, GIF, etc.)
-
Advanced Features
- Footnote conversion to WordPress-style footnotes
- List preservation (ordered and unordered)
- Table support
- Hyperlink preservation
- Configurable post status (draft, pending, published)
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- PHP ZIP extension (for ODT file support)
- PHP XML extension (for content parsing)
Installation
Method 1: WordPress Admin
- Download the plugin ZIP file or create it using
./build.sh - Go to Plugins > Add New > Upload Plugin
- Choose the ZIP file and click 'Install Now'
- Click 'Activate Plugin'
- Navigate to 'LO Importer' in the WordPress admin menu
Method 2: Manual Installation (FTP/SSH)
# Via SSH
cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/johanneswilm/wordpress-libreoffice-importer.git libreoffice-importer
chown -R www-data:www-data libreoffice-importer
chmod -R 755 libreoffice-importer
Then activate via WordPress admin.
Quick Start
Method 1: Upload ODT File
- Go to LO Importer in WordPress admin
- Click Upload ODT File tab
- Select your
.odtfile - Click Import from ODT
- Your post is created as a draft
Method 2: Copy & Paste
- In LibreOffice: Select all (Ctrl+A) and copy (Ctrl+C)
- In WordPress: Go to LO Importer
- Click Copy & Paste tab
- Paste in the editor (Ctrl+V)
- Click Create Post from Content
- Your post is created as a draft
Usage
Importing from ODT Files
- Go to LO Importer > Import Document in your WordPress admin
- Click the Upload ODT File tab
- Select your
.odtfile - Click Import from ODT
- Wait for processing to complete
- View or edit your newly created post
Copy & Paste Import
- Open your document in LibreOffice Writer
- Select all content (Ctrl+A / Cmd+A)
- Copy (Ctrl+C / Cmd+C)
- Go to LO Importer > Import Document in WordPress
- Click the Copy & Paste tab
- Click in the editor area and paste (Ctrl+V / Cmd+V)
- Click Create Post from Content
- Your post will be created with all formatting preserved
Document Format Guidelines
For best results, structure your LibreOffice documents as follows:
Title
The first line of your document will be used as the post title. Make it short and descriptive.
Author Information
Include author information in one of these formats:
Author: John DoeBy John DoeWritten by: John Doe
The plugin will attempt to match the author name with existing WordPress users.
Abstract/Summary
The first 2-3 paragraphs after the title and author information will be considered as the post excerpt/abstract (configurable in settings).
Alternatively, you can explicitly mark an abstract:
Abstract: This is the summary of my post...
Main Content
Write your main content using standard LibreOffice formatting:
- Headings (Heading 1-6) will be converted to HTML h1-h6
- Bold, italic, and underline formatting will be preserved
- Bulleted and numbered lists
- Tables
- Images (embedded inline)
- Hyperlinks
- Footnotes
Configuration
Navigate to LO Importer > Settings to configure:
Content Extraction
- Extract Author Information: Automatically detect and match authors
- Extract Abstract/Summary: Use first paragraphs as excerpt
- Abstract Maximum Paragraphs: Number of paragraphs to include (default: 3)
Import Options
- Import Images: Upload images to media library
- Import Footnotes: Convert footnotes to WordPress format
- Preserve Formatting: Keep all text styling
Post Settings
- Default Post Status: Set to Draft, Pending Review, or Published
Examples
Example 1: Simple Blog Post
My Amazing Blog Post
Author: Jane Smith
This is the introduction paragraph that will be used as the excerpt.
This is the main content of the post. It can include **bold text**,
*italic text*, and [hyperlinks](https://example.com).
## Subheading
More content here with:
- Bullet points
- Multiple items
- Well formatted
### Another Subheading
Final thoughts and conclusions.
Example 2: Academic Paper
Research on WordPress Import Methods
Author: Dr. John Doe
Abstract: This paper explores various methods for importing content into
WordPress content management systems, with a focus on LibreOffice
document formats and their conversion efficiency.
# Introduction
The need for efficient content migration...
# Methodology
We analyzed several approaches...
# Results
The findings indicate[1] that automated imports significantly
reduce manual work.
# Conclusion
In conclusion, this research demonstrates...
---
[1] Based on a study of 100 documents
Configuration
Navigate to LO Importer > Settings to configure:
Content Extraction
- Extract Author Information: Automatically detect and match authors with WordPress users
- Extract Abstract/Summary: Use first paragraphs as excerpt
- Abstract Maximum Paragraphs: Number of paragraphs to include (default: 3)
Import Options
- Import Images: Upload images to media library
- Import Footnotes: Convert footnotes to WordPress format
- Preserve Formatting: Keep all text styling
Post Settings
- Default Post Status: Set to Draft, Pending Review, or Published (recommended: Draft)
Troubleshooting
ODT Files Won't Upload
- Check that the PHP ZIP extension is enabled
- Verify your WordPress upload file size limit
- Ensure the file is a valid ODT format
Images Not Importing
- Check your server's upload file size limits
- Verify you have write permissions to the uploads directory
- Ensure the 'Import Images' option is enabled in settings
Formatting Not Preserved
- Make sure 'Preserve Formatting' is enabled in settings
- Use standard LibreOffice styles rather than manual formatting
- Complex custom styles may not translate perfectly
Author Not Matched
- Ensure the author name matches a WordPress user's display name or login
- Check that 'Extract Author Information' is enabled
- The plugin will use the current user if no match is found
Credits
Developed by Johannes Wilm
- GitHub: https://github.com/johanneswilm
- Email: mail@johanneswilm.org
Copyright © 2025 Johannes Wilm
Licensed under GPL v3 or later
Thank you for using LibreOffice Importer!