Skip to content

Instantly share code, notes, and snippets.

@duogeekdev
Created May 9, 2015 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duogeekdev/c67ffb9789f24fb75d41 to your computer and use it in GitHub Desktop.
Save duogeekdev/c67ffb9789f24fb75d41 to your computer and use it in GitHub Desktop.
Replace wordpress table prefix in mysql
// Do this for all existing tables
RENAME table `wp_posts` TO `me_posts`;
// The the following
UPDATE `me_usermeta` SET `meta_key` = REPLACE( `meta_key`, 'wp_', 'me_' );
UPDATE `me_options` SET `option_name` = 'me_user_roles' WHERE `option_name` = 'wp_user_roles';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment