Coder Social home page Coder Social logo

helpfulrobot / camfindlay-silverstripe-wordpressimport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from camfindlay/silverstripe-wordpressimport

0.0 2.0 0.0 35 KB

Helps migrate from Wordpress blog to SilverStripe by importing a XML export file.

License: Other

PHP 99.51% Scheme 0.49%

camfindlay-silverstripe-wordpressimport's Introduction

#Wordpress Import Module Build Status

##Maintainer Contacts

  • Cam Findlay (Nickname: camfindlay) <cam (at) silverstripe.com>
  • Damian Mooyman (Nickname: tractorcow) <damian (dot) mooyman (at) gmail (dot) com>

##Requirements

  • mod_rewrite (optional, if you need to cater for old incoming links and are using Apache)
  • SilverStripe Framework & CMS 3.1.x
  • silverstripe/blog 1.*
  • silverstripe/comments

##Installation Instructions

composer require camfindlay/silverstripe-wordpressimport

This module currently it only works with silverstripe/blog 1.x.

WORKAROUND: If you have installed silverstripe 2.x, downgrade to 1.x:

composer require silverstripe/blog 1.x

After importing the wordpress .xml file you can safely upgrade to silverstripe/blog 2.x again:

composer require silverstripe/blog 2.x

NOTE: After upgrading from blog 1.x to 2.x don't forget to run dev/tasks/BlogMigrationTask as indicated in the silverstripe/blog documentation.

WARNING: downgrade was only tested on an empty blog, if you have already entered any content on your blog, this may have some unexpected results!

###Usage Overview It will change any links to uploaded images and files in your posts that follow the convention "http://yourdomain.com/wp-content/uploads/yyyy/mm/filesname.jpg" to "http://yourdomain.com/assets/Uploads/yyyy/mm/filesname.jpg" which allows you to migrate you uploaded images and files over to SilverStripe assets folder while maintaining images in your posts.

###Optional Rewriting Add this in your .htaccess file to port old wordpress posts in the form /yyyy/mm/name-of-post/ to new SilverStripe /blog/name-of-post convention.

RewriteRule ^[0-9]{4}/[0-9]{2}/(.*)$ /blog/$1 [R,L]

##Known issues:

  1. Content can lose a lot of the formatting coming from Wordpress.
  2. Perhaps parsing the content through a nl2br might help?
  3. Image captions need to be catered for and styled otherwise they end up looking like un-parse shortcodes.
  4. Currently only works with silverstripe/blog 1.x.

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.