launching a wordpress site 101 (cincinnati wordpress, august 2015)
TRANSCRIPT
Launching a WordPress Site 101
Cincinnati WordPress - August 2015 Andrew Duthie
Topics• Anatomy of a WordPress site
• Hosting requirements
• Tools
• Moving content
• Preparing to flip the switch
• Demo
Site Anatomy
Site Anatomy
The standard WordPress installation includes many
files which interpret browser requests and load the
appropriate files.
Most importantly, the configuration file defines the
settings WordPress should use to connect to a
MySQL database. You can also define security and
site settings.
WordPress Core
Configuration
/wp-admin, /wp-includes
/
Site Anatomy
The theme directory contains the layout and styles
for displaying your site.
Each plugin adds unique behavior to your site. The
plugin files describe the behavior, and additional
customizations are typically stored as options in the
database.
Theme
Plugins
/wp-content/themes/twentyfifteen
/wp-content/plugins/akismet
Site Anatomy
Media files (images, videos, documents), including
thumbnails, are stored here.
The contents of your posts and pages aren’t stored
in the WordPress site directory, but instead live in
the MySQL database.
Uploads
Content
/wp-content/uploads
mysql://localhost:3306/database
Hosting requirements• PHP 5.2.4 or greater
• MySQL 5.0 or greater
• Usually Apache HTTP Server or nginx
https://wordpress.org/about/requirements/
Tools
A FTP (File Transfer Protocol) client enables you to
move files between your computer and a remote
hosting server.
FTP Client
• Always prefer SFTP (FTP over SSH) if offered
by your host, since plain FTP can be insecure
CyberduckMac OSX
Filezilla Cross-platform
Tools
A database client allows you to browse the content
of your WordPress site. It usually provides export
and import options to move your content from one
place to another.
Database Client
Sequel Pro Mac OSX
HeidiSQLWindows
phpMyAdmin Web
Moving Files1. Find or create user credentials for both FTP and
database access. You may need to create a database if one doesn’t already exist
2. Move entire site from local directory to host
• Or, download and move WordPress core, theme, plugins, and uploads
3. Export database contents as .sql “dump” using database client, then import to host database
Preparing your site
Content stored in the database includes references to your site’s
previous domain. If this has changed as a result of moving from a
development site, or as a result of changing your domain, you’ll need to
replace all occurrences in the database. This is also necessary for
WordPress to recognize and use the new domain.
Replace old URLs
WP-CLI Search-Replace-DB
wp search-replace 'http://example.dev' 'http://example.com'
Preparing your site
If your site is hosted on a different server, you will need to update your
domain records to correctly point to the new server.
Update host records
• Tip: You can also modify a “hosts” file on your local computer
to test how your new server will respond to the domain before
making the real change
Demo