#Wordpress to Tumblr
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 :
Support secondary Tumblr blog for destination ( group )
Import posts types according to categories
Use custom fields to import
Make a list of source/destination posts URL to easily create redirections rules ( eg. redirect permanent 301 Apache )
Deals with [sourcode] and [caption] Wordpress shortcodes ( using the backpress shortcodes lib )
Sourcecodes can be highlighted with google-code-prettify
Fill the Tumblr post Slug with the Wordpress post name
Copy, rename and edit the sample configuration file
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 ).
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 :
- link : link-url
- photo : image
- video : video-embed
- quote : quote-author, quote-copy ,quote-url
- audio : audio
##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/" );
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
delete-tumblr-post.php is a utility to delete all post of the tumblr blog.
These scripts use the Tumblr API v1
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.