GithubHelp home page GithubHelp logo

isabella232 / wordpress-cli-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/wordpress-cli-exporter

0.0 0.0 0.0 127 KB

A CLI Wrapper around the WordPress WXR Exporter. (Deprecated; please check out http://wp-cli.org)

Home Page: http://hitchhackerguide.com

PHP 100.00%

wordpress-cli-exporter's Introduction

If you run a big site or many blogs and would like to create some automated exports or run into memory/runtime issues with the web based exporter then this wrapper around the existing web-based WordPress exporter ( http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/export.php ) will likely help you out here.

Grab the file from https://github.com/tott/WordPress-CLI-Exporter and copy it to your WordPress root folder or any other convenient location. 

Make sure to set $wordpress_root_dir and $_SERVER['HTTP_HOST'] according to your environment. 

Then execute the script with the following parameters ( brackets indicate optional parameters ):

php cli-exporter.php --blog=blogname --path=/tmp/ --user=admin [--start_date=2011-01-01] [--end_date=2011-12-31] [--post_type=post] [--author=admin] [-- * category=Uncategorized] [--post_status=publish] [--skip_comments=1] [--file_item_count=1000]

blogname: the name or blog_id of the blog you like to export
path: the full path to the directory where exports should be stored
user: the WordPress username or ID that will run this export
start_date: only export posts older than this date (format: YYYY-MM-DD)
end_date: only export posts newer than this date (format: YYYY-MM-DD)
post_type: export only posts matching this post_type
author: export only posts for this user_login or user_id
category: export only posts with this category name
post_status: export only posts with a particular post status
skip_comments: if this is set to 1 then comments will not be exported
file_item_count: how many items to include per file (will automatically break up into several files at the specified interval)

I hope this is useful. Feedback welcome at http://wp.me/p1lkCl-43Q

wordpress-cli-exporter's People

Contributors

mjangda avatar danielbachhuber avatar jkudish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.