Title: WP Gatsby Markdown Exporter
Author: mitchmac
Published: <strong>6 Gennaio 2020</strong>
Last modified: 16 Gennaio 2020

---

Ricerca i plugin

Questo plugin **non è stato testato con le ultime 3 versioni principali (major releases)
di WordPress**. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare
problemi di compatibilità se utilizzato con versioni più recenti di WordPress.

![](https://s.w.org/plugins/geopattern-icon/wp-gatsby-markdown-exporter.svg)

# WP Gatsby Markdown Exporter

 Di [mitchmac](https://profiles.wordpress.org/mitchmac/)

[Scarica](https://downloads.wordpress.org/plugin/wp-gatsby-markdown-exporter.zip)

 * [Dettagli](https://it.wordpress.org/plugins/wp-gatsby-markdown-exporter/#description)
 * [Recensioni](https://it.wordpress.org/plugins/wp-gatsby-markdown-exporter/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/wp-gatsby-markdown-exporter/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/wp-gatsby-markdown-exporter/#developers)

 [Supporto](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/)

## Descrizione

The plugin creates zip files containing posts converted to Markdown. A WP-CLI command
exists to handle exporting sites with a large amount of content.

 * Move WordPress content to Gatsby-friendly Markdown.
 * Customize the export! Remap and restructure exported fields.
 * CLI: Avoid PHP timeouts by using the command line with WP-CLI.
 * CLI: Export progress bar (great for large sites)!

> Reminder: always keep a backup of the WordPress database and files in case your
> export doesn’t work as expected!

### Working with Gatsby

If you’re just getting started with Gatsby, we recommend experimenting with a Markdown
based Gatsby starter like [Tina Grande](https://github.com/tinacms/tina-starter-grande).
Installation is as easy as:

    ```
    git clone https://github.com/tinacms/tina-starter-grande.git

    cd tina-starter-grande

    yarn install && gatsby develop
    ```

Then copy your exported WordPress Markdown into the `content` directory or point
the wp gatsby-markdown-export command at the content directory.

Want to port your WordPress or HTML theme to Gatsby? Checkout [Porting an HTML Site to Gatsby](https://www.gatsbyjs.org/docs/porting-an-html-site-to-gatsby/)
for tips.

### Command Line Usage

The command line functionality uses WP-CLI to interact with WordPress. [WP-CLI is easy to install](https://wp-cli.org/#installing)
if you haven’t already.

Once it’s installed, you can export content to a directory like this:

    ```
    wp gatsby-markdown-export --directory=/example/gatsby-starter/src/content
    ```

All CLI arguments are optional.

 Option
 Description Default value

 `--help`
 get help

 `--directory=`
 export output directory random temp directory

 `--post_types=`
 post types to export, see: https://developer.wordpress.org/reference/
classes/wp_query/#post-type-parameters page,post

 `--post_status=`
 post status to export, see: https://developer.wordpress.org/reference/
classes/wp_query/#status-parameters any

 `--fields_to_markdown=`
 fields to convert to Markdown excerpt

 `--excluded_front_matter=`
 fields to exclude from front matter

 `--post_date_format=`
 format for post publish date, see: https://www.php.net/manual/
en/function.date.php c

 `--upload_dir=`
 directory in the export to copy WordPress uploads uploads

 `--remap_fields=`
 remap front matter field names, example: find1,replace1;find2,
replace2

 `--fields_to_array=`
 convert single value front matter fields to arrays

 `--include_private_fields=`
 private post meta fields to include (they start with_)

 `--skip_copy_uploads`
 flag, skips copying WordPress uploads to the export

 `--skip_original_images`
 flag, skips the use of original dimension images

 `--skip_enforce_charset`
 flag, skips use of blog_charset for the XML charset

 `--create_type_directory`
 flag, creates directories based on post type

## Screenshot

[⌊The export options form allows for customization of the exported Zip file.⌉⌊The
export options form allows for customization of the exported Zip file.⌉[

The export options form allows for customization of the exported Zip file.

## Installazione

 1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or 
    install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Use the Settings->Export to Gatsby screen to export content

## FAQ

  What does `Warning: The markdown converter encountered invalid HTML and could 
not convert the content at:` mean?

This means that the markdown converter couldn’t convert the referenced post to markdown,
so we will just copy the HTML as it is.

## Recensioni

![](https://secure.gravatar.com/avatar/2b6f10185b76bc0484023207ffca0014ab710404722473a8d5817657ed124a04?
s=60&d=retro&r=g)

### 󠀁[Did the trick for me in WP 6.0.2](https://wordpress.org/support/topic/did-the-trick-for-me-in-wp-6-0-2/)󠁿

 [kalico](https://profiles.wordpress.org/kalico/) 9 Settembre 2022

I decided to take a chance on this plugin because I desperately needed to convert
some files to Markdown so I could bring them into in my Obsidian vault. I backed
myself into this nasty little corner by experimenting with Journey.cloud for a few
months. I misread their documentation to indicate that it would be simple to export
my content, but IT WAS NOT. I did not want to use any of the half-baked command 
line scripts floating around on GitHub for Journey to .md because I read comments
and issue reports and I simply did not have time to deal with all the layers of 
stuff that I invariably run into. I finally decided to publish each of my notes 
as a draft to my own WordPress site manually. (I did this one at a time…there were
only 60 of them or I might have chosen the command line option instead.) Then I 
used this plugin to export them in Markdown format, so I could add them to my Obsidian
vault. This is not a fancy plugin and I had some manual cleanup to do, but that 
was a small price to pay. This won't continue working forever if no one is maintaining
it, but it did what I needed it to do in WP 6.0.2.

![](https://secure.gravatar.com/avatar/172443e7ef5a1fd41244b6ddb6a95bb1f9164e1a64ae902f6e025052ed282287?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-6713/)󠁿

 [](https://profiles.wordpress.org/yboris/) 30 Aprile 2020

Just what I needed — to export all my posts and pages in a readable format! The 
formatting conversion is beautiful — straight to markdown! Each page and post is
its own file. Just great!

 [ Leggi tutte le recensioni di 2 ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/)

## Contributi e sviluppo

“WP Gatsby Markdown Exporter” è un software open source. Le persone che hanno contribuito
allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ mitchmac ](https://profiles.wordpress.org/mitchmac/)

[Traduci “WP Gatsby Markdown Exporter” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/wp-gatsby-markdown-exporter)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/wp-gatsby-markdown-exporter/)
segui il [repository SVN](https://plugins.svn.wordpress.org/wp-gatsby-markdown-exporter/),
segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/wp-gatsby-markdown-exporter/)
tramite [RSS](https://plugins.trac.wordpress.org/log/wp-gatsby-markdown-exporter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.3.3

 * Support including private post meta fields (like Yoast)

## Meta

 *  Versione **0.3.3**
 *  Ultimo aggiornamento **7 anni fa**
 *  Installazioni attive **100+**
 *  Versione WordPress ** 4.6 o superiore **
 *  Testato fino alla versione **5.3.27**
 *  Versione PHP ** 5.6 o superiore **
 *  Lingua
 * [English (US)](https://wordpress.org/plugins/wp-gatsby-markdown-exporter/)
 * Tag
 * [export](https://it.wordpress.org/plugins/tags/export/)[gatsby](https://it.wordpress.org/plugins/tags/gatsby/)
   [jamstack](https://it.wordpress.org/plugins/tags/jamstack/)[markdown](https://it.wordpress.org/plugins/tags/markdown/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/wp-gatsby-markdown-exporter/advanced/)

## Valutazioni

 5 su 5 stelle.

 *  [  2 recensioni a 5-stelle     ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/?filter=4)
 *  [  0 recensioni a 3-stelle     ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/?filter=3)
 *  [  0 recensioni a 2-stelle     ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/?filter=2)
 *  [  0 recensioni a 1-stelle     ](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/?filter=1)

[La tua recensione](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/reviews/)

## Collaboratori

 *   [ mitchmac ](https://profiles.wordpress.org/mitchmac/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/wp-gatsby-markdown-exporter/)