GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress Blog Question (https://gfy.com/showthread.php?t=972840)

TiaLing 06-10-2010 02:23 PM

Wordpress Blog Question
 
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 !

jimmy-3-way 06-10-2010 02:27 PM

Quote:

Originally Posted by TiaLing (Post 17235724)
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 !

Export posts, rename, import posts.

You're welcome.

GrouchyAdmin 06-10-2010 02:35 PM

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:

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";
  }
}

Remember to edit wp-config.php.

cyber 06-10-2010 03:04 PM

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_".

GrouchyAdmin 06-10-2010 04:00 PM

Quote:

Originally Posted by cyber (Post 17235881)
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_".

Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.

Supz 06-10-2010 04:41 PM

Quote:

Originally Posted by GrouchyAdmin (Post 17236050)
Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.

That is the answer I would expect from a Grouchy Admin :)

TiaLing 06-10-2010 05:56 PM

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 ?

fris 06-10-2010 07:15 PM

Quote:

Originally Posted by TiaLing (Post 17235724)
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 !

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.

fris 06-10-2010 07:16 PM

Quote:

Originally Posted by GrouchyAdmin (Post 17236050)
Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.

never been hacked myself, i doubt i will ever be either.

TiaLing 06-10-2010 09:26 PM

Quote:

Originally Posted by fris (Post 17236522)
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.

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 !

$5 submissions 06-10-2010 10:26 PM

Quote:

Originally Posted by GrouchyAdmin (Post 17236050)
Of course, wordpress in and of itself is basically just a way of saying 'here have free access to my server'.

Sadly, the above is true.

http://www.ixdownload.com/news/wordp...protected.html

Aka_Bluey 06-10-2010 10:34 PM

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-130707

fris 06-11-2010 03:54 AM

Quote:

Originally Posted by $5 submissions (Post 17236876)

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.


All times are GMT -7. The time now is 01:23 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123