Title: Static Site Exporter
Author: Ben Balter
Published: <strong>12 сар 12, 2014</strong>
Last modified: 4 сар 30, 2026

---

Search plugins

![](https://ps.w.org/jekyll-exporter/assets/banner-772x250.png?rev=3073421)

![](https://ps.w.org/jekyll-exporter/assets/icon-256x256.png?rev=3073421)

# Static Site Exporter

 By [Ben Balter](https://profiles.wordpress.org/benbalter/)

[Download](https://downloads.wordpress.org/plugin/jekyll-exporter.4.0.4.zip)

 * [Details](https://mn.wordpress.org/plugins/jekyll-exporter/#description)
 * [Reviews](https://mn.wordpress.org/plugins/jekyll-exporter/#reviews)
 * [Development](https://mn.wordpress.org/plugins/jekyll-exporter/#developers)

 [Support](https://wordpress.org/support/plugin/jekyll-exporter/)

## Description

### Онцлогууд

 * Converts all posts, pages, and settings from WordPress to Markdown and YAML for
   use in Jekyll (or Hugo or any other Markdown and YAML based site engine)
 * Export what your users see, not what the database stores (runs post content through`
   the_content` filter prior to export, allowing third-party plugins to modify the
   output)
 * Converts all `post_content` to Markdown
 * Converts all `post_meta` and fields within the `wp_posts` table to YAML front
   matter for parsing by Jekyll
 * Generates a `_config.yml` with all settings in the `wp_options` table
 * Outputs a single zip file with `_config.yml`, pages, and `_posts` folder containing`.
   md` files for each post in the proper Jekyll naming convention
 * **Selective export**: Export only specific categories, tags, or post types using
   WP-CLI
 * No settings. Just a single click.

### Usage

 1. Place plugin in `/wp-content/plugins/` folder
 2. Activate plugin in WordPress dashboard
 3. Select `Export to Jekyll` from the `Tools` menu

### More information

See [the full documentation](https://ben.balter.com/wordpress-to-jekyll-exporter):

 * [Changelog](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/changelog/)
 * [Command-line-usage](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/command-line-usage/)
 * [Selective export by category or tag](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/selective-export/)
 * [Custom post types](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/custom-post-types/)
 * [Custom fields](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/custom-fields/)
 * [Developing locally](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/developing-locally/)
 * [Minimum required PHP version](https://ben.balter.com/wordpress-to-jekyll-exporter/./docs/required-php-version/)

### Selective Export by Category or Tag

This feature allows you to export only a specific subset of your WordPress content,
filtered by category, tag, or post type. This is particularly useful when:

 * You have a large WordPress site but only need to convert specific sections
 * You want to migrate content by topic or category
 * You need to export content incrementally

### Using WP-CLI

The easiest way to perform selective exports is via WP-CLI commands.

#### Export by Category

To export posts from a single category, use the category slug:

    ```
    `bash
    ```

wp jekyll-export –category=technology > technology-export.zip
 `

To export from multiple categories (OR logic – posts in any of these categories):

    ```
    `bash
    ```

wp jekyll-export –category=tech,news,updates > export.zip
 `

#### Export by Tag

To export posts with a specific tag:

    ```
    `bash
    ```

wp jekyll-export –tag=featured > featured-export.zip
 `

To export posts with multiple tags (OR logic):

    ```
    `bash
    ```

wp jekyll-export –tag=featured,popular > export.zip
 `

#### Export Specific Post Types

To export only pages:

    ```
    `bash
    ```

wp jekyll-export –post_type=page > pages-export.zip
 `

To export only posts:

    ```
    `bash
    ```

wp jekyll-export –post_type=post > posts-export.zip
 `

To export custom post types:

    ```
    `bash
    ```

wp jekyll-export –post_type=portfolio,testimonial > custom-export.zip
 `

#### Combining Filters

You can combine multiple filters. Posts must match ALL specified filters (AND logic):

    ```
    `bash<h3>Export posts that are in "technology" category AND have "featured" tag</h3>wp jekyll-export --category=technology --tag=featured --post_type=post > export.zip
    `<h3>Using PHP Filters</h3>
    ```

For more programmatic control, you can use WordPress filters directly in your theme’s`
functions.php` or a custom plugin.

#### Filter by Category

    ```
    `php
    ```

add_filter( ‘jekyll_export_taxonomy_filters’, function() {
 return array( ‘category’
=> array( ‘technology’, ‘science’ ), ); } ); `

#### Filter by Tag

    ```
    `php
    ```

add_filter( ‘jekyll_export_taxonomy_filters’, function() {
 return array( ‘post_tag’
=> array( ‘featured’, ‘popular’ ), ); } ); `

#### Filter by Custom Taxonomy

    ```
    `php
    ```

add_filter( ‘jekyll_export_taxonomy_filters’, function() {
 return array( ‘my_custom_taxonomy’
=> array( ‘term-slug-1’, ‘term-slug-2’ ), ); } ); `

#### Combine Multiple Taxonomies

    ```
    `php
    ```

add_filter( ‘jekyll_export_taxonomy_filters’, function() {
 return array( ‘category’
=> array( ‘technology’ ), ‘post_tag’ => array( ‘featured’ ), ‘custom_tax’ => array(‘
term-1’ ), ); } ); `

#### Filter Post Types

    ```
    `php
    ```

add_filter( ‘jekyll_export_post_types’, function() {
 return array( ‘post’, ‘page’);//
Only export posts and pages } ); `

### Finding Category and Tag Slugs

If you’re not sure what slug to use:

#### Via WordPress Admin

 1. Go to **Posts > Categories** or **Posts > Tags**
 2. Hover over the category/tag name
 3. Look at the browser’s status bar or the URL – you’ll see something like `tag_ID
    =123&taxonomy=post_tag&term_slug=featured`
 4. The slug is the part after `term_slug=`

#### Via WP-CLI

List all categories with their slugs:

    ```
    `bash
    ```

wp term list category –fields=name,slug
 `

List all tags with their slugs:

    ```
    `bash
    ```

wp term list post_tag –fields=name,slug
 `

### Use Cases

#### Scenario 1: Export a Single Blog Section

You have a WordPress site with multiple sections (Tech, Lifestyle, Travel) and want
to move just the Tech section to a static site:

    ```
    `bash
    ```

wp jekyll-export –category=tech > tech-blog-export.zip
 `

#### Scenario 2: Export Featured Content

You want to export only posts marked as “featured” for a special showcase site:

    ```
    `bash
    ```

wp jekyll-export –tag=featured > featured-content.zip
 `

#### Scenario 3: Export by Year (using custom taxonomy)

If you’ve tagged posts by year, you can export by year:

    ```
    `bash
    ```

wp jekyll-export –tag=2024 > 2024-posts.zip
 `

#### Scenario 4: Migrate Content Incrementally

Export different categories separately for incremental migration:

    ```
    `bash
    ```

wp jekyll-export –category=tech > tech.zip
 wp jekyll-export –category=news > news.
zip wp jekyll-export –category=reviews > reviews.zip `

### Technical Details

 * **Taxonomy Filtering**: Uses WordPress term slugs (not names or IDs)
 * **Query Performance**: Filtering is done at the database level for efficiency
 * **OR Logic Within Taxonomy**: Multiple terms in the same taxonomy use OR logic(
   e.g., posts in category A OR B)
 * **AND Logic Across Taxonomies**: Multiple taxonomies use AND logic (e.g., posts
   in category A AND having tag B)
 * **Post Type Filtering**: Works independently of taxonomy filtering

### Limitations

 * Revisions are excluded when using taxonomy filters (as they don’t have taxonomy
   terms)
 * Taxonomy filtering uses term slugs, not term IDs or names
 * Empty taxonomy filters are ignored (no filtering applied)

### Troubleshooting

#### No Posts Exported

If your export is empty:

 1. **Check the slug**: Make sure you’re using the term slug, not the name
 2.  * Use `wp term list category` to verify the exact slug
 3. **Check post status**: Only published, future, and draft posts are exported
 4. **Verify taxonomy**: Make sure you’re using the correct taxonomy name (`category`,`
    post_tag`, etc.)

#### Wrong Posts Exported

If you’re getting unexpected posts:

 1. **Check term associations**: Verify which posts have the category/tag assigned
 2. **Review filter logic**: Remember that multiple categories use OR logic
 3. **Clear cache**: If testing, use `wp cache flush` between exports

### Custom post types

To export custom post types, you’ll need to add a filter (w.g. to your themes config
file) to do the following:

    ```
    `php
    ```

add_filter( ‘jekyll_export_post_types’, function() {
 return array(‘post’, ‘page’,‘
you-custom-post-type’); }); `

The custom post type will be exported as a Jekyll collection. You’ll need to initialize
it in the resulting Jekyll site’s `_config.yml`.

### Developing locally

#### Option 1: Using Dev Containers (Recommended)

The easiest way to get started is using [VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)
or [GitHub Codespaces](https://github.com/features/codespaces):

 1. Install [VS Code](https://code.visualstudio.com/) and the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
 2. `git clone https://github.com/benbalter/wordpress-to-jekyll-exporter`
 3. Open the folder in VS Code
 4. Click “Reopen in Container” when prompted
 5. Wait for the container to build and dependencies to install
 6. Access WordPress at `http://localhost:8088`

The devcontainer includes:
 – Pre-configured WordPress and MySQL – All PHP extensions
and Composer dependencies – VS Code extensions for PHP development, debugging, and
testing – WordPress coding standards configured

See [.devcontainer/README.md](https://ben.balter.com/wordpress-to-jekyll-exporter/./.devcontainer/README/)
for more details.

#### Option 2: Manual Setup

#### Prerequisites

 1.  `sudo apt-get update`
 2.  `sudo apt-get install composer`
 3.  `sudo apt-get install php7.3-xml`
 4.  `sudo apt-get install php7.3-mysql`
 5.  `sudo apt-get install php7.3-zip`
 6.  `sudo apt-get install php-mbstring`
 7.  `sudo apt-get install subversion`
 8.  `sudo apt-get install mysql-server`
 9.  `sudo apt-get install php-pear`
 10. `sudo pear install PHP_CodeSniffer`

#### Bootstrap & Setup

 1. `git clone https://github.com/benbalter/wordpress-to-jekyll-exporter`
 2. `cd wordpress-to-jekyll-exporter`
 3. `script/bootstrap`
 4. `script/setup`

#### Option 3: Docker Compose Only

 1. `git clone https://github.com/benbalter/wordpress-to-jekyll-exporter`
 2. `docker-compose up`
 3. `open localhost:8088`

### Running tests

    ```
    script/cibuild<h3>Custom fields</h3>
    ```

When using custom fields (e.g. with the Advanced Custom fields plugin) you might
have to register a filter to convert array style configs to plain values.

#### Available Filters

The plugin provides two filters for customizing post metadata:

 * **`jekyll_export_meta`**: Filters the metadata for a single post before it’s 
   merged with taxonomy terms. Receives `$meta` array as the only parameter.
 * **`jekyll_export_post_meta`**: Filters the complete metadata array (including
   taxonomy terms) just before it’s written to the YAML frontmatter. Receives `$
   meta` array and `$post` object as parameters. This is the recommended filter 
   for most use cases.

**Note:** As of the latest version, the plugin no longer automatically removes empty
or falsy values from the frontmatter. All metadata is preserved by default. If you
want to remove certain fields, you can use the `jekyll_export_post_meta` filter 
to customize this behavior.

By default, the plugin saves custom fields in an array structure that is exported
as:

    ```
    `php
    ```

[“my-bool”]=>
 array(1) { [0] => string(1) “1” } [“location”]=> array(1) { [0] =
> string(88) “My address” } `

And this leads to a YAML structure like:

    ```
    `yaml
    ```

my-bool:
 – “1” location: – ‘My address’ `

This is likely not the structure you expect or want to work with. You can convert
it using a filter:

    ```
    `php
    ```

add_filter( ‘jekyll_export_meta’, function($meta) {
 foreach ($meta as $key => $
value) { if (is_array($value) && count($value) === 1 && array_key_exists(0, $value)){
$meta[$key] = $value[0]; } }

    ```
    return $meta;
    ```

});
 `

A more complete solution could look like that:

    ```
    `php
    ```

add_filter( ‘jekyll_export_meta’, function($meta) {
 foreach ($meta as $key => $
value) { // Advanced Custom Fields if (is_array($value) && count($value) === 1 &&
array_key_exists(0, $value)) { $value = maybe_unserialize($value[0]); // Advanced
Custom Fields: NextGEN Gallery Field add-on if (is_array($value) && count($value)
=== 1 && array_key_exists(0, $value)) { $value = $value[0]; } } // convert types
$value = match ($key) { // Advanced Custom Fields: “true_false” type ‘my-bool’ =
> (bool) $value, default => $value }; $meta[$key] = $value; }

    ```
    return $meta;
    ```

});
 `

#### Removing Empty or Falsy Values

If you want to remove empty or falsy values from the frontmatter (similar to the
pre-3.0.3 behavior), you can use the `jekyll_export_post_meta` filter:

    ```
    `php
    ```

add_filter( ‘jekyll_export_post_meta’, function( $meta, $post ) {
 foreach ( $meta
as $key => $value ) { // Remove falsy values except numeric 0 if ( ! is_numeric(
$value ) && ! $value ) { unset( $meta[ $key ] ); } } return $meta; }, 10, 2 ); `

### Command-line Usage

If you’re having trouble with your web server timing out before the export is complete,
or if you just like terminal better, you may enjoy the command-line tool.

It works just like the plugin, but produces the zipfile on STDOUT:

    ```
    `
    ```

php jekyll-export-cli.php > jekyll-export.zip
 `

If using this method, you must run first `cd` into the wordpress-to-jekyll-exporter
directory.

Alternatively, if you have [WP-CLI](http://wp-cli.org) installed, you can run:

    ```
    `
    ```

wp jekyll-export > export.zip
 `

The WP-CLI version will provide greater compatibility for alternate WordPress environments,
such as when `wp-content` isn’t in the usual location.

### Filtering by Category or Tag

You can export only specific categories or tags using the WP-CLI command. This is
useful when you want to convert just one section of your WordPress site instead 
of the entire corpus.

#### Export posts from a specific category:

    ```
    `bash
    ```

wp jekyll-export –category=technology > export.zip
 `

#### Export posts from multiple categories:

    ```
    `bash
    ```

wp jekyll-export –category=tech,news,updates > export.zip
 `

#### Export posts with a specific tag:

    ```
    `bash
    ```

wp jekyll-export –tag=featured > export.zip
 `

#### Export only pages (or specific post types):

    ```
    `bash
    ```

wp jekyll-export –post_type=page > export.zip
 `

#### Combine filters:

    ```
    `bash
    ```

wp jekyll-export –category=technology –tag=featured –post_type=post > export.zip
`
<h3>Using Filters in PHP</h3> If you're using the plugin via PHP code or want more
control, you can use thejekyll_export_taxonomy_filters` filter:

    ```
    `php
    ```

add_filter( ‘jekyll_export_taxonomy_filters’, function() {
 return array( ‘category’
=> array( ‘technology’, ‘science’ ), ‘post_tag’ => array( ‘featured’ ), ); } );

// Then trigger the export
 global $jekyll_export; $jekyll_export->export(); `

### Test Coverage Improvements

### Overview

This document summarizes the comprehensive testing improvements made to the WordPress
to Jekyll Exporter plugin.

### Test Files Added

#### 1. `tests/test-cli.php` – CLI Command Tests

Tests for the WP-CLI integration functionality:
 – Verifies `Jekyll_Export_Command`
class exists when WP_CLI is defined – Tests that the command has the required `__invoke`
method – Validates command instantiation

#### 2. `tests/test-integration.php` – Integration Tests

Comprehensive integration tests for the full export workflow:
 – Full export workflow
validation (config + posts + uploads) – Zip file creation and contents verification–
Multi-post type handling (posts, pages, drafts) – Upload file copying and export–
Special character handling in titles – End-to-end YAML front matter validation –
Markdown conversion validation

#### 3. `tests/test-edge-cases.php` – Edge Case Tests

Tests for edge cases and error conditions:
 – Posts with very long titles – Unicode
characters (émojis, 中文, العربية) – HTML in post titles – Table conversion to Markdown–
Shortcode processing – Serialized post meta data – Empty post slugs – Post formats–
Serialized options – Symbolic links – Empty post lists – Invalid dates

### Enhanced Tests in `test-wordpress-to-jekyll-exporter.php`

Added comprehensive tests for previously untested or under-tested functions:

#### New Function Tests

 1. **`test_filesystem_method_filter()`** – Verifies the filesystem method filter returns‘
    direct’
 2. **`test_register_menu()`** – Tests menu registration in WordPress admin
 3. **`test_zip_folder_empty()`** – Tests zip creation with empty directories
 4. **`test_zip_folder_nested()`** – Tests zip creation with nested directory structures

#### New Edge Case Tests

 1.  **`test_convert_meta_no_custom_fields()`** – Tests meta conversion without custom
     fields
 2.  **`test_convert_meta_with_featured_image()`** – Tests featured image handling 
     in meta
 3.  **`test_convert_terms_no_terms()`** – Tests term conversion when no terms exist
 4.  **`test_convert_content_empty()`** – Tests conversion of empty content
 5.  **`test_convert_content_complex_html()`** – Tests conversion of complex HTML (
     headings, links, lists)
 6.  **`test_write_draft()`** – Tests writing draft posts to `_drafts` directory
 7.  **`test_write_future()`** – Tests writing future posts to `_posts` directory
 8.  **`test_write_subpage()`** – Tests writing sub-pages with correct paths
 9.  **`test_rename_key_nonexistent()`** – Tests rename_key with non-existent keys
 10. **`test_convert_options_filters_hidden()`** – Tests that hidden options are filtered
 11. **`test_get_posts_caching()`** – Tests post caching mechanism
 12. **`test_copy_recursive_skips_temp()`** – Tests that temporary directories are 
     skipped

### Test Coverage Summary

#### Previously Tested Functions

 * ✅ Plugin activation
 * ✅ Dependency loading
 * ✅ Getting post IDs
 * ✅ Converting meta (basic)
 * ✅ Converting terms (basic)
 * ✅ Converting content (basic)
 * ✅ Temp directory initialization
 * ✅ Converting posts
 * ✅ Exporting options
 * ✅ Writing files
 * ✅ Creating zip
 * ✅ Cleanup
 * ✅ Rename key
 * ✅ Converting uploads
 * ✅ Copy recursive (basic)

#### Newly Added Test Coverage

 * ✅ CLI command functionality
 * ✅ Filesystem method filter
 * ✅ Menu registration
 * ✅ Featured images in meta
 * ✅ Complex HTML to Markdown conversion
 * ✅ Draft and future post handling
 * ✅ Sub-page path handling
 * ✅ Empty and edge case content
 * ✅ Hidden option filtering
 * ✅ Post caching
 * ✅ Temporary directory exclusion
 * ✅ Full export workflow integration
 * ✅ Zip contents validation
 * ✅ Multi-post type exports
 * ✅ Unicode character handling
 * ✅ HTML in titles
 * ✅ Table conversion
 * ✅ Shortcode processing
 * ✅ Serialized data handling
 * ✅ Symbolic link handling
 * ✅ Long titles
 * ✅ Post formats
 * ✅ Special characters

### Coverage Statistics

#### Original Test File

 * **Lines**: 415
 * **Test Functions**: 15

#### Enhanced Test Files

 * **test-wordpress-to-jekyll-exporter.php**: 699 lines (+284), 31 test functions(
   +16)
 * **test-cli.php**: 60 lines (new), 3 test functions (new)
 * **test-integration.php**: 247 lines (new), 6 test functions (new)
 * **test-edge-cases.php**: 273 lines (new), 15 test functions (new)

= Total …

## Reviews

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

### 󠀁[Useless](https://wordpress.org/support/topic/useless-594/)󠁿

 [andybrandt](https://profiles.wordpress.org/andybrandt/) 5 сар 6, 2025

Markdown export is not really Markdown…

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

### 󠀁[Does exactly what it says, nothing more](https://wordpress.org/support/topic/does-exactly-what-it-says-nothing-more/)󠁿

 [andrewjgwise](https://profiles.wordpress.org/andrewjgwise/) 1 сар 30, 2023

Worked without issue on a WordPress site on shared hosting. Much quicker than using
the Jekyll importer.

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

### 󠀁[Try command line version if not working for you](https://wordpress.org/support/topic/try-command-line-version-if-not-working-for-you/)󠁿

 [rpeyron](https://profiles.wordpress.org/rpeyron/) 8 сар 14, 2022

If you have a not so small WordPress site, it is very likely you won’t have any 
success using this plugin within the WordPress interface, as I can read in the reviews
and support messages. But the plugin offer a command line interface that does not
have the timeout of the web version. Go inside the plugin folder and run the cli
version : php jekyll-export-cli.php > jekyll-export.zip The GitHub does provide 
more information (WordPress forbid to include the link, but the project name seems
to be benbalter/wordpress-to-jekyll-exporter) Not doing miracles with plugins, you
will have some rework, but definitely working and very useful!

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

### 󠀁[Working in 2022](https://wordpress.org/support/topic/working-in-2022-2/)󠁿

 [turbidplaque](https://profiles.wordpress.org/turbidplaque/) 3 сар 17, 2022

I wasn’t expecting much because of the previous reviews indicating this was broken,
but having just used it on an (admittedly somewhat small) WP site, I can confirm
that it now works. Even with only a couple dozen posts and some pictures, it took
a few minutes, so give it time, but the result was exactly as advertised: a .zip
file containing all posts as Jekyll-formatted .md files, and the WP uploads directory
with all the images. Thanks!

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

### 󠀁[Finally dead](https://wordpress.org/support/topic/finally-dead/)󠁿

 [sinisam](https://profiles.wordpress.org/sinisam/) 1 сар 8, 2020 1 reply

It does not work anymore. I suppose it was good while it worked but I will never
know.

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

### 󠀁[Broken. doesn’t work anymore](https://wordpress.org/support/topic/broken-doesnt-work-anymore/)󠁿

 [Aslan French](https://profiles.wordpress.org/thedonquixotic/) 12 сар 19, 2019

Sad because I’d really like to export my posts but doesn’t work.

 [ Read all 12 reviews ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/)

## Contributors & Developers

“Static Site Exporter” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Ben Balter ](https://profiles.wordpress.org/benbalter/)

[Translate “Static Site Exporter” into your language.](https://translate.wordpress.org/projects/wp-plugins/jekyll-exporter)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/jekyll-exporter/), 
check out the [SVN repository](https://plugins.svn.wordpress.org/jekyll-exporter/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/jekyll-exporter/)
by [RSS](https://plugins.trac.wordpress.org/log/jekyll-exporter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 4.0.4

 * Stream the export zip to the browser in 8 KB chunks instead of loading the entire
   archive into memory in `send()`, so large exports no longer hit `memory_limit`
   after a successful build
 * `zip_folder()` now throws `RuntimeException` instead of calling `wp_die()` directly,
   so the existing `export()` try/catch renders a friendly error and runs `cleanup()`
   on partial temp files
 * Added `jekyll_export_html_converter` filter so integrations (and tests) can swap
   in a custom HTML-to-Markdown converter
 * Gated the v4.0.3 fallback `error_log()` call behind `WP_DEBUG`
 * Hardened sanitization of `$_GET['type']` in the export callback
 * Added regression tests for the v4.0.3 `Invalid HTML was provided` fallback and
   for the new `zip_folder()` throw behavior

#### 4.0.3

 * Catch `InvalidArgumentException` from `league/html-to-markdown` in `convert_content()`
   and fall back to the post’s raw HTML for that single post instead of aborting
   the entire export with “Jekyll Export failed: Invalid HTML was provided” ([#400](https://github.com/benbalter/wordpress-static-site-exporter/issues/400))

#### 4.0.2

 * Add shutdown handler to surface fatal errors (memory exhaustion, max execution
   time) during export with actionable error messages instead of a generic WordPress
   critical error page
 * Add proactive `memory_limit` pre-flight check (warns when below 64MB) in `validate_environment()`
 * Display admin error notice on Tools  Export when environment validation fails,
   before the user clicks Export

#### 4.0.1

 * Security: Use cryptographically secure randomness (`wp_generate_password`) instead
   of `md5(time())` for the export temp directory name to prevent symlink/TOCTOU
   attacks on shared hosts (CWE-330/377)
 * Security: Reject non-CLI access in deprecated `jekyll-export-cli.php` before 
   bootstrapping WordPress (CWE-665)
 * Security: Sanitize each path segment of page filenames as defense-in-depth against
   path traversal (CWE-22)
 * Fix stale `$upload_basedir` cache in `copy_recursive()` on multisite by keying
   it on the current blog ID

#### 4.0.0

 * **Breaking:** Minimum PHP version bumped from 7.2.5 to 8.2
 * **Breaking:** Minimum WordPress version bumped from 4.4 to 6.4
 * Updated `symfony/yaml` from ^5.4 to ^7.0
 * Updated PHPUnit from ~8.0 to ~9.6
 * Removed `symfony/polyfill-php80` (no longer needed)
 * Added PHPStan static analysis at level 5
 * Fixed `get_posts()` to return integer IDs instead of strings
 * Fixed PHPDoc type annotations throughout codebase
 * Deprecated legacy `jekyll-export-cli.php` in favor of `lib/cli.php`
 * Improved CI pipeline with PHPStan job and vendor consistency checks

[View Past Releases](https://github.com/benbalter/wordpress-to-jekyll-exporter/releases)

## Meta

 *  Version **4.0.4**
 *  Last updated **4 долоо хоног ago**
 *  Active installations **500+**
 *  WordPress version ** 6.4 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 8.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/jekyll-exporter/)
 * Tags
 * [export](https://mn.wordpress.org/plugins/tags/export/)[Github](https://mn.wordpress.org/plugins/tags/github/)
   [jekyll](https://mn.wordpress.org/plugins/tags/jekyll/)[yaml](https://mn.wordpress.org/plugins/tags/yaml/)
 *  [Advanced View](https://mn.wordpress.org/plugins/jekyll-exporter/advanced/)

## Ratings

 3.5 out of 5 stars.

 *  [  6 5-star reviews     ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/jekyll-exporter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/jekyll-exporter/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/jekyll-exporter/reviews/)

## Contributors

 *   [ Ben Balter ](https://profiles.wordpress.org/benbalter/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/jekyll-exporter/)