Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Migrating Self-Hosted WordPress

Migrating Self-Hosted WordPress

Have an action plan for every step!
When you fail to plan you plan to fail!
Thoroughly test front and back-end!
The Hosts file loves you and wants to be your friend!
Only make DNS changes after completely tested!

Suzette Franck

May 22, 2013
Tweet

More Decks by Suzette Franck

Other Decks in Technology

Transcript

  1. Migrating Self-hosted WordPress Suzette Franck SoCal WordPress Users’ Meetup Tuesday,

    May 21, 2013 Media Temple // 8520 National Blvd. Culver City, CA 90232 / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple
  2. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Who Am I?
  3. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Suzette Franck with a “ck” ★(mt) Media Temple WordPress Evangelist ★18+ Years Coding & Web Development ★Regular Speaker: WordCamps & Meetups ★Reg. Contributor on WPwatercooler.com ★Blogs frequently at: suzettefranck.com ★Twitter: @mt_Suzette ★Slides: speakerdeck.com/suzettefranck
  4. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Suzette Franck with a “ck” ★5 year-old Chihuahua mix “Puppy” ★Using WordPress Since 2008
  5. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple What We Will Cover
  6. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Transferring: When and What You Need ★Creating a Full Manual Backup ★Duplicating Site on New Server/Host ★Testing Before Go-live & Hosts File Main Topics
  7. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Migrating Self-Hosted WordPress (.org to .org)
  8. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Moving to same or different domain, subdomain or subdirectory name ★Transfer between same or different server/host ★Transfer staging site to a live production site ★Duplicate site as a starting point for another site ★Duplicate site to test core upgrades, plugins, and new code ★Switching hosting providers or changing accounts When Would You Need to Transfer?
  9. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Plugin such as Backup Buddy ★Bash, WP-CLI, RSYNC ★WordPress Importer ★Importing RSS feed ★Recreating from scratch (not recommended) ★Manual database dump w/FTP ★Some hosts will handle migrations for Free or Fee Options for Transferring
  10. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Check new server for WordPress requirements: http://wordpress.org/about/requirements/ ★Ability to administer databases on old & new sites ★Ability to update DNS ★Credentials for old and new locations Before You Begin: Deal Breakers
  11. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Credentials Half of getting there is getting access...
  12. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Current URL ★WordPress admin credentials ★SFTP/FTP credentials ★Current file path ★Hosting control panel credentials Information from Old Site
  13. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★New URL ★IP address ★SFTP/FTP credentials ★New file path ★Hosting control panel credentials Information from New Site
  14. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Making a Backup Downloading Files and Exporting Database
  15. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Backing Up Files .html .php .css .js .gif .jpg .png
  16. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Copy all folders and files to a folder on your desktop Download all files via SFTP
  17. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Backing Up Database The Old Faithful Way (Manual)
  18. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★View wp-config.php for database credentials ★Log into PHPMyAdmin or manage databases ★Select the database ★Click on Export ★Save SQL file on the folder on your desktop ★Open SQL in text editor ★Search and replace old URL w/new URL ★Save copy of revised SQL file Export & Prepare MySQL Database
  19. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★(1) View wp-config.php for database credentials Log into PHPMyAdmin ★(2) Log into PHPMyAdmin
  20. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Select the database on left side Select the Database ★(2) Log into PHPMyAdmin
  21. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Select the Export tab, then Go Export the MySQL Database
  22. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Open SQL file in any text editor ★Search for old domain, replace with new domain Prepare SQL File for Import
  23. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Save SQL file with a different filename ★Does not address serialization of strings ★May cause migration issues Save Copy of SQL File
  24. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Backing Up Database New Improved Way (Plugin)
  25. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Install plugin (WP Migrate DB Pro) ★Configure before and after settings ★Save SQL file to desktop folder Export & Prepare MySQL Database
  26. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple WP Migrate DB Pro by Brad Touesnard
  27. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Why Use WP Migrate DB Pro? ★Reduces migration issues ★Easy to export DB from WP admin ★Reliable, tried and true (over 200 sites) ★Can sync with local deelopment copy via Pull/Push ★Author Brad Touesnard has 9 plugins in WP Repo ★Zombie references (Delicious Brains) are always good ★Takes 8 steps down to 3 and does them better!
  28. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Easy Configuration
  29. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Save Copy of File ★Addresses serialization of strings ★Can save settings as a profile to reuse later
  30. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Creating Your New Site Upload Files and Import Database
  31. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Uploading Files .html .php .css .js .gif .jpg .png
  32. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Copy all folders and files up to new site, except .htaccess Upload all files via SFTP
  33. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Creating and Importing Database Manually using PHPMyAdmin
  34. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Log into PHPMyAdmin or manage databases ★Create a new database ★Create a new database user ★Assign rights to Read/Write to database ★Select the database ★Click on Import ★Upload prepared SQL file ★Edit wp-config.php with new databases credentials ★Save, upload, test! Create and Import MySQL Database
  35. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Will vary depending on hosting ★Record database name Create a new MySQL database
  36. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Record database username and password Create a new MySQL database user
  37. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Must have read/write access for the new database Assign rights to new MySQL database user
  38. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Open wp-config.php in any text editor ★Enter new credentials ★Save and upload file Edit wp-config.php w/New Credentials
  39. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Log into PHPMyAdmin ★Log into PHPMyAdmin w/new credentials
  40. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Select the database on left side Select the Database ★(2) Log into PHPMyAdmin
  41. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Select the Import tab, then Choose File and upload Import the MySQL Database
  42. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Import will take a few minutes depending on database size Import the MySQL Database
  43. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Test thoroughly before changing DNS Duplication Complete!
  44. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Prepropagation Testing DO NOT DO THIS If You Love High Danger
  45. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple The Magical Hosts File Change DNS Only for Your Machine
  46. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★PC: http://goo.gl/doXH3 ★MAC: http://goo.gl/Ggpph Locate and Update Hosts File
  47. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Enter the IP of the new site ★Enter the domain name Update Hosts File
  48. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Flush Your DNS PC and MAC
  49. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★At command prompt: ipconfig /flushdns PC: Flush DNS
  50. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Terminal for Mac OSX 10.7 & 10.8: sudo killall -HUP mDNSResponder ★Terminal for Mac OSX 10.5 & 10.6: dscacheutil -flushcache ★Terminal for Mac OSX 10.4: lookupd -flushcache MAC: Flush DNS
  51. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Hard Refresh Your Browser
  52. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★PC: Ctrl + F5 or just F5 ★MAC: Command + R Hard Refresh Your Browser
  53. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple What To Test?
  54. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Appearance > Widgets ★Appearance > Menus ★Contact Form 7 > Forms ★Other Plugin Configurations (s2member, shopping carts, tablepress) ★Add /Edit CPTs ★Upload an image ★Install a new plugin ★Install a new theme Back-end Functionality Log into wp-admin & look for missing information and permission errors
  55. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Images and styles loading properly (site/home url) ★Subpages are loading (recreate .htaccess) ★Blog, archive, and single posts display properly ★Verify all navigation and drop-downs works as expected ★Test advanced features (e-Commerce, directories, forms) ★Cross-browser and mobile device compatibility Front-end Functionality Log out of wp-admin & look for funky styles, missing images and subpages, broken applications
  56. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Migration Tips My failures are your gains!
  57. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Never go live on Friday or before a Holiday ★Never go live at end of day ★Aim to go live Tuesday morning ★Avoid desynchronization, do backup just before transfer ★Test thoroughly after changing hosts file ★Change DNS after thoroughly testing ★Take DNS propagation into account ★Set TTL to 5 minutes 3 days before go-live ★Make sure there is a redirect or record for www ★Is email migrating? If so, make a plan! Migration Considerations
  58. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple In Conclusion...
  59. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple ★Have an action plan for every step! ★When you fail to plan you plan to fail! ★Thoroughly test front and back-end! ★The Hosts file loves you and wants to be your friend! ★Only make DNS changes after completely tested! Takeaways
  60. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Now this is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning. -Winston Churchill
  61. Media Temple // 8520 National Blvd. Culver City, CA 90232

    / 877-578-4000 / mediatemple.net / @mt_Suzette © 2013 (mt) Media Temple Questions? Suzette Franck [email protected] https://speakerdeck.com/suzettefranck @mt_Suzette