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’
Posts Tagged: WordPress
Bulk update post slugs in a WordPress blog
The following PHP script updates missing post slugs (permalinks) in a WordPress blogs, or reformats them according to your needs:
SQL script to migrate from Movable Type to WordPress
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 [...]
Recent Comments