Aug 16 2008

Profile Image of Grant
Grant

Suggested Revision to WordPress Upgrade Instructions

Posted at 10:55 am under Geek, Philanthropy

Dear WordPress Gurus:

Every time I go to upgrade WordPress and am following the instructions on this page, I wish they were more clearly written and more sequential in their steps. One thing that always scares the tar out of me is the backwards nature of the instructions beginning at Step 3. It’s only until after those instructions are given (and perhaps followed!) that the reader encounters two very important pieces of information:

NOTE The wp-content folder requires special handling, as do the plugins and themes folders. You must copy over the contents of these folders, not the entire folder. Copying the entire folder overwrites all your customizations and added content.

Also take care to preserve the content of the wp-config.php file in the root directory.

Ack!

So… I propose a rewrite, maybe something similar to what I’ve suggested below. If you use it, feel free to alter it in any way. Thanks!

==========

1. Get the latest WordPress. Either download and extract it to your computer or download it directly to the server.

As a reminder, to extract a tar.gz to a folder use this command, replacing (folder name) with the name of your folder: tar -xvzf latest.tar.gz -C ./(folder name)

2. Download a backup copy of the wp-config.php file in the root directory. This file contains current settings for your existing installation, e.g. database sign-in information. (See information below.)

3. Delete your old wp-includes and wp-admin directories.

4. The wp-content folder and its subfolders require special handling. You must copy over the contents of these folders, not the entire folder. Copying the entire folder overwrites all your customizations and added content. Follow these instructions:

  • upload all of the files/folders in wp-content/plugins to the wp-content folder on your site, overwriting any existing files/folders
  • upload all of the files/folders in wp-content/themes to the wp-content folder on your site, overwriting any existing files/folders
  • upload any files in wp-content to the wp-content folder on your site, overwriting any existing files

5. Copy the remaining WordPress files and folders to your server, overwriting any existing files/folders. You may use FTP or shell commands to do so. Note that this means *all* the files, including all the files in the root directory as well. If you use the default or classic theme and have customized it, then you can skip that theme.

The wp-config.php file in the root directory contains current settings for your existing installation, e.g. database sign-in information. Occasionally new versions of WordPress adds statements to this file. (E.g. in version 2.5 the SECRET_KEY variable was added, see Extended upgrade instructions). Compare your existing file with the new installation file which is named wp-config-sample.php. Either transfer your settings to the sample-file and rename it to wp-config.php or copy the new statements from the sample file into your current file.

6 responses so far

6 Responses to “Suggested Revision to WordPress Upgrade Instructions”

  1. Phil Gonson 16 Aug 2008 at 4:52 pm 1

    I’d recommend just using the WordPress Automatic Upgrade Plugin, which should be built into WordPress 2.7.

  2. Granton 16 Aug 2008 at 8:15 pm 2

    Well, now, that is very cool. I’ve got the WordPress Automatic Upgrade Plugin installed, so now I just have to sit here and anticipate the next WordPress upgrade so I can try it out! Thanks for the suggestion.

    (Those instructions mentioned above still need to be revised, though!)

  3. Austinon 20 Aug 2008 at 5:38 pm 3

    Did you mean to link to this page instead of this one?

    If so, the former page is a wiki, meaning that anybody can (and is encouraged to) edit it, including you. I just did, taking into account your suggestion.

    However, I think the danger is rare that overwriting the directory will delete the existing contents, so I’m not sure it needs too much emphasis. And nothing up to that point should endanger the wp-config.php file, so in the interest of brevity there’s no reason to include special instructions for it.

  4. Granton 20 Aug 2008 at 7:06 pm 4

    Hm. I have no idea how that wrong link got in there. Fixed now. Thanks for the heads up.

    I must be missing something on that page we’re referring to. I don’t see anything indicating that it’s a Wiki, and I don’t see any changes from what it was before (you said you’d edited it, right?).

    ??

  5. Austinon 20 Aug 2008 at 9:35 pm 5

    You can see the changes I made here.

    The community portal page (a link in the left sidebar) explains how the WordPress Codex works.

  6. Granton 20 Aug 2008 at 9:51 pm 6

    Ah! I see now. Thanks.

Trackback URI | Comments RSS

Leave a Reply