Neil Matthews

Author: Neil Matthews

  • Upgrading WordPress: Updating Your Core WordPress Files

    [private_upgrading]

    In this part of the upgrade tutorial I would like to take you through the process of upgrading your core WordPress files and database.

    Why Upgrade?

    As I have already mentioned WordPress is a constantly evolving system.  New functions are added, bugs in existing code are fixed and security loopholes are filled almost as quickly as the hackers discover them.

    It is because of this that it is advisable to keep your WordPress installation at the latest version.

    When To Upgrade

    Like an obidient automaton, you will upgrade when you are told to 🙂

    WordPress has an update notification system which compares your current version with the currently available latest release and adds an upgrade available banner at the top of your dashboard like the one below when an update is available.

    updatewp

    Some people don’t like the intrusive nature of this notification and install plugins to disable this feature, I think it is still very important to keep up to date with the latest version, so I recommend signing up for an email notiffcation when the latest stable version is released.  This can be done from http://wordpress.org/download/

    What Happens During An Update

    When WordPress release an update to the code,  you will need to replace all of the files in your blog root, wp-admin, wp-includes and to a lesser extend wp-content.  There will then be a script to run which will make any updates to the database.

    Before You Begin

    Before you begin to upgrade your core WordPress install please backup your installation.  Please refer to module one backup and recovery for details.

    Automatically Updating WordPress

    The latest versions of WordPress have an automatic update facility.  Using this process the new files are downloaded to your hosting serverand saved into the directory /wp-content/upgrade.  The files are unpacked and a script is run to move them to their required location.  Lastly a script will be run to update the back end database

    All of this happens seamlessly whilst your blog is online, and excellent advance in WordPress administration in my opinion.  The downside is you have zero control of the process.  Whilst I have never had a failure using automatic update, I wonder what would happen if the process fell over mid way through the procedure leaving you with a partially updated and possibly not working blog.  Thats is why I am also teaching you how to to a manual update. Also I have noticed a number of hosting companies do not allow you to download the required files for an automatic update, so you may be forced to use the manual method detailed below.

    Manually Updating WordPress

    Same thing goes as the automatic update, please do a backup first.

    Download and uncompess the latest version of WordPress from http://wordpress.org/download/ The files will come as either a zip file or as a .tar.gz.  These are both archive file types, if you are planning to do you work from a PC or MAC, zip is probably best (Mac users please feel free to tell me I am wrong in the forums ,are tar files a beter option for the Mac?).  If you are going straight to linux/unix with your WordPress install then tar.gz is probably a better format.

    Unarchive  the files and prepare to copy them to your WordPress hosting server.

    Things to note before you start renaming and overwriting files:

    • Once you start this process your site will not work correctly until you are done, schedule the upgrade at a quiet time
    • Have your backups handy

    HANDY HINT: Create a file called index.html in your blog root containing a message saying your site is down, this will capture all visitors to the root of your blog and let them know you are updating it.  Remember to delete this at the end of the process.

    The first stage of the manual update process is to delete or (my preferred method) to rename the directories wp-admin and wp-includes.  This will remove all of the old system files and ensure only the most up to date file are left. I rename my directories using my ftp client filezilla.

    Next I upload the WordPress files overwriting the existing install, paying particular attention NOT to overwrite wp-config.php.  If you do this your intall will not know how to connect to the database.  If you are using one of the default themes please note they will be updated too so any changes you have made will be overwritten.

    Once the file are all uploaded, you need to run the upgrade script.  This is located at http://{YOURBLOG}/wp-admin/upgrade.php

    The script will be run and any updates requried to the database made.  The upgrade is now complete.

    Test, test and retest your blog to ensure everything is okay, pay particular attention to you plugins to see if they are working as expected.

    Manual Update Resources

    Check out the following pages from WordPress on installing and updateing your system http://codex.wordpress.org/Upgrading_WordPress

    Rolling Back An Update

    If you have problems with the update, either manual or automatic, you must roll back your system to the previous version, to do this:

    1. Restore your database
    2. Restore your filebase

    I guess you now see why backup and recovery was the first topic of this training course.  We will be doing many things which may require a restore.   Refer to those modules to see how to do this.  Both have been updated so both need to be recovered, do not be tempted to only restore your filebase.

    VIDEO: How To Upgrade Your WordPress Core Files

    Here is the screencast video to show you exactly how to update your core system.  Running time approx 5 minutes.

    [S3 bucket=wpoc text=View the video>>]corefiles.mp4[/s3]


    Discuss This Post

    If you would like to discuss this tutorial in more detail, please leave a comment below.

    Next In the series

    The next post in this series takes you through updating your plugins.

    [/private_upgrading]

  • Upgrading WordPress: Introduction

    [private_upgrading]

    In this series of blog posts and supporting screen cast videos, I would like to take you through the process of updating the various components of WordPress.  I will look at upgrading WordPress itself, keeping your plugins at the latest level and lastly updating your theme to ensure it is compatible with new versions of WordPress.

    This series of tutorials comes with screencasts as part of the WordPress Owners Club.

    Why It Is So Important to Keep Your Site Up To Date

    WordPress and the extensions of WordPress (themes and plugins) are in a constant state of development, it is important to keep your site up to date for the following reasons:

    • To install new security updates to close know loopholes
    • To install updates to patch bugs in the software which may stop your site functioning correctly
    • To take advantage of new functionality
    • To keep your site at a level of code supported by the wider community of developers i.e. as WordPress moves on so will the plugin and theme code, you risk not being able to run your favourite plugin if you are not at the correct level

    Later releases of WordPress have built in indicators to let you know when to update certain parts of your  system require attention via an update, the rest of this tutorial will take you through those components and how how to keep you site up to date.

    The Three Components Requiring Updates

    There are three components of your blog which will require updates on an on-going basis, your WordPress system itself, both the file base and database, your plugins and to a lesser extent your theme.

    Updating WordPress

    WordPress is in a constant state of development as I have already said.  New additions to the system are being made on a regular basis to add functionality, to fix know errors and to block security loopholes.  The later point makes it extremely important to keep your blog’s software at the latest version.

    WordPress has a built in notification system where it will check for the latest available version against your installed version.  If there is a newer version you will see a message like this at the top of your site:

    updatewp

    Finding Out Your Current WordPress Version

    The quick way to find out your current WordPress version is to visit your dashboard.

    wpversion

    Manually or Automatically Updating

    There are two methods to update WordPress, you can either manually upload new files and run the update process or you can click on the automatic update button to do it for you.  I will discuss both methods later in this tutorial.

    Updating Plugins

    Just like the WordPress core system, plugins are in a constant state of development, along with the bug fixes, system improvements and pluging security holes, plugin developers need to keep their offering in line with WordPress as well.

    Functionality of a plugin may cease to work if the underlying wordPress system is relies on is changed.

    Updating Themes

    Probably the least likely thing you will need to update of the three, but it is my experience that themes sometimes have issues after major updates of the core WordPress system, so please bear this in mind as you update other components.

    Themes tends to have issues because they are running outdated calls to WordPress to retrieve content, this then causes parts of the theme to stop working.

    There is no automatic check for theme compatibility like there is for the code base and plugins, so you will need to do some investigation. Check on the support section of the theme developers site to see if there are any issues, they often release patches to fix any problems that are reported.

    Often themes are reliant on plugins to provide certain functionality, if you see problems with your theme after a plugin update, again refer to the theme developers website to see if there is a know issue or drop a support request to them in the support forum or via email.  The majority of developers are only too happy to help.

    Rest Of This Tutorial

    The rest of this tutorial will focus on the practical side of updating the three components; WordPress core, plugins and themes.  I will take you through identifying upgrade opportunities, getting the updates files and applying them.

    Discuss This Post

    If you would like to discuss this tutorial in more detail, please leave a comment.

    Next In The Series

    In the next part of this tutorial I discuss updating your core WordPress files.

    [/private_upgrading]