Is their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !
Wordpress Blog Question
Collapse
X
-
Tags: None
-
Export posts, rename, import posts.Is their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !
You're welcome.Make money offa that Asian honey - www.eroticmp.com. -
list and rename all of your tables, update wp-config.php. Looks like you forgot to do the latter.
For anyone who wants to automate this, here's a sample quick 'howto' automate doing the table renaming. It's not what I'd call quality code. It is smart enough to only rename tables that start with the given specific prefix:
Remember to edit wp-config.php.Code:<?php $oldtable="wp_"; $newtable="mywp_"; mysql_connect("localhost", "mysql_user", "mysql_password"); $result = mysql_list_tables("mydb"); $num_rows = mysql_num_rows($result); for ($i = 0; $i < $num_rows; $i++) { if (eregi("^".$oldtable, $mysql_tablename($result, $i))) { $table = mysql_tablename($result, $i); mysql_query("rename table $table to ". str_replace($oldtable, $newtable, $table)) or die("Could not rename $table."); echo "Table: $table renamed"; } }Last edited by GrouchyAdmin; 06-10-2010, 01:38 PM.Comment
-
to all reading this: this is a very important step that everyone should take. it adds just a tiny bit of security to your WP installation, and should not be missed!
"wp_" is the default table prefix. To choose a new one, close your eyes and hit the keyboard a few times: "wjnif9494_".Comment
-
Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.to all reading this: this is a very important step that everyone should take. it adds just a tiny bit of security to your WP installation, and should not be missed!
"wp_" is the default table prefix. To choose a new one, close your eyes and hit the keyboard a few times: "wjnif9494_".Comment
-
thanks for the info ... very helpful ... question, though .... I'm told to do this for security , of course, but i've also been told it helps with seo ? Especially if you rename with a keyword instead of closing your eyes and hitting the keyboard, lol, any truth to this or no ?Comment
-
install this pluginIs their a way to change the prefix on the database tables from WP to something else after the blog has already been set up ? I tried changing them in phpmyadmin but when i did the blog just reset itself up like a brand new install and recreated new tables using the wp again, lol, so there must be something else i need to do if it's even possible. I know you can do it on a new installation, but obviously that would be a pain on a blog that 's been up for a while. Anyone have an answer for this ? Thanks !
http://wordpress.org/extend/plugins/wp-security-scan/
it has an option to rename your db from wp_ to whatever via the plugin, then deactivate it.Comment
-
Comment
-
I did try this .... however program kept telling me there was permissions issues even though i had set them all correctly and made config file writable, however, the writer of the plugin offers a nice description of how to do manually. So problem taken care of ! Thanks !install this plugin
http://wordpress.org/extend/plugins/wp-security-scan/
it has an option to rename your db from wp_ to whatever via the plugin, then deactivate it.Comment
-
-
This could be worth a look, have not tried it, but might be what you are looking for.
WP Prefix Table Changer
http://blogsecurity.net/wordpress/tool-130707Things that make ya go hmmmm....Comment
-
you need to be up to date with any software, if you leave a linux box with old exploitable software it can be hacked as well.
This applies to any software.Comment


AIM: GrouchyGfy
Comment