Upload
kvignos
View
1.001
Download
1
Embed Size (px)
DESCRIPTION
Migrating 17 WordPress Blogs on WIRED.com into one WordPress Install
Citation preview
Migra&ng 17 WP blogs on WIRED.com
into one WordPress Install
Kathleen Vignos
@WordCampSF 2014
Kathleen Vignos @kathleencodes@WordCampSF 2014
Issue
WIRED: Magazine since 1993
Kathleen Vignos @kathleencodes@WordCampSF 2014
WIRED: Website since 1994
Kathleen Vignos @kathleencodes@WordCampSF 2014
We Got 99 Problems...
Old CMSFlat Files
20 Years of Digital Content
External Homepage Curator App
Third-‐Party Editorial Workflow App
Cross Posts and Redirects
35+ Blogs
Kathleen Vignos @kathleencodes@WordCampSF 2014
WordPress Problems: Separate Installs, Themes, Plugins
Kathleen Vignos @kathleencodes@WordCampSF 2014
WordPress Problems: Upgrades and Deployments
Kathleen Vignos @kathleencodes@WordCampSF 2014
WordPress Problems: 35x2 Separate Logins
Kathleen Vignos @kathleencodes@WordCampSF 2014
WordPress Problems: Create User 35x2 Times
Kathleen Vignos @kathleencodes@WordCampSF 2014
Kathleen Vignos @kathleencodes@WordCampSF 2014
API Problems: RSS Everywhere
Kathleen Vignos @kathleencodes@WordCampSF 2014
The Solu&on: Project Pangea
Selling Points • Precursor to full-‐scale redesign • BeCer site performance • Faster future development
!Project Scope
• Migrate 17 acHve blogs only • NO DESIGN CHANGES • Homepage to PHP, schedule in WP • Manage edit workflow in WP
Kathleen Vignos @kathleencodes@WordCampSF 2014
WordPress Migra&on Steps
1 2 3 4 5
Purge Data
Update Taxonomies
Export, Import
Sanity Checks
Add Helpers
Kathleen Vignos @kathleencodes@WordCampSF 2014
• Trash • Revisions • Comments, trackbacks, pingbacks • Links • Transients • Authors with no posts • Categories and tags with 0, 1, 2 posts
Migra&on: Purge Data
Kathleen Vignos @kathleencodes@WordCampSF 2014
• Add blog category for each post • Convert categories to tags • ShiY remaining categories to subcategories • Use wp-‐cli http://wp-cli.org
Migra&on: Taxonomy Updates
Kathleen Vignos @kathleencodes@WordCampSF 2014
Migra&on: Export/Import with WordPress
Kathleen Vignos @kathleencodes@WordCampSF 2014
Migra&on: Export/Import, Custom Scripts
Why we needed custom scripts: !
1. WP Export/Import Limits • Max import 20MB (configurable) • Large export can trigger PHP memory limits
2. DuplicaHon of authors across blogs 3. Mapping posts to new categories 4. Storing old post ID in post meta
Kathleen Vignos @kathleencodes@WordCampSF 2014
Migra&on: Export/Import, Custom Scripts
Our migraHon script process: !
1. Nightly backup of producHon DB to S3 2. gzip pulled down from S3 to a local DB 3. Scripts run against local DB 4. DB saved back to S3 5. Test, sanity checks
Kathleen Vignos @kathleencodes@WordCampSF 2014
Can’t manually test 100K+ posts, so… !
• Script to check data mapping • Script to check data integrity
Migra&on: Sanity Checks
Kathleen Vignos @kathleencodes@WordCampSF 2014
✓ All old posts in new table ✓ Post content matches ✓ Post aCachments map to parent post ✓ Post terms carried over
hCp://wrd.cm/pangea-‐data-‐mapping-‐gist
Migra&on: Sanity Checks, Mapping
Check data mapping from old site to new
wp_gadgetlab_posts LEFT OUTER JOIN wp_posts
Kathleen Vignos @kathleencodes@WordCampSF 2014
✓No uncategorized (homeless) posts ✓No phantom authors ✓No duplicate posts ✓No orphans: postmeta, aCachments, galleries
hCp://wrd.cm/pangea-‐data-‐integrity-‐gist
Migra&on: Sanity Checks, Integrity
Check that data on new site makes sense
Kathleen Vignos @kathleencodes@WordCampSF 2014
• New custom roles and capabiliHes Ghost, Top Editor, Producer !
• Restrict Categories plugin: hCps://wordpress.org/plugins/restrict-‐categories/ !
• Set author default category (custom user meta)
Migra&on: Helpers
Kathleen Vignos @kathleencodes@WordCampSF 2014
The Results: Project Pangea
Old CMSFlat Files
20 Years of Digital Content
External Homepage Curator App
Third-‐Party Editorial Workflow App
Cross Posts and Redirects
35+ Blogs
1 WP Install
Kathleen Vignos @kathleencodes@WordCampSF 2014
The Results: Project Pangea
✓Easier plugin and widget management
Kathleen Vignos @kathleencodes@WordCampSF 2014
The Results: Project Pangea
✓Easier user administration
Kathleen Vignos @kathleencodes@WordCampSF 2014
✓No more RSS needed for aggregating posts ✓One single RESTful API
The Results: Project Pangea
Kathleen Vignos @kathleencodes@WordCampSF 2014
The Results: Project Pangea
✓Automated deployments with Jenkins and git tags
Kathleen Vignos @kathleencodes@WordCampSF 2014
✓Achievement of happiness and world peace
The Results: Project Pangea
Kathleen Vignos @kathleencodes@WordCampSF 2014
Thank You! !
Download slides: hCp://wrd.cm/wcsf2014-‐kv
hCp://wrd.cm/jobs
is hiring!