Monthly Archives:: March 2010

Response.Redirect and 302 and 301 status codes

Posted by & filed under code.

If you use Response.Redirect to direct users to a new location, you should be aware that it issues a status code of 302, which means that “the resource resides temporarily under a different URI.” If you intend to communicate that the resource has permanently changed locations, you should not use Response.Redirect. This is important for […]

Set the admin color scheme for all WordPress users

Posted by & filed under code.

INSERT INTO wp_usermeta ( user_id, meta_key, meta_value ) ( SELECT id, ‘admin_color’, ‘classic’ FROM wp_users WHERE id NOT IN (SELECT user_Id FROM wp_usermeta WHERE meta_key = ‘admin_color’) )   UPDATE wp_usermeta SET meta_value = ‘classic’ WHERE meta_key = ‘admin_color’

SQL script to migrate from Movable Type to WordPress

Posted by & filed under code.

While trying to migrate a large blog from Movable Type to WordPress, I found the built-in export and import functionality unable to handle volume of content on the blog or to properly preserve the primary keys needed for permalinks. With assistance from Alvaro on the MisesDev list, we came up with the following MySql SQL […]