Slide 1

Slide 1 text

Databases, Migrations & SQL: Oh My! Intro to WordPress Databases & Migrations WordPress St. Petersburg

Slide 2

Slide 2 text

Jim True Support Lead & Community Manager
 Pods Framework pods.io | @podsframework jimtrue.com | @jimtrue

Slide 3

Slide 3 text

How many times has this happened to you?

Slide 4

Slide 4 text

You’ve worked on a Site for Days

Slide 5

Slide 5 text

You’re Happy with the Site

Slide 6

Slide 6 text

Client is Happy with the Site

Slide 7

Slide 7 text

Even better, they’ve PAID you

Slide 8

Slide 8 text

Now you have to move it to their server

Slide 9

Slide 9 text

And you’re suddenly lost ?

Slide 10

Slide 10 text

Where do you Start? FILES DATABASE

Slide 11

Slide 11 text

Where do you Start? WHICH FILES? WHICH DATABASE?

Slide 12

Slide 12 text

Let’s Start with WordPress WordPress wp-config.php WP-CONFIG.PHP contains the database connection parameters and any special configurations for your particular install. It will be different for every WP Install, but you need to at least have a copy of the file for reference when you migrate.

Slide 13

Slide 13 text

Grab the Specific Content WordPress wp-content/ wp-config.php The only folders that are specific to this install are contained under wp-content

Slide 14

Slide 14 text

The Themes, Plugins & Images WordPress wp-content/ wp-config.php themes/ ALL files & directories plugins/ ALL files & directories uploads/ ALL files & directories

Slide 15

Slide 15 text

Now for the Database DATABASE Users wp_users & wp_usermeta Posts wp_posts & wp_postmeta Comments wp_comments & 
 wp_commentmeta Taxonomies wp_terms & 
 wp_term_taxonomy &
 wp_term_relationships Plugin & Theme Settings wp_options

Slide 16

Slide 16 text

So basically just copy those to the new server and I’m done, right?

Slide 17

Slide 17 text

Not enough to just copy files & DB • wp-config.php needs new DB credentials • Site URL needs to be changed in wp_options • URL & Paths need to be changed in ALL places where they appear in the database: Media Paths, internal links, etc.

Slide 18

Slide 18 text

Step by Step Copy & Import 1. SQL Dump of the Database 2. Copy Files from wp-content & DB Dump to new Server 3. Create new database, create a user & import data from SQL Dump 4. Update wp_config.php with DB details (#3) 5. Update wp_options with Site URL 6. Login to wp-admin and go to Settings, General (Site URL) & Save 7. Search & Replace paths (post_content) in wp_posts for Image & Media Links http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/

Slide 19

Slide 19 text

There’s gotta be an easier way, right?

Slide 20

Slide 20 text

Yep, we’ve got tools for that! Updraft Backup
 Buddy WP DB 
 Migrate Pro*

Slide 21

Slide 21 text

Determine your Needs Backup Files & Database Yes Yes DB* Offsite Backup Storage Yes Yes Yes* Scheduled Backups Yes Yes Yes* Multisite Support Yes Yes Yes Easy Migration Setup Yes Yes Yes

Slide 22

Slide 22 text

Backup Buddy by iThemes • Database & File Backups (including other tables on site) • Scheduled Backups & Offsite Backups (great if your server crashes or the client destroys it!) • SIMPLE Migration Tool: One file created by BB, copied to new site, handles full file & database creation & restore with a step by step wizard. • NO Free Version https://ithemes.com/purchase/backupbuddy/

Slide 23

Slide 23 text

UpdraftPlus (& Other plugins) • Database & File Backups (including other tables) • Scheduled Backups & Offsite Backups (great if your server crashes or the client destroys it!) • Cloning & Migration Tool, also UpdraftVault, UpdraftMigrator and UpdraftCentral (great for people supporting tons of sites) • Free Version does Backup & Restore, some Offsite Storage, Scheduled Backups https://updraftplus.com/

Slide 24

Slide 24 text

WP DB Migrate (& Pro) • Database Backups & Media (with Add-on to Pro version). NO files. • Push & Pull Technology from WP Site to WP Site. Great for Development/Staging/Live Environments. • Very Powerful Pro Version: Determine Data Flow, Exclude/ Include Custom Post Types, Multisite Support (including pulling sites in and out of Network) and WP-CLI support. • Free Version only does Database Backup & Search/Replace https://deliciousbrains.com/wp-migrate-db-pro/

Slide 25

Slide 25 text

DEMO TIME

Slide 26

Slide 26 text

Resources & Links • Tour of the WordPress Database:
 https://deliciousbrains.com/tour-wordpress-database/ • How to Move WordPress From Local Server to Live Site:
 http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/ • How to Move WordPress with Duplicator:
 http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-to-a-new-host-or-server-with-no-downtime/ • Seven Best Backup Plugins (Pros & Cons):
 http://www.wpbeginner.com/plugins/7-best-wordpress-backup-plugins-compared-pros-and-cons/

Slide 27

Slide 27 text

Jim True Support Lead & Community Manager
 Pods Framework pods.io | @podsframework jimtrue.com | @jimtrue

Slide 28

Slide 28 text

WordPress St. Petersburg Downtown St. Pete @ TEC Garage
 1st & 3rd Thursdays / Monthly Meetup: https://meetup.com/WordPress-St-Petersburg
 Web: https://tampabaywp.org
 Slack Chat | Facebook Group | Meetups
 A Member of Tampa Bay WordPress Network

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Upcoming Events Sponsored by TEC Garage
 & Tampa Bay Innovates Tech Talk
 Next Event: February 13th “Leading with Purpose: How Our Mission Drives Revenue
 at the Penny Hoarder @ Microsoft
 5426 Bay Center Dr Ste 700, Tampa, FL 33609 
 FREE Registration Required: 
 http://www.tbinnovates.com/TechTalk.cfm