Textport – A WordPress Plugin for Exporting Post Content

Textport – A WordPress Plugin for Exporting Post Content

Version Managed on Github

A very slim plugin that allows downloading of post (or page, if you tweak the code) content via TXT, HTML, and MD formats.

Adds buttons to the WordPress post edit screen allowing users to download the post content in .txt, .html, or .md (Markdown) formats.

Description

Textport is a utility plugin designed for WordPress content creators and administrators. It seamlessly integrates into the post editing interface, providing convenient one-click buttons to download the current post’s content in three different formats:

  • .TXT: A plain text version of your post content, with all HTML tags stripped out. Useful for simple text backups or repurposing content where formatting is not needed.

  • .HTML: The full HTML rendered version of your post content, as it would typically appear on the front end of your website. This includes processed shortcodes and WordPress auto-formatting (like <p> tags).

  • MARKDOWN (.MD): A Markdown representation of your post content. This is generated by converting the rendered HTML to Markdown, suitable for use in Markdown-based systems or for easier plain-text editing with formatting cues.

This plugin is ideal for:

  • Quickly backing up individual posts.

  • Exporting content for use in other systems or platforms.

  • Providing authors with easy access to different formats of their work.

Installation

  1. Download: Download the textport.zip file (if you package it) or clone the repository.

  2. Upload:

    • If you have a .zip file: In your WordPress admin panel, go to Plugins > Add New. Click Upload Plugin and choose the textport.zip file.

    • If you have the plugin folder: Upload the textport folder to the /wp-content/plugins/ directory on your server.

  3. Activate: Go to the Plugins page in your WordPress admin panel and click Activate for the “Textport” plugin.

Usage

Once activated, the Textport plugin adds a new meta box titled “Download Content (Textport)” to the sidebar of the post editing screen (for the “Post” post type by default).

Within this meta box, you will find three buttons:

  • Download as .TXT: Click this button to download a .txt file containing the HTML-stripped plain text of the current post.

  • Download as .HTML: Click this button to download an .html file containing the rendered HTML of the current post.

  • Download as MARKDOWN: Click this button to download an .md file containing a Markdown version of the current post.

The downloaded file will be named using the post title (e.g., textport-your-post-title.txt) or textport-post-{ID}.txt if the title is empty.

Notes

  • Markdown Conversion: The HTML to Markdown conversion is a basic implementation suitable for common HTML structures. For highly complex HTML or very specific Markdown requirements, the output may need manual adjustments. More advanced Markdown conversion could be achieved by integrating a dedicated PHP Markdown library.

  • Post Types: By default, the download buttons appear only on the “Post” post type edit screen. The plugin code includes commented-out lines that can be enabled to add this functionality to “Pages” or other custom post types.

  • Permissions: Only users with the capability to edit_post for a specific post will be able to see and use the download buttons for that post.

Frequently Asked Questions

  • Can I add this to other post types (e.g., Pages, Custom Post Types)? Yes, you can modify the textport_add_meta_box() function in textport.php to include other post types. Look for the commented-out add_action or add_meta_box lines as examples.

  • Is the Markdown conversion perfect? The current Markdown conversion is basic and handles common HTML elements. For very complex HTML, the result might not be perfect. If you require highly accurate Markdown, consider extending the plugin with a more robust HTML-to-Markdown PHP library.

Technical Specifications

Current Version: 

vManaged on Github

Where would you like to go?

Hosting Portal

portal.fallstech.group

Access your hosting portal to make changes to your website, domain, or manage your billing.

Online Store Portal

www.fallstech.group

Download pre-built website kits, plugin files, or manage subscriptions to our educational courses.

Please Note: These buttons may take you away from (www.fallstech.group) to another location on our infrastructure. You will be redirected upon click.

Addicted to collecting domains? Us too.

Put your .COMs to good use and save up to 50% with our Web Hosting Plan – Complete with everything you need to get a site launched in minutes!

Limited Time Offer