How To: Update Your WordPress Database Name

Last week while I was doing some spring cleaning, I decided to move a few of my sites over to a new CPanel.   The move went fairly smoothly, but once everything was moved, there was the matter of updating the WordPress database to show the new database name. If you are wanting to do something similar, here is what you need to do.

All you need to do is update the wp-config.php file to point towards the new database name, which should be found in the root of your WordPress installation.   Open the wp-config.php file and look for the following code:

define('DB_NAME', 'dbname');

Where it says dbname, update the name of your database.  If your login name changed, you’ll want to update that as well.

Once that was done, the only problem I encountered was that I was unable to upload pictures.   The fix?  Go into your WordPress dashboard and go to Settings –> Miscellaneous and update the path where images are uploaded to.

How To: Turn Off Post Revisions in WordPress 2.6+

Possibly my favorite feature introduced in WordPress 2.6 was the wiki-style document revisions.  You can now easily get access and/or restore old revisions.   It took a few days to get used to, but I have to say I really love it!

I’ve always felt that this feature was intended primarily for multi-author blogs and probably isn’t needed for most WordPress bloggers, as it only serves to grow your wp_posts database table.   If you are someone that would like to disable this feature, all you need to do is open your wp-config.php file and add the following code:

define('WP_POST_REVISIONS', false);

This should restore WordPress to handling posts the way it did in the WordPress 2.5 branch and earlier!