WordPress 2.7 Beta 3 is available for download now and I’ve been testing out some of the new features.  In this post I’ll demonstrate how WordPress 2.7 lets you automatically update your WordPress installation to the latest version.

Prior to WordPress 2.7 the user had to choose one of several upgrade options:

I found the easiest option for me was the WordPress Automatic Upgrade Plugin, and so I was excited when automatic upgrades were announced as a new core feature in the upcoming WordPress 2.7 release.  The WordPress team has been going down this road with the core product, plugins, and themes all set to have automatic upgrade options built in with WordPress 2.7 (plugins already received this upgrade functionality in WordPress 2.6, which has been further enhanced in 2.7).

Upgrading to the latest WordPress build

The new WordPress sidebar has an Update item listed in the Tools section towards the bottom.

Clicking Update takes you to the Upgrade WordPress page.  A warning message reminds you to backup your database and files before upgrading, and provides a link to the WordPress Codex pages containing backups advice.  This is one area in which the WordPress Automatic Upgrade Plugin is more useful - WPAU automatically creates backups for you and presents you with a link to download them.

Once you click “Upgrade Automatically” nothing seems to happen for a few moments.  Some people might get nervous at this point but if you just wait patiently it eventually displays a completion message.

This is another area where I prefer WPAU, because it shows you more progress as the upgrade occurs and lets you know that things are happening.  There is no moment where you aren’t sure if things are okay or if the upgrade has frozen.

As this is still Beta 3 the upgrade process may be improved but as it stands it is a simple and easy way for WordPress users to upgrade their blogs without messing around with third party scripts or having to FTP files to your web host.  Just be sure to always backup your files and database first in case the upgrade causes any issues that you need to recover from.

PerformancingAds

If you develop your own WordPress themes then at some point you may wish to offer those themes to the public to download and use.  If so then you’d probably want a WordPress site installed somewhere to demo your themes for people to see them live and interact with them.  This can easily be achieved with a WordPress install, a plugin, and some sample content.

Step 1 - Install WordPress

Install a new WordPress site, either in its own domain or into a subdomain of your blog’s domain.  I have demo.cranefactory.com set up as a subdomain for previewing my themes.  You can set up a subdomain in CPanel by clicking on the “Subdomains” icon.

Enter the name of the subdomain (”demo” in my case”) and choose a path on the server file system as the document root.  Hit “Create” when you are done.

Now you can install WordPress into the subdomain either with Fantastico or as a manual installation.

Step 2 - Get the Plugin

Download the Preview Theme plugin by Ryan Boren.  Upload the file to the wp-content/plugins folder of your new WordPress install.  Now log in to the admin panel of your WordPress install, go to Plugins and activate the Preview Theme plugin.

Step 3 - Import Sample Content

Writing dummy content for test/demo sites is a real chore, but thankfully you can import some ready-made sample content thanks to WPCandy.com.  Download and unzip the XML file to your computer.  Next go to your WordPress admin panel and navigate to Manage and then Import.  Choose “WordPress” as the system to import from, browse to the file on your computer, and then hit “Upload file and Import”.  This will only take a few moments after which your WordPress demo site is full of sample content.

Step 4 - Upload Themes

Now that you have WordPress installed, the Preview Theme plugin activated, and some sample content uploaded it is time to upload the themes you wish to demo on the site.  Themes are uploaded to the wp-content/themes folder.

Once you have uploaded themes you can preview them simply by appending “preview_theme=theme name” to the URL of your demo site.  So for example the Tech Factory v1.0 theme can be previewed at the URL http://demo.cranefactory.com/index.php?preview_theme=Tech%20Factory.

One shortfall of this method of previewing themes is that the user’s session will default back to whichever theme is active for the demo site once they click a link to another part of the blog.  This is because the “preview_theme=” part of the URL does not follow them throughout their session.  If you want people to be able to select a theme and stick with it throughout an entire session you can use Ryan Boren’s Theme Switcher plugin to achieve that.

Keith Dsouza writes about some of the planned features for the WordPress 2.7 release.  He mentions several features for which high quality plugins already exist, which is encouraging to see as it means the WordPress developers are paying attention to the extensive plugin community and working to roll some of the highest demand functionality into the WordPress core.

Two of the possible new features that caught my attention are automatic upgrades and batch post editing.

WordPress upgrades can be a painful process so building this into the core product could be a huge step forward in enabling WordPress users to keep their sites up to date for all of the critical security fixes.  The WordPress Automatic Upgrades Plugin is the best upgrade method going at the moment and I hope the WordPress team makes the builtin functionality as easy to use.

Batch post editing is something that Keith only hinted at, but my hope is it will allow such functionality as creating a new tag or category and adding multiple existing posts to it in one action.  This would make it much easier to update historical posts with this kind of information without editing each one individually or having to write custom SQL code.

You can read a few more hints about what is coming over at the WordPress Codex.

WordPress version 2.6 has just been released and I’ve taken the opportunity to upgrade my test installation and start looking at some of the great new features that have been included.  While there are loads of new goodies under the hood (including 194 bug fixes) I’m going to dedicate this post to some of the more up front improvements that will help bloggers on a regular basis.

Post Revisions

WordPress now has the ability to display a Wiki-style history of changes to your blog posts.  The Post Revisions can be found at the very bottom of the editor.

This displays the post and a list of the times it was saved (whether automatically or manually).

You can then delete revisions, or compare two of them to see what changed between them.

Press This!

Press This is an easy way to make quick posts to your block using a shortcut or bookmark on your browser toolbar.  You’ll find the Press This shortcut at the right of the editor.

On any web page when you press the Press This bookmark it will open a popup menu with a new blog post filled out with the details of the page you were visiting.

If the page you are visiting is a Youtube video or Flickr photo, the post will automatically embed the correct code for posting that content in your blog.

In short, it is a great way to quickly post interesting pages, videos, and photos to your blog.

Word Count

This new feature will be particularly handy for professional bloggers being paid by the word, or just any blogger who tries to keep their content to around a certain word count.  The editor window will now show the word count for your post over near the Save/Publish buttons.  I’ve noticed though that it only shows it after a carriage return, so if you’re typing long paragraphs you won’t see it updating the word count.

Image Captions

Images bring a blog to life, and this new feature brings it to a whole new level.  When posting images in your blog posts you can now include a caption beneath each image.  This will be great for photo blogs or “how to” posts that include lots of screenshots.

The captions also appear under thumbnails in image galleries.

Improved Image Control

In addition to captions the image controls have been given a real boost.  To begin with you can now drag and drop the order of images in the gallery.

By hovering your mouse over an image in the editor you can access the new image editing controls.

These new controls make it much easier to resize and re-align images that you have inserted into your blog posts, something that was not very intuitive in version 2.5.

Plugin Management

For bloggers who are constantly trying out new plugins there are a couple of new features that make life easier.  For starters the WordPress admin page will now notify you when there are updates for any of your installed plugins.

The Plugins management page has also been split into actived and deactivated plugins, as well as adding some bulk management options.

Theme Previews

Finally for bloggers who are developing or testing new themes for their sites WordPress 2.6 includes theme previews, so that you can check how your site will look without having to enable a theme for all visitors.

When you click on a theme it launches an alternate URL to display a preview of your site with the selected theme.

Conclusion

While there are many more new features in WordPress 2.6 I have demonstrated those that will have the biggest impact on many bloggers.  WordPress continues to develop into a richer and more powerful CMS as each version is released.  Now I’m off to start upgrading my blogs, and to start testing out some of the other new features that have been added.

WordPress 2.5 includes some code designed to prevent oversized images from breaking up the layout of themes by spilling outside of content areas.  The code is found in the media.php file and looks like this:

The important part of the code is this bit:

		if ( !empty($GLOBALS['content_width']) ) {
			$max_width = $GLOBALS['content_width'];
		}
		else
			$max_width = 500;

What is means is if no global value has been set (either in the WordPress install or in the theme itself) to default to a max width of 500 pixels for any images that are inserted as “full size”.

Here at Crane Factory my current theme will support images up to 600px wide, and that is the size I generally shrink any large files down to before uploading them.  Unless I tell WordPress this it will keep shrinking “full size” images to 500px when I insert them in posts.  To fix this I simply add create a functions.php file in the folder for my theme and add the following code to it:

$GLOBALS['content_width'] = 600;

I have no other functions.php code so the whole file looks like this:

Now when I insert images 600px or more wide, WordPress will shrink them down to 600px to fit my theme rather than the default 500px.