'

Updating WordPress Themes, Plugins, and Core Safely

Понравилась презентация – покажи это...





Слайд 0

BOULDER WP MEETUP HOW TO UPDATE WORDPRESS SAFELY @ASKWPGIRL NOVEMBER 2, 2015


Слайд 1

WHEN TO UPDATE


Слайд 2

HOW OFTEN DO YOU NEED TO UPDATE ALL THE TIME! • The longer you wait to update, the harder it will be. • Updates can be critical for security. • Updates can be critical for functionality (e.g. to work with latest WordPress version) • Read changelogs for important notes, like if major functionality changes requiring you to update template files or styles.


Слайд 3

MANAGE SITES • Use tool to manage multiple sites, otherwise, updates are too time consuming: • • iControlWP* • InfiniteWP • MainWP • • Jetpack ManageWP With site management, you can update ALL plugins across ALL sites quickly! Good for patches, which majority of updates are.


Слайд 4

CREATING STAGING ENVIRONMENT


Слайд 5

CREATE A STAGING SITE LOCALLY USING DESK TOPSERVER - $99.95 • Backup using BackupBuddy, BackWPUp, or Duplicator plugin • Choose Zip archive with DesktopServer Pro. Done!


Слайд 6

CREATE A STAGING SITE IN SUBFOLDER USING WP S TAGING PLUGIN - $0 • Works on non-managed, 
 shared hosting accounts.


Слайд 7

CREATE A STAGING SITE USING MANAGED WORDPRESS HOS TING • WP Engine, Get Flywheel, and SiteGround provide one-click staging environments. https://www.siteground.com/tutorials/staging/create-staging.htm


Слайд 8

CREATE A STAGING SITE REMOTELY USING WP S TAGECOAC H - $4/MONTH/SITE • https://wpstagecoach.com/ • Create a staging copy of your live site with one click. • Copy changes from your staging site back to your live site. • Choose which changes to import. You can import some or all of your file changes, and/or your database changes.


Слайд 9

BACKING UP SITE


Слайд 10

BACKUP VIA PLUGIN • BackWPUp - Free plugin, lots of options for scheduling and sending to remote location. • Duplicator - Pro version can be used for scheduling backups. Free version for duplicating the site quickly. Great for migrations. • BackupBuddy - Paid plugin. Great for scheduling and migrations. • UpDraftPlus - Similar to BackWPUp - paid remote backups. • Not all hosts will work well - might need to enable alternate cron in wp-config.php file: http://ithemes.com/codex/page/ BackupBuddy:_Frequent_Support_Issues#HTTP_Loopback_Connections_Disabled • Keep backups reasonable size! Exclude large files and uploads folders.


Слайд 11

BACKUP VIA SERVICE • Can be more reliable because not relying on PHP to run. • WorpDrive - my personal favorite. Great pricing. Has test restores, so you can be sure your backups really are working! • VaultPress - great option by Automattic.


Слайд 12

UPDATING PLUGINS


Слайд 13

UPDATE STRATEGIES ORDER OF OPERATIONS 1. Update plugins first. Replace old plugins. 2. Update theme. 3. Update WordPress core. 4. If okay on staging, can do the same on live or deploy staging files to live (depending on staging environment).
 • Can do patch (bug fix updates) live. • Good to have backup just in case. • Have FTP/SFTP/shell and cPanel access handy.


Слайд 14

UNDERSTANDING SOFTWARE VERSIONING PATC HES, UPDATES, UPGRADES • Sequence-based identifiers are used to convey the significance of changes between releases • • 4.3.1 to 4.4 - usually update to functionality - read changelog • • 4.3 to 4.3.1 - typically bug patch, fix - just do it! 4.4 to 5.0 - is major change to software - test thoroughly Read change logs: http://wordpress.org/plugins - find your plugin. Click Changelog tab.


Слайд 15

EXAMPLE PATCHES JUS T UPDATE THESE - DON’T WORRY, BE HAPPY!


Слайд 16

EXAMPLE UPDATES C HEC K C HANGELOG • Beware the COMPLETE CODE CLEANUP. This will break your site.


Слайд 17

NEW FEATURES = 
 MANY FIXES READ C HANGELOG • Example of WooCommerce 2.4 release followed by immediate patch fixes. • Update to new version IF you need a new feature. • Okay to wait a short while for immediate bug fixes. • Always update if security patch! • Always do the patches!


Слайд 18

UPDATING PREMIUM PLUGINS USE LICENSE KEYS • Always enter license key for premium plugins. • Purchase premium plugins even if bundled with theme. Theme developers may be slow to update their bundled plugins.


Слайд 19

CHOOSING PLUGINS • Use the least number of plugins you need. • Use the more popular plugins. • Pay for plugins! Plugins with Pro option will have better longevity. • Donate to your free plugin developer. • Use plugins by developers with good reputation and previous experience. • Check support tab. • Don’t use old plugins!!!!


Слайд 20

PLUGIN TEMPLATE/STYLE UPDATES • If plugin uses customizable templates (e.g. WooCommerce, NextGEN Gallery, The Events Calendar), compare child theme templates to update plugin templates. • Plugin may have moved, deleted, or renamed the stylesheets and templates you have mirrored in your child theme.


Слайд 21

UPDATING THEMES


Слайд 22

UPDATING THEMES BES T PRACTICES • Use Child Theme - https://codex.wordpress.org/Child_Themes • If no child, use Jetpack’s Custom CSS module to make style changes • Read changelog to see if major update or just patch • Compare modified child theme files to parent theme after update • Export theme options if possible before updating • Note: If a theme name changes, all options will be reset to default • Some updates are BIG and require recreating parts of the site time these for site redesign


Слайд 23

PREMIUM THEMES ENTER LICENSE KEY • If Envato theme or plugin doesn’t have license area, install the Envato WordPress Toolkit plugin and enter your user name and API key.


Слайд 24

MANUALLY UPDATING PARENT THEME DOWNLOAD/UPLOAD • If no way to auto update theme, then download latest version from developer • Download a copy of your current theme for backup • Upload the new version of the theme to the theme’s folder • Be sure to OVERWRITE the older theme — don’t have two copies


Слайд 25

CHANGES TO NOTE • Updated theme may use new shortcodes. • Updated theme may use new HTML, so you’ll need to update your stylesheet selectors. • Updated theme may have changed location of template files, so you’ll need to make sure to match your child theme files to the parent. • Update theme may have new theme options.


Слайд 26

UPDATING WP CORE


Слайд 27

UPDATING WORDPRESS JUS T DO IT! • Do all patch/security updates immediately - no need for staging, e.g. 4.3 to 4.3.1. • Major version numbers - okay to wait a little bit, e.g. 4.3 to 4.4, to be sure your plugins have been updated for it. • Test major version updates in staging to be sure plugins and themes play well.


Слайд 28

IF UPDATE FAILS OR CAN’T UPDATE • Download core files from WordPress.org. • Unzip archive. • Copy all files over EXCEPT wp-content folder. Replace whatever is existing.


Слайд 29

UPGRADING DATABASE TABLES • After major WP update, you will likely need to visit your site’s Dashboard and will be prompted to update the database tables.


Слайд 30

TROUBLESHOOTING


Слайд 31

WHAT IS TROUBLESHOOTING? 101 • Identify variables • Eliminate variables • Variables include: • Hosting - MySQL and PHP versions (and Apache) • Themes and plugins • WordPress core • Modifications made to your child theme • Cache


Слайд 32

TROUBLESHOOTING PLUGIN UPDATES YIKES! • If white screen of death, rename plugins folder to plugins-old • Login to Dashboard and go to plugins page - all plugins will show as de-activated • Rename plugins folder back to plugins • Activate plugins one at a time • See if issue is repeatable using TwentyFifteen theme


Слайд 33

REINSTALLING SUBVERSION • Find plugin on wordpress.org > click Developers tab • Download previous version • De-activate and delete the broken version on your site • Upload and activate the old, working version • NOT a long-term solution!


Слайд 34

GENERAL TROUBLESHOOTING • Edit your wp-config.php file in the public_html (or WordPress install directory) and change the line define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true); • Install Query Monitor plugin to check for PHP errors as well as check environment:


Слайд 35

WORDPRESS REQUIREMENTS HTTPS://WORDPRESS.ORG/ABOUT/REQUIREMENTS/ • WordPress recommend your host supports: • PHP version 5.6 or greater - may need to update PHP • MySQL version 5.5 or greater - may need to update DB • Apache or Nginx are most robust and feature-rich server environment • WordPress works with PHP 5.2.4+ and MySQL 5.0+, but some plugins might not. • Time for a new host?


Слайд 36

CLEAR YOUR CACHE • Clear your WordPress cache via your plugin settings • Clear your server cache at web host (WP Engine, SiteGround, etc.) • Clear your Cloudflare cache • Clear your browser cache


Слайд 37

RESOURCES @askwpgirl - http://askwpgirl.com Angela Bowman, Boulder, CO • http://askwpgirl.com/updating-wordpress-plugins-themes-core/ • https://codex.wordpress.org/Updating_WordPress • Sign up at wordpress.org to always get the latest news from WP • Sign up for sucuri.net emails to get latest security news • Submit your site to Google Search Console: http://askwpgirl.com/ submitting-wordpress-site-google-webmaster-tools/ • Optimize your database: http://askwpgirl.com/optimize-wordpressmysql-database/


Слайд 38


×

HTML:





Ссылка: