aurel-appsthru / Wordpress-to-Tumblr

PHP script to export Wordpress blog posts to Tumblr ( with support of posts types, tags, categories, some shortcodes, secondary blog, etc )
http://appsthru.com/
7 stars 1 forks source link

Wordpress to Tumblr

About

PHP script that help to export Wordpress posts to Tumblr.

It can serve as a basis because it contains the resolution of several export issues :

Features

Configuration

Copy, rename and edit the sample configuration file config.php.sample to config.php

Prerequisites

To obtain an export file from Wordpress, go to the wp-admin menu and choose Tools>Export. Select Articles and push the Download button.

The script can simply export all posts as Regular, but it was also made to deal with categories and custom fields ( if you have previously tried to make Wordpress look like Tumblr with a custom taxonomy and Custom Field Template ).

Indicate in config.php the category which represent the posts types in $tumblogWPCategory . Then indicate the corresponding terms for each type in $tumblogWPCategoryTermsMatches.

Consider that as it is, the script support this custom fields :

Photos and images

Photos are automagically uploaded to Tumblr when using the photo post type. However, images of the post body are not uploaded. You have to maintain them in a CDN for instance. In the config file, you can relocate images paths using the $relocateBodyImages array.

$relocateBodyImages = array( 
"http://myblog.com/wp-content/uploads/" 
=> "media.myblog.com/tumblelog/"
);

Redirection

In the config file, indicate a file name for $logFile.

The log file is in the CSV format :

 source-URL ; destination-URL

So you can easily create rules for your web server.

Redirect permanent source-URL destination-URL 

Misc

The script delete-tumblr-post.php is a utility to delete all post of the tumblr blog.

These scripts use the Tumblr API v1

Disclaimer

This script is based on the Wordpress-to-Tumblr script, but it's not a Fork in view of all changes and additions that are made.