Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Change WP database prefix afterwards

I have a project near completion but forgot to change the db prefix on installation. Now i am a bit worried.

I am running wp 3.8.1. Are the described methods:

http://www.wpbeginner.com/wp-tutorials/how-to-change-the-wordpress-database-prefix-to-improve-security/ http://digwp.com/2010/10/change-database-prefix/

still viable with 3.8.1 since they are dated a few month / years back. And do you only have to change filenames starting with wp_ or would filenames starting with wp be also included?

and the prefix could be anything? fv1d89_ (characters and numbers) or bMkfo_ (only regular characters) 1209343_ (only numbers )

so if i would go the way described in the blog posts and using a prefix of guk34_ i would be more or less save to go?

Best regards r.

2 Answers

Walden Wang
Walden Wang
5,657 Points

There's a plugin in called "WP Better Security", it could change the prefix and have some features to protect your wordpress site.

Hi Ralf,

You only want to change the database table prefixes, not WordPress files that start with wp- (that would break your install!) And yes, the prefix can be anything MySQL allows, typically ending with an underscore to keep the actual table name easily readable.

uhhh sorry, filename wasn't the best wording, i basically meant the fieldnames inside the options and usermeta table NOT the physical php wp filenames. sorry - i am quite exhausted and worn out over the last days finishing this project, so a bad wording might slip in from time to time. :s

anyway bottom line i basically meant if the described method from the blog posts still applies to 3.8.x installs to rename the prefix of the table names as well as the fieldnames of the options and usermeta table which contain "wp_" as prefix. And fieldnames starting with "wp" shouldn't be renamed?