Upgrading WordPress
The detailed instructions are nice, but perhaps a little muddled as they need to support the variety of ways folks can access their web hosts.
Since I’m likely to help Christine repeat this process more than once, i’ll list steps for us below the cut. No less muddled, perhaps, but they’re generalized for when one has shell or VNC access to a unix host. I’ve added a pointers to a few security steps to think about.
It does look like i have one last thing to clean up.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'bSuite::sharelinks_redirect' was given in [path]/wp-includes/plugin.php on line 311
This appears at the top of the blog with this new post. I’m turning off bSuite since the whole path is showing to the world.
- Dump any akismet spam.
- Check user list & delete any suspicious users.
- Security step: Use spotlight/smartfolder or
find ATC -newer ATC/wp-config.php -exec ls -l \{\} \;and examine the time stamps of files. This may be painful if there are many theme changes or plugins with many files. What do you do if you find suspicious files? Think twice about copying them over in later steps. Check the code. If they don’t fall in themes or uploads, well – you’re upgrading and replacing them now! - [Cf Step 0] Back up the database (I used the plug-in; Christine will use her SQL mojo.)
- [Cf Step 0] Using zip or
tar czvf ~/[backup name.tgz] [wordpress directory], make a backup of the blog home from the directory above the blog home. Get the whole root. - Collect plug-in upgrades in one directory. Since i use the same plug-ins for multiple blogs, i created a staging directory, uncompressed all the install files there, got rid of the install files, then created a tar file of the contents. I probably should have called the staging directory “plugins” and created a tar of the directory. Instead, i’ll need to unpack my contents in [blog-root]/wp-content/plugins.
- Get the wordpress upgrade package.
- Uncompress the wordpress upgrade package in the same directory the blog root sits, not into the blog root. Looking for parallel file structure here.
cp [blog-root]/.htaccess [blog-root]/wp-config.php wordpress/- Compare wordpress/wp-config.php to wordpress/wp-config-sample.php. Make changes so the wp-config.php has any new attributes, variables, etc.
- If [blog-root]/wp-content/uploads exists, copy to wordpress/wp-content.
- If there are any custom themes, check [blog-root]/wp-content/themes and copy the themes into wordpress/wp-content/themes .
- Note that the akismet plugin in the wordpress package is probably out of date. You can remove the wordpress/wp-content/plugins/ akismet and hello plugins. Then, unpack the plugin archive into wordpress/plugin. Now you have the newest akismet. If all you run as a plugin is akismet, there is another way to upgrade later if you leave the default version in place.
- Make sure wordpress/wp-content has same permissions as [blog-root]/wp-content.
- From the wordpress interface, deactivate all your plugins.
- Delete akismet spam, one more time.
- Change the name of the blog root directory to something like [blog_root-old]. You are “off the air.”
- Change the name of the wordpress directory to [blog-root].
- Step 2 from the instructions:
Step 2: Upgrade your installation Visit your main WordPress admin page at /wp-admin. You may be asked to login again. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like http://example.com/wordpress/wp-admin/upgrade.php. Follow that link and follow the instructions. This will update your database to be compatible with the latest code. If you fail to do this step, your blog might look funny.
You are back “on the air.”
- Security step: change passwords on all admin accounts.
- Slowly turn back on all the plugins. Some plugins have their own updaters.
- Test the installation!
ls -laR [blog_root] > ~/[blog_root]_[date]_ls-laR.txtThis will provide a trace of all the files installed at this point for auditing purposes later. Store off host.- [Cf Step 0] Back up the database (I used the plug-in; Christine will use her SQL mojo.)
- [Cf Step 0] Using zip or
tar czvf ~/[backup name-postupgrade.tgz] [wordpress directory], make a backup of the blog home from the directory above the blog home. Get the whole root. - Come back later and delete the old home directory and pre upgrade backups.
PAUSE: you now have backups of your old installation and source for your new installation.
PAUSE: you now have a working old blog directory and a pristine new blog directory
Pause: It’s working! Now, time for new backups
People who looked at this item also looked at…
Related items
Tags: bsuite, wordpress upgrade
July 22nd, 2009 at 8:57 pm
[...] barely been a year since i last upgraded wordpress, but here i am again. This time i seem to have taken a more lacksidasical approach, but it all [...]