Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Migra&ng 
17 
WP 
blogs 
on 
WIRED.com 
into 
one 
WordPress 
Install 
Kathleen 
Vignos 
@WordCampSF 
2014
Issue 
Kathleen 
Vignos 
WIRED: 
Magazine 
since 
1993 
@WordCampSF 
2014 @kathleencodes
Kathleen 
Vignos 
WIRED: 
Website 
since 
1994 
@WordCampSF 
2014 @kathleencodes
Cross 
Posts 
and 
Redirects 
Kathleen 
Vignos 
We 
Got 
99 
Problems... 
@WordCampSF 
2014 @kathleencodes 
Flat 
Files Ol...
WordPress 
Problems: 
Separate 
Installs, 
Themes, 
Plugins 
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
WordPress 
Problems: 
Upgrades 
and 
Deployments 
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
WordPress 
Problems: 
35x2 
Separate 
Logins 
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
WordPress 
Problems: 
Create 
User 
35x2 
Times 
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
Kathleen 
Vignos 
API 
Problems: 
RSS 
Everywhere 
@WordCampSF 
2014 @kathleencodes
Selling 
Points 
• 
Precursor 
to 
full-­‐scale 
redesign 
• 
BeCer 
site 
performance 
• 
Faster 
future 
development 
! ...
1 2 3 4 5 
Kathleen 
Vignos 
WordPress 
Migra&on 
Steps 
@WordCampSF 
2014 @kathleencodes 
Purge 
Data 
Update 
Taxonomies...
Kathleen 
Vignos 
Migra&on: 
Purge 
Data 
• 
Trash 
• 
Revisions 
• 
Comments, 
trackbacks, 
pingbacks 
• 
Links 
• 
Trans...
Migra&on: 
Taxonomy 
Updates 
• 
Add 
blog 
category 
for 
each 
post 
• 
Convert 
categories 
to 
tags 
• 
ShiY 
remainin...
Migra&on: 
Export/Import 
with 
WordPress 
Kathleen 
Vignos 
@WordCampSF 
2014 @kathleencodes
Migra&on: 
Export/Import, 
Custom 
Scripts 
• 
Max 
import 
20MB 
(configurable) 
• 
Large 
export 
can 
trigger 
PHP 
mem...
Migra&on: 
Export/Import, 
Custom 
Scripts 
Our 
migraHon 
script 
process: 
! 
1. 
Nightly 
backup 
of 
producHon 
DB 
to...
Kathleen 
Vignos 
Migra&on: 
Sanity 
Checks 
Can’t 
manually 
test 
100K+ 
posts, 
so… 
! 
• 
Script 
to 
check 
data 
map...
Migra&on: 
Sanity 
Checks, 
Mapping 
Check 
data 
mapping 
from 
old 
site 
to 
new 
wp_gadgetlab_posts LEFT OUTER JOIN wp...
Migra&on: 
Sanity 
Checks, 
Integrity 
Check 
that 
data 
on 
new 
site 
makes 
sense 
Kathleen 
Vignos 
@WordCampSF 
2014...
Migra&on: 
Helpers 
hCps://wordpress.org/plugins/restrict-­‐categories/ 
! 
• 
Set 
author 
default 
category 
(custom 
us...
Cross 
Posts 
and 
Redirects 
Kathleen 
Vignos 
The 
Results: 
Project 
Pangea 
@WordCampSF 
2014 @kathleencodes 
Flat 
Fi...
✓Easier plugin and widget management 
Kathleen 
Vignos 
The 
Results: 
Project 
Pangea 
@WordCampSF 
2014 @kathleencodes
Kathleen 
Vignos 
The 
Results: 
Project 
Pangea 
✓Easier user administration 
@WordCampSF 
2014 @kathleencodes
The 
Results: 
Project 
Pangea 
✓No more RSS needed for aggregating posts 
✓One single RESTful API 
Kathleen 
Vignos 
@Wor...
✓Automated deployments with Jenkins and git tags 
Kathleen 
Vignos 
The 
Results: 
Project 
Pangea 
@WordCampSF 
2014 @kat...
The 
Results: 
Project 
Pangea 
of 
happiness 
and 
world 
peace 
Kathleen 
Vignos 
✓Achievement 
@WordCampSF 
2014 @kathl...
Kathleen 
Vignos 
Thank 
You! 
! 
Download 
slides: 
hCp://wrd.cm/wcsf2014-­‐kv 
is hiring! 
hCp://wrd.cm/jobs 
@WordCampS...
Upcoming SlideShare
Loading in …5
×

WordCamp SF 2014 - WIRED Migration Project

1,999 views

Published on

Migrating 17 WordPress Blogs on WIRED.com into one WordPress Install

Published in: Technology
  • Login to see the comments

WordCamp SF 2014 - WIRED Migration Project

  1. 1. Migra&ng 17 WP blogs on WIRED.com into one WordPress Install Kathleen Vignos @WordCampSF 2014
  2. 2. Issue Kathleen Vignos WIRED: Magazine since 1993 @WordCampSF 2014 @kathleencodes
  3. 3. Kathleen Vignos WIRED: Website since 1994 @WordCampSF 2014 @kathleencodes
  4. 4. Cross Posts and Redirects Kathleen Vignos We Got 99 Problems... @WordCampSF 2014 @kathleencodes Flat Files Old CMS 20 Years of Digital Content External Homepage Curator App Third-­‐Party Editorial Workflow App 35+ Blogs
  5. 5. WordPress Problems: Separate Installs, Themes, Plugins Kathleen Vignos @WordCampSF 2014 @kathleencodes
  6. 6. WordPress Problems: Upgrades and Deployments Kathleen Vignos @WordCampSF 2014 @kathleencodes
  7. 7. WordPress Problems: 35x2 Separate Logins Kathleen Vignos @WordCampSF 2014 @kathleencodes
  8. 8. WordPress Problems: Create User 35x2 Times Kathleen Vignos @WordCampSF 2014 @kathleencodes
  9. 9. Kathleen Vignos @WordCampSF 2014 @kathleencodes
  10. 10. Kathleen Vignos API Problems: RSS Everywhere @WordCampSF 2014 @kathleencodes
  11. 11. 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 The Solu&on: Project Pangea @WordCampSF 2014 @kathleencodes
  12. 12. 1 2 3 4 5 Kathleen Vignos WordPress Migra&on Steps @WordCampSF 2014 @kathleencodes Purge Data Update Taxonomies Export, Import Sanity Checks Add Helpers
  13. 13. Kathleen Vignos Migra&on: Purge Data • Trash • Revisions • Comments, trackbacks, pingbacks • Links • Transients • Authors with no posts • Categories and tags with 0, 1, 2 posts @WordCampSF 2014 @kathleencodes
  14. 14. Migra&on: Taxonomy Updates • Add blog category for each post • Convert categories to tags • ShiY remaining categories to subcategories • Use wp-­‐cli Kathleen Vignos http://wp-cli.org @WordCampSF 2014 @kathleencodes
  15. 15. Migra&on: Export/Import with WordPress Kathleen Vignos @WordCampSF 2014 @kathleencodes
  16. 16. Migra&on: Export/Import, Custom Scripts • Max import 20MB (configurable) • Large export can trigger PHP memory limits Kathleen Vignos Why we needed custom scripts: ! 1. WP Export/Import Limits 2. DuplicaHon of authors across blogs 3. Mapping posts to new categories 4. Storing old post ID in post meta @WordCampSF 2014 @kathleencodes
  17. 17. 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 @WordCampSF 2014 @kathleencodes
  18. 18. Kathleen Vignos Migra&on: Sanity Checks Can’t manually test 100K+ posts, so… ! • Script to check data mapping • Script to check data integrity @WordCampSF 2014 @kathleencodes
  19. 19. Migra&on: Sanity Checks, Mapping Check data mapping from old site to new wp_gadgetlab_posts LEFT OUTER JOIN wp_posts Kathleen Vignos @WordCampSF 2014 @kathleencodes ✓ 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
  20. 20. Migra&on: Sanity Checks, Integrity Check that data on new site makes sense Kathleen Vignos @WordCampSF 2014 @kathleencodes ✓No uncategorized (homeless) posts ✓No phantom authors ✓No duplicate posts ✓No orphans: postmeta, aCachments, galleries hCp://wrd.cm/pangea-­‐data-­‐integrity-­‐gist
  21. 21. Migra&on: Helpers hCps://wordpress.org/plugins/restrict-­‐categories/ ! • Set author default category (custom user meta) Kathleen Vignos • New custom roles and capabiliHes Ghost, Top Editor, Producer ! • Restrict Categories plugin: @WordCampSF 2014 @kathleencodes
  22. 22. Cross Posts and Redirects Kathleen Vignos The Results: Project Pangea @WordCampSF 2014 @kathleencodes Flat Files Old CMS 20 Years of Digital Content External Homepage Curator App Third-­‐Party Editorial Workflow App 1 35+ WP Install Blogs
  23. 23. ✓Easier plugin and widget management Kathleen Vignos The Results: Project Pangea @WordCampSF 2014 @kathleencodes
  24. 24. Kathleen Vignos The Results: Project Pangea ✓Easier user administration @WordCampSF 2014 @kathleencodes
  25. 25. The Results: Project Pangea ✓No more RSS needed for aggregating posts ✓One single RESTful API Kathleen Vignos @WordCampSF 2014 @kathleencodes
  26. 26. ✓Automated deployments with Jenkins and git tags Kathleen Vignos The Results: Project Pangea @WordCampSF 2014 @kathleencodes
  27. 27. The Results: Project Pangea of happiness and world peace Kathleen Vignos ✓Achievement @WordCampSF 2014 @kathleencodes
  28. 28. Kathleen Vignos Thank You! ! Download slides: hCp://wrd.cm/wcsf2014-­‐kv is hiring! hCp://wrd.cm/jobs @WordCampSF 2014 @kathleencodes

×