WordPress 2.3.2: What’s New

Bug fix

Yesterday WordPress version 2.3.2 was released, chiefly to fix a bug that allowed any visitor to your site to view any posts set to be published in the future (a request like http://pressedwords.com/?x=wp-admin/&paged=1 would do it).

Suppress Error Messages

More generally, WordPress now suppresses most database error messages. That’s great for a production site, where you don’t want the public to see the kind of things that can be exposed in a MySQL error message. However, if you’re working on a development site, you might want to see those error messages. In that case, just put the following line in your development site’s wp-config.php file:

define('WP_DEBUG', true);

Custom Database Error Page

Screenshot of Pressed Words

2.3.2 includes a new feature: you can have a custom database error message page. Hopefully many sites will take advantage of this, so when they get slashdotted or dugg and their database servers go down, their visitors won’t blame WordPress (the default error page features the WordPress logo prominently).

It took me about 2 minutes to create my custom error page, which you can see above, by following these steps:

Creating a Custom WordPress Database Error Page

  1. Save the HTML from one of your posts, perhaps by viewing the source of the page in your browser and saving it. Or you can use wget.
  2. Edit the saved file to remove extra stuff such as links to previous and next posts, the sidebar, and the comments section.
  3. Put the following code where your post’s content would normally go:
    <?php global $wpdb; if ( ! empty($wpdb->error) ) echo $wpdb->error; ?>
  4. Rename the file to db-error.php.
  5. Upload db-error.php to the /wp-content/ directory.

Upgrading

Upgrading WordPress from version 2.3.1 should be painless, as there were no changes to the database structure. Download the latest version of WordPress here.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*