View
542
Download
2
Category
Preview:
Citation preview
On The MoveMigrations Made Simple
Jonathan Perlman - @jpurpleman
WordCamp Montreal 2016
http://jpurpleman.ca/
What’s covered…
July 18, 2016WordCamp Montreal
• Wordpress.com to self-hosted
• DNS
• The development stack
• Transferring files and data
• Transferring via duplicator
• Transferring data many times
• Check your site
• Resources
About me
Developer14 years
Teacher9 years
Trekie Since
ST:TNG
July 18, 2016WordCamp Montreal
July 18, 2016WordCamp Montreal
ENGAGE!
WordPress.comto
WordPress.org
July 18, 2016WordCamp Montreal
What’s the difference?
July 18, 2016WordCamp Montreal
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
Method
Export
Import
July 18, 2016WordCamp Montreal
Export
July 18, 2016WordCamp Montreal
Export
July 18, 2016WordCamp Montreal
Import
July 18, 2016WordCamp Montreal
Import
July 18, 2016WordCamp Montreal
DNSDomain Name System
July 18, 2016WordCamp Montreal
Overview
July 18, 2016WordCamp Montreal
Change 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/
July 18, 2016WordCamp Montreal
Windows
July 18, 2016WordCamp Montreal
• 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
Adding the entry
July 18, 2016WordCamp Montreal
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
July 18, 2016WordCamp Montreal
Transferring Files and Data
July 18, 2016WordCamp Montreal
What are we moving?
PHP / HTML / CSS
WordPress Core
Plugins
Themes
JPG, PNG, GIF, DOC, PDF
Media
POSTS
PAGES
SQL Database
July 18, 2016WordCamp Montreal
How to migrate it?
With WordPress Plugins Without WordPress
July 18, 2016WordCamp Montreal
• Duplicator
• Backup Buddy
• WP Migrate DB Pro
• File Transfer Program
o FileZilla
o CyberDuck
o Transmit
• Database client
o phpMyAdmin
o HiediSQL
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
July 18, 2016WordCamp Montreal
FTP – Upload and Download
July 18, 2016WordCamp Montreal
Confirm Authenticity
July 18, 2016WordCamp Montreal
Database
• phpMyAdmin, HeidiSQL, Navicat, MySql Workbench
July 18, 2016WordCamp Montreal
July 18, 2016WordCamp Montreal
July 18, 2016WordCamp Montreal
July 18, 2016WordCamp Montreal
Configure wp-config.php
July 18, 2016WordCamp Montreal
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');
July 18, 2016WordCamp Montreal
Change WordPress Location
July 18, 2016WordCamp Montreal
• https://interconnectit.com/products/
search-and-replace-for-wordpress-databases/
The Development Stack
7/20/2016EQ WordPress Advanced 31
Installation• Text Editor
o Notepad – Included in Windows
o Notepad++ - https://notepad-plus-plus.org/
o Sublime Text 3 - http://www.sublimetext.com/3
o NetBeans - https://netbeans.org/
o PHP Storm - https://www.jetbrains.com/phpstorm/
• Web Browser
o Internet Explorer
o Firefox
o Chrome
o Safari
o Opera
7/20/2016EQ WordPress Advanced 32
Stack Installation• LAMP, MAMP, WAMP, XAMP
o Linux, Macintosh, Windows, *
o Apache
o MySQL
o PHP
• Windows
o Wamp Server - http://www.wampserver.com/
• Mac
o MAMP - https://www.mamp.info/en/
• Windows or Mac
o Desktop Server - https://serverpress.com/
7/20/2016EQ WordPress Advanced 33
Using WampServer• The “www” directory will be automatically created
o usually c:\wamp\www)
• Create a subdirectory in “www” and put your PHP files
inside
• Click on the “localhost” link in the WampSever menu
• Or
• Open your internet browser and go to the URL :
http://localhost/
7/20/2016EQ WordPress Advanced 34
Using WampServer• With a left click on WampServer’s icon, you will be able to:
o manage your Apache and MySQL services
o Switch services online / offline
o install and switch Apache, MySQL and PHP releases
o manage your servers settings
o access your logs
o access your settings files
o create alias
• With a right click:
o change WampServer’s menu language
o Access http://www.wampserver.com
7/20/2016EQ WordPress Advanced 35
Transfer Via Duplicator
July 18, 2016WordCamp Montreal
http://wpcourse.dawsoncollege.qc.ca/#####
July 18, 2016WordCamp Montreal
Install Duplicator
July 18, 2016WordCamp Montreal
Create New
July 18, 2016WordCamp Montreal
Create New
July 18, 2016WordCamp Montreal
Storage Config
July 18, 2016WordCamp Montreal
Archive Config
July 18, 2016WordCamp Montreal
Installer Config
July 18, 2016WordCamp Montreal
Scan Complete
July 18, 2016WordCamp Montreal
Building Package
July 18, 2016WordCamp Montreal
Package Complete
July 18, 2016WordCamp Montreal
See downloaded files
July 18, 2016WordCamp Montreal
Create wordpress folder
July 18, 2016WordCamp Montreal
Login to the database• Go to http://localhost/phpmyadmin
July 18, 2016WordCamp Montreal
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
July 18, 2016WordCamp Montreal
install.php
July 18, 2016WordCamp Montreal
Installer.php
July 18, 2016WordCamp Montreal
Processing Files
July 18, 2016WordCamp Montreal
Update Files and Database
July 18, 2016WordCamp Montreal
Test Site!
July 18, 2016WordCamp Montreal
http://localhost/worpress
July 18, 2016WordCamp Montreal
Transferring datamany times
July 18, 2016WordCamp Montreal
Production
Staging
Dev
July 18, 2016WordCamp Montreal
Process
https://deliciousbrains.com
July 18, 2016WordCamp Montreal
WP Migrate DB Pro
July 18, 2016WordCamp Montreal
WP Migrate DB Pro
July 18, 2016WordCamp Montreal
Check your site…
July 18, 2016WordCamp Montreal
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
July 18, 2016WordCamp Montreal
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
July 18, 2016WordCamp Montreal
Resources
July 18, 2016WordCamp Montreal
Resources• https://codex.wordpress.org/Moving_WordPress
• http://www.jasonbobich.com/web-design/
moving-wordpress-to-a-new-server/
July 18, 2016WordCamp Montreal
July 18, 2016WordCamp Montreal
Recommended