21
HRISTO PANDJAROV WORDPRESS EXPERT AT @pandjarov www.slideshare.net/siteground

WordPress Migrations 101 - WordCamp Orlando

Embed Size (px)

DESCRIPTION

Covering the basics of migrating a WordPress website from one hosting account to another.

Citation preview

Page 1: WordPress Migrations 101 - WordCamp Orlando

HRISTO PANDJAROV

WORDPRESS EXPERT AT

@pandjarov

www.slideshare.net/siteground

Page 2: WordPress Migrations 101 - WordCamp Orlando

WORDPRESS

MIGRATION 101

Page 3: WordPress Migrations 101 - WordCamp Orlando
Page 4: WordPress Migrations 101 - WordCamp Orlando

MIGRATE YOUR WORDPRESS

SITE BECAUSE:

Your site is growing bigger

Your site is slow

You have hosting problems

You can save some money

Page 5: WordPress Migrations 101 - WordCamp Orlando

THE PROCESS OF MIGRATING

A WORDPRESS WEBSITE

Page 6: WordPress Migrations 101 - WordCamp Orlando

THE PROCESS OF MIGRATING

A WORDPRESS WEBSITE

Transfer your WordPress files

Transfer your Database

Reconfigure WordPress

Test the migration

Point your domain to the new server

Page 7: WordPress Migrations 101 - WordCamp Orlando

DON’T BE SCARED TO MIGRATE!

Page 8: WordPress Migrations 101 - WordCamp Orlando

THE EASIEST WAY:

USE PLUGINS TO MIGRATE

BackupBuddy (paid)

WordPress Duplicator

WP Migrate DB Pro (paid)

All-in-One WP Migration

Page 9: WordPress Migrations 101 - WordCamp Orlando

IF PLUGINS CAN’T HANDLE IT,

DO IT MANUALLY!

Page 10: WordPress Migrations 101 - WordCamp Orlando

STEP 1: TRANSFER YOUR FILES

Compress files before transfer

Download directly to the new server

Request a site archive from your old hosting provider

Request this file to be downloaded from your new host

Page 11: WordPress Migrations 101 - WordCamp Orlando

STEP 2.1: EXPORT DATABASE

Check in wp-config.php which DB you’re using:

define('DB_NAME', ‘user_wrdp1’);

Or export the database using phpMyAdmin

Or use SSH to export your database:

mysqldump -uUSER -pPASS user_wrdp1 > db-backp.sql

Compress the .sql file

Download from the new server

Ask your old hosting provider for a DB dump file

Ask your new hosting provider to download that file

Page 12: WordPress Migrations 101 - WordCamp Orlando

STEP 2.2: IMPORT DATABASE

Make a new MySQL Database & Username

Grant permissions for that DB to the MySQL user

Or use phpMyAdmin to import it

Or use SSH to do this:mysql -uNEWUSER -pNEWPASS user_newdb < db-backup.sql

Ask the hosting support to import the .sql file into that DB

Page 13: WordPress Migrations 101 - WordCamp Orlando

STEP 3: RECONFIGURE WP

Connect to the new DB editting wp-config.php:

define('DB_NAME', 'user_newdb');

define('DB_USER', 'user_newuser');

define('DB_PASSWORD', ‘newpassword’);

Managed hosting companies often add lines to your wp-

config.php file:

$varnish=array ( 0 => 'pod-1191', );

$memcached_servers=array (155.2.4.1 );

define( ‘ROOT_FOLDER', '/nas/wp' );

Page 14: WordPress Migrations 101 - WordCamp Orlando

STEP 4: TEST THE TRANSFER

Use a hosts file to test the transfer:

Linux & Mac: /etc/hosts

Windows: c:/Windows/System32/drivers/etc/hosts

181.224.135.19 domain.com www.domain.com

Page 15: WordPress Migrations 101 - WordCamp Orlando

STEP 5: POINT YOUR DOMAIN

Change the nameservers to your new server ones

Page 16: WordPress Migrations 101 - WordCamp Orlando

TIPS AND TRICKS

Page 17: WordPress Migrations 101 - WordCamp Orlando

PLAN THE TRANSFER

Use Google Analytics to detect when your site is least visited

Page 18: WordPress Migrations 101 - WordCamp Orlando

SETUP A MAINTENANCE PAGE

Install a maintenance plugin on your old hosting account

http://goo.gl/8p778d

Page 19: WordPress Migrations 101 - WordCamp Orlando

USE REMOTE MYSQL

CONNECTION

Connect your OLD server WordPress to your new database

Edit wp-config.php and change:

define('DB_HOST', ‘localhost');

to:

define('DB_HOST', '184.154.235.13');

Page 20: WordPress Migrations 101 - WordCamp Orlando

COMMUNICATE WITH YOUR

HOST

Transfer from one cPanel account to another is very easy

Import/export of databases and zipping archives can be

done easier by the hosting provider support

Page 21: WordPress Migrations 101 - WordCamp Orlando