WebFaction
Community site: login faq

Most WordPress users have the same table prefix ‘wp_’ in wp-config.php. That is not good for security reason. I did researched how to do it but I would like to know your experience how-to in Webfaction before I start.

asked 31 Oct '10, 10:05

Mikey3D's gravatar image

Mikey3D
16137
accept rate: 0%


WebFaction's built-in installers use the default table prefix. If you want to use a different table prefix for a new WP installation, then you can install WP manually with the following general steps:

  1. Create a new Static/CGI/PHP app.
  2. Add the new app to a site.
  3. Create a new MySQL database and make a note of the database name and password.
  4. Download WordPress and extract the files into your new app directory.
  5. Go to your new site to complete the installation.

If you want to change the table prefix for an existing WP installation, there are many examples of how to do this available on the web. This one seems reasonable: 6 Simple Steps to Change Your Table Prefix in Wordpress

Hope that helps!

permanent link
This answer is marked "community wiki".

answered 31 Oct '10, 10:13

seanf's gravatar image

seanf
12.0k21635
accept rate: 37%

edited 31 Oct '10, 11:13

OK, how would you change table prefix in productive site?

(31 Oct '10, 10:28) Mikey3D Mikey3D's gravatar image

I've updated my original answer with info to help you change the prefix for an existing site.

(31 Oct '10, 10:35) seanf seanf's gravatar image

Good, I haven’t missed anything by your research. I’m going to do it now. Thanks seanf.

(31 Oct '10, 10:45) Mikey3D Mikey3D's gravatar image

I did login phpMyAdmin.

I can change all WordPress table prefixes but why can’t I changed some parts of BuddyPress table prefixes:

I can change this:

xxxxxxxxx_bb_forums
xxxxxxxxx_bb_meta
xxxxxxxxx_bb_posts
xxxxxxxxx_bb_terms
xxxxxxxxx_bb_term_relationships
xxxxxxxxx_bb_term_taxonomy
xxxxxxxxx_bb_topics

Why can’t I change this?

wp_bp_activity
wp_bp_activity_meta
wp_bp_friends
wp_bp_groups
wp_bp_groups_groupmeta
wp_bp_groups_members
wp_bp_messages_messages
wp_bp_messages_notices
wp_bp_messages_recipients
wp_bp_notifications
wp_bp_xprofile_data
wp_bp_xprofile_fields
wp_bp_xprofile_groups

When I run SQL query/queries on database myWPdatabase:

Rename table wp_bb_activity to xxxxxxxxx_bb_activity

I get this:

1017 - Can't find file: './myWPdatabase/wp_bb_activity.frm' (errno: 2)

Thanks, Mikey3D

(31 Oct '10, 14:05) Mikey3D Mikey3D's gravatar image

Try using ALTER TABLE instead, for example:

ALTER TABLE wp_bb_activity RENAME xxxxxxxxx_bb_activity;
(31 Oct '10, 14:19) seanf seanf's gravatar image

My fault! I can’t believe it how I could miss that bb and bp are difference. Sorry!

Are those two commands the same difference?

(31 Oct '10, 14:36) Mikey3D Mikey3D's gravatar image

Haha, I didn't notice that either!

Regarding the difference RENAME TABLE vs ALTER TABLE ... RENAME, I'm not really sure why the latter would work when the former wouldn't. I just found that as a possible workaround for the 1017 error.

(31 Oct '10, 14:42) seanf seanf's gravatar image
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×239
×69

question asked: 31 Oct '10, 10:05

question was seen: 3,599 times

last updated: 31 Oct '10, 14:42

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM