On the Move, Migrations Made Simple

60
On The Move Migrations Made Simple Jonathan Perlman - @jpurpleman WordCamp Rochester 2016 http://jpurpleman.ca/

Transcript of On the Move, Migrations Made Simple

Page 1: On the Move, Migrations Made Simple

On The MoveMigrations Made Simple

Jonathan Perlman - @jpurpleman

WordCamp Rochester 2016

http://jpurpleman.ca/

Page 2: On the Move, Migrations Made Simple

What’s covered…

October 15, 2016WordCamp Rochester

• WordPress.com to self-hosted

• DNS

• Transferring files and data

• Transferring via duplicator

• Transferring data many times

• Check your site

• Resources

Page 3: On the Move, Migrations Made Simple

About me

Developer14 years

Teacher9 years

Trekie Since

ST:TNG

October 15, 2016WordCamp Rochester

Page 4: On the Move, Migrations Made Simple

October 15, 2016WordCamp Rochester

ENGAGE!

Page 5: On the Move, Migrations Made Simple

WordPress.comto

WordPress.org

October 15, 2016WordCamp Rochester

Page 6: On the Move, Migrations Made Simple

What’s the difference?

October 15, 2016WordCamp Rochester

WordPress.org / Self Hosted WordPress.com

Cost Variable, $5 - $20,000 Free

Themes Your choice, no restrictions Limited customizations

Plugins Your choice, no restrictions Limited, no uploading

Control Full control Limited control

Maintenance You manage / You pay for it Automattic does it for you

Backups You manage / You pay for it Automattic does it for you

SSLSecurity

You manage / You pay for it Automattic gives it for you

Page 7: On the Move, Migrations Made Simple

Export

October 15, 2016WordCamp Rochester

Page 8: On the Move, Migrations Made Simple

Export

October 15, 2016WordCamp Rochester

Page 9: On the Move, Migrations Made Simple

Import

October 15, 2016WordCamp Rochester

Page 10: On the Move, Migrations Made Simple

Import

October 15, 2016WordCamp Rochester

Page 11: On the Move, Migrations Made Simple

DNSDomain Name System

October 15, 2016WordCamp Rochester

Page 12: On the Move, Migrations Made Simple

Name Servers

October 15, 2016WordCamp Rochester

Page 13: On the Move, Migrations Made Simple

DNS

October 15, 2016WordCamp Rochester

Page 14: On the Move, Migrations Made Simple

Override your DNS• Modify as Administrator

• Windows

o c:\windows\system32\drivers\etc\hosts

• Apple

o /etc/hosts

• http://www.howtogeek.com/howto/27350/

beginner-geek-how-to-edit-your-hosts-file/

• https://www.tekrevue.com/tip/edit-hosts-file-mac-os-x/

• https://www.whatsmydns.net/

October 15, 2016WordCamp Rochester

Page 15: On the Move, Migrations Made Simple

Windows

October 15, 2016WordCamp Rochester

• Using the Windows Logo use the Start Menu /

Screen and search for Notepad

• Right click Notepad and “Run as Administrator”

c:\windows\system32\drivers\etc\hosts

Page 16: On the Move, Migrations Made Simple

Adding the entry

October 15, 2016WordCamp Rochester

Page 17: On the Move, Migrations Made Simple

Apple• Use the app called GasMask from Clockwise

• Download

o http://clockwise.ee/

• Tutorial

o http://www.gilsmethod.com/how-to-edit-hosts-

files-in-mac-os-x-without-the-headaches

October 15, 2016WordCamp Rochester

Page 18: On the Move, Migrations Made Simple

Transferring Files and Data

October 15, 2016WordCamp Rochester

Page 19: On the Move, Migrations Made Simple

What are we moving?

PHP / HTML / CSS

WordPress Core

Plugins

Themes

JPG, PNG, GIF, DOC, PDF

Media

POSTS

PAGES

SQL Database

October 15, 2016WordCamp Rochester

Page 20: On the Move, Migrations Made Simple

How to migrate it?

With WordPress Plugins Without WordPress

October 15, 2016WordCamp Rochester

• Duplicator

• Backup Buddy

• WP Migrate DB Pro

• File Transfer Program

o FileZilla

o CyberDuck

o Transmit

• Database client

o phpMyAdmin

o HiediSQL

Page 21: On the Move, Migrations Made Simple

File Transfer• Don’t use FTP!

• Start SFTP program

• Download the files from the web accessible area

o htdocs, public_html, www

• Put the files in the local hard drive

o Desktop

o c:\wamp\www\wordpress

October 15, 2016WordCamp Rochester

Page 22: On the Move, Migrations Made Simple

FTP – Upload and Download

October 15, 2016WordCamp Rochester

Page 23: On the Move, Migrations Made Simple

Database

• phpMyAdmin, HeidiSQL, Navicat, MySql Workbench

October 15, 2016WordCamp Rochester

Page 24: On the Move, Migrations Made Simple

October 15, 2016WordCamp Rochester

Page 25: On the Move, Migrations Made Simple

October 15, 2016WordCamp Rochester

Page 26: On the Move, Migrations Made Simple

October 15, 2016WordCamp Rochester

Page 27: On the Move, Migrations Made Simple

Configure wp-config.php

October 15, 2016WordCamp Rochester

Page 28: On the Move, Migrations Made Simple

Configure wp-config.php• Rename wp-config-sample.php to wp-config.php

• Edit wp-config.php with NotePad++, by right clicking the file.

• Change lines 23, 26, 29

/** The name of the database for WordPress */

define('DB_NAME', 'wordpress');

/** MySQL database username */

define('DB_USER', 'root');

/** MySQL database password */

define('DB_PASSWORD', '');

/** MySQL hostname */

define('DB_HOST', 'localhost');

October 15, 2016WordCamp Rochester

Page 29: On the Move, Migrations Made Simple

Change WordPress Location

October 15, 2016WordCamp Rochester

• https://interconnectit.com/products/

search-and-replace-for-wordpress-databases/

Page 30: On the Move, Migrations Made Simple

Transfer Via Duplicator

October 15, 2016WordCamp Rochester

Page 31: On the Move, Migrations Made Simple

http://wpcourse.dawsoncollege.qc.ca/wp4000

October 15, 2016WordCamp Rochester

Page 32: On the Move, Migrations Made Simple

Install Duplicator

October 15, 2016WordCamp Rochester

Page 33: On the Move, Migrations Made Simple

Create New

October 15, 2016WordCamp Rochester

Page 34: On the Move, Migrations Made Simple

Create New

October 15, 2016WordCamp Rochester

Page 35: On the Move, Migrations Made Simple

Storage Config

October 15, 2016WordCamp Rochester

Page 36: On the Move, Migrations Made Simple

Archive Config

October 15, 2016WordCamp Rochester

Page 37: On the Move, Migrations Made Simple

Installer Config

October 15, 2016WordCamp Rochester

Page 38: On the Move, Migrations Made Simple

Scan Complete

October 15, 2016WordCamp Rochester

Page 39: On the Move, Migrations Made Simple

Building Package

October 15, 2016WordCamp Rochester

Page 40: On the Move, Migrations Made Simple

Package Complete

October 15, 2016WordCamp Rochester

Page 41: On the Move, Migrations Made Simple

See downloaded files

October 15, 2016WordCamp Rochester

Page 42: On the Move, Migrations Made Simple

Create wordpress folder

October 15, 2016WordCamp Rochester

Page 43: On the Move, Migrations Made Simple

Login to the database• Go to http://localhost/phpmyadmin

October 15, 2016WordCamp Rochester

Page 44: On the Move, Migrations Made Simple

Create a new database

1 Create a New

database

2 Give the database

a name: wordpress

o Lowercase

o No spaces – use

underscores

o No special characters

October 15, 2016WordCamp Rochester

Page 45: On the Move, Migrations Made Simple

install.php

October 15, 2016WordCamp Rochester

Page 46: On the Move, Migrations Made Simple

Installer.php

October 15, 2016WordCamp Rochester

Page 47: On the Move, Migrations Made Simple

Processing Files

October 15, 2016WordCamp Rochester

Page 48: On the Move, Migrations Made Simple

Update Files and Database

October 15, 2016WordCamp Rochester

Page 49: On the Move, Migrations Made Simple

Test Site!

October 15, 2016WordCamp Rochester

Page 50: On the Move, Migrations Made Simple

http://localhost/wordpress

October 15, 2016WordCamp Rochester

Page 51: On the Move, Migrations Made Simple

Transferring datamany times

October 15, 2016WordCamp Rochester

Page 52: On the Move, Migrations Made Simple

Process

Development

Production

October 15, 2016WordCamp Rochester

Page 53: On the Move, Migrations Made Simple

https://deliciousbrains.com

October 15, 2016WordCamp Rochester

Page 54: On the Move, Migrations Made Simple

Check your site…

October 15, 2016WordCamp Rochester

Page 55: On the Move, Migrations Made Simple
Page 56: On the Move, Migrations Made Simple

White screen of death?• Update all plugins, themes, and WP core

• Check php version changes

• Deactivate all plugins

• Deactivate the current theme - switch to 2015

• Reset permalinks

• Check .htaccess file – Compare against the codex

• index.html & index.php

• .maintenance

October 15, 2016WordCamp Rochester

Page 57: On the Move, Migrations Made Simple

White screen of death?• Modify wp-config.php - add:

o define(“WP_DEBUG”, true);

o define( “WP_DEBUG_DISPLAY”, true );

• Check the error log

o Accessible via STFP

o CPanel

October 15, 2016WordCamp Rochester

Page 58: On the Move, Migrations Made Simple

Resources

October 15, 2016WordCamp Rochester

Page 59: On the Move, Migrations Made Simple

Resources• https://codex.wordpress.org/Moving_WordPress

• http://www.jasonbobich.com/web-design/

moving-wordpress-to-a-new-server/

October 15, 2016WordCamp Rochester

Page 60: On the Move, Migrations Made Simple

October 15, 2016WordCamp Rochester