Skip to content

Instantly share code, notes, and snippets.

@MaraScott
Created February 20, 2013 06:48
Show Gist options
  • Select an option

  • Save MaraScott/4993485 to your computer and use it in GitHub Desktop.

Select an option

Save MaraScott/4993485 to your computer and use it in GitHub Desktop.
Name : wp_table_prefix - Language : Sql - type : Update - platform : wordpress - tag : MySQL
/* update database after modification of $table_prefix = 'wp_'; in wp-config.php */
/* see : http://stackoverflow.com/questions/13815461/you-do-not-have-sufficient-permissions-to-access-this-page-without-any-change */
UPDATE `{%TABLE_PREFIX%}usermeta` SET `meta_key` = replace(`meta_key`, '{%OLD_TABLE_PREFIX%}', '{%NEW_TABLE_PREFIX%}');
UPDATE `{%TABLE_PREFIX%}options` SET `option_name` = replace(`option_name`, '{%OLD_TABLE_PREFIX%}', '{%NEW_TABLE_PREFIX%}');
/**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment