mySQL
Random Characters in Pages and Posts – Change Database Collation
If you are getting random characters in pages and posts it might be related to running database tables with a different collation to that of the database as a whole often caused by importing a database from an older server. There are a lot of scripts out there that can sort this out but this…
Read MoreDisable all Plugins in the WordPress Database
Run this query on the wp-options table to disable all plugins: UPDATE wp_options SET option_value = ” WHERE option_name = ‘active_plugins’;
Read MoremySQL text find and replace in field
UPDATE table_name SET column_name = REPLACE (column_name, ‘current string’, ‘new string’);
Read MoreWordPress change image links etc in database
UPDATE wp_posts SET guid = REPLACE (guid, ‘http://www.oldurl.com’, ‘http://www.newurl.com’);
Read MoreWordPress 3 Delete Post Revisions
DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = ‘revision’
Read More