Skip to content

Generic Wordpress importer? #57

Closed
Closed

Description

@EvanK

Rather than work on an upgrade path specifically for Genesis, I'm thinking it would be preferable to build a generic importer to work with any existing wordpress site. This would be a proper successor to Genesis' "old" stage.

It should:

  • fetch all files for the following (preferably via SSH but falling back to FTP when necessary, or even a local archive of the doc root?)
    • uploads
    • plugins
    • themes
  • import an existing db via mysql (with/out SSH tunnel), falling back to a prepared sql dump
  • start the evolution generator and let the user follow the usual prompts, then drop in all the above

Thoughts?

Activity

  1. jimmynotjim commented on May 22, 2015

    @jimmynotjim
    Contributor

    Would love this for my personal projects. Porting non-Genesis sites was always kinda tricky.

  2. ericrasch commented on May 27, 2015

    @ericrasch
    Contributor

    Funny enough, I find myself wanting to use Genesis for non-WP projects, as well. I really like the environment setup, but sometimes don't need WP, though Genesis required a wp-config.php file to be present.

  3. jimmynotjim commented on May 27, 2015

    @jimmynotjim
    Contributor

    @ericrasch ha! I've thought that too. Just having the simplicity of the packaged environments and commands to work with each makes it awesome to work with.

  4. EvanK commented on May 28, 2015

    @EvanK
    ContributorAuthor

    After some discussion, I'm thinking the best solution here would consist of two pieces:

    1. a wordpress plugin to install on the old site that, from an admin page, initiates a download of the wp-content and dumped db (all packaged up as a single zip/tar/gz archive)
    2. a ./bin/import script in the generated Evolution site that, given the above archive, extracts and installs any plugins, themes, uploads, and sql data into the current Evolution site

    Now...to dive into the wordpress codex!

  5. EvanK commented on Jun 13, 2015

    @EvanK
    ContributorAuthor

    I've got the export bit working (see the plugin: evolution/wordpress-plugin-cambrian@eb9e5cfca4)!

    Now to write an import utility on the other side :D

  6. EvanK commented on Jul 13, 2015

    @EvanK
    ContributorAuthor

    If you'd like to help test the export/import process, the first step is to install the Cambrian Explosion plugin in the existing Wordpress site that you'd like to port over. Activate and run the plugin, and it will download a zipfile of your site content.

    Next, you'll need to pull the importer branch down to your local Yeoman cache:

    # remove any existing evolution from yeoman cache
    mkdir -p ~/.cache/yeoman/evolution/wordpress
    rm -rf ~/.cache/yeoman/evolution/wordpress/v1.*
    
    # clone latest evolution into yeoman cache
    git clone https://github.com/evolution/wordpress.git ~/.cache/yeoman/evolution/wordpress/v1.1.3
    
    # cd to cloned codebase, checkout importer branch and install npm deps
    cd ~/.cache/yeoman/evolution/wordpress/v1.1.3
    git checkout 57-cambrian-importer
    npm install

    Finally, you'll want to generate a new Evolution site into which you'll import the zipfile of your old site's content:

    # create and cd to directory for new Evolution site
    mkdir ~/Sites/SomeTestSite.com
    cd ~/Sites/SomeTestSite.com
    
    # generate and prepare a new site
    yo evolve wordpress
    cp -r ~/.cache/yeoman/evolution/wordpress/v1.1.3/ ./bower_components/evolution-wordpress/
    vagrant up
    
    # invoke the importer
    ./bin/import
  7. EvanK commented on Jul 13, 2015

    @EvanK
    ContributorAuthor

    Aaaand I forgot a step, before the vagrant up:

    # copy checked out evolution branch to generated site's bower components
    cp -r ~/.cache/yeoman/evolution/wordpress/v1.1.3/ ~/Sites/SomeTestSite.com/bower_components/evolution-wordpress/
  8. jimmynotjim commented on Jul 18, 2015

    @jimmynotjim
    Contributor

    Sweet! Going to give this a shot this weekend and will report back.

  9. EvanK commented on Jul 31, 2015

    @EvanK
    ContributorAuthor

    Closing this issue, please see #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions