Skip to content

Fixes several issues with WP content before importing to Ghost.

Notifications You must be signed in to change notification settings

ventaur/FixWordPressContent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fix WordPress Content

This app fixes several issues with WP content before importing to Ghost.

To Do

For the love of Kratos, write some fricken tests!

Installation

To install this application globally for easy execution, run the following command from the app's root directory.

npm install -g .

Now, you can test that the install worked by entering the next command.

fix-wp-export --version

Using the Application

This application works on a specific type of JSON file generated by the Ghost WordPress plugin. Next, are the ideal steps to follow.

  1. Create Tags for all your Categories in WordPress. Use the built-in import tool for this conversion.
  2. Install the Ghost WordPress plugin to your site.
  3. Click "Export" next to the Ghost plugin entry on the Plugins page.
  4. Click the "Download Ghost File" button and wait to save the output file. If the site times out due to the size of the file, you likely just need to wait a bit and then manually download the file from the server when done. Watch the /wp_content/uploads/ghost-exports/ direcotry until the ZIP file is done and ready. Then, download it directly from the browser.
  5. Extract the JSON file from the ZIP anywhere you prefer.
  6. Run this console app with the domains command in order to generate a list of all the domains referenced in your WP content export.
  7. Review the domains listed and collect those that represent this WP blog and all those that are related blogs.
  8. Create a new site config for this blog, based on the domain information you collected previously. See the example site-configs for the structure of the config JSON.
  9. Run this console app again with your site config, WP export JSON path, and a new file path for its output.
  10. Add the output JSON file back to the ZIP and replace the one already in there.
  11. Finally, use the ZIP file as the source for your Ghost import.

The necessary CLI commands to run follow.

> fix-wp-export domains path-to-your-export.json
> fix-wp-export path-to-site-config.json path-to-your-export.json path-to-fixed-export.json

About

Fixes several issues with WP content before importing to Ghost.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published