Joshc
Joshc

Reputation: 3853

Changing wordpress table prefix after the installation is complete?

Can anyone please advise me if there will be any problems changing the wordpress table prefix, after the installation has been completed.

I'm halfway through developing my wordpress website and I would like to change my table prefix to make it a little more secure.

If I go to the wp-config.php and change my prefix, will it break my current install - or will it automatically update the database?

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = 'wp_';

I'm not great with databases, and I'm wondering if I need to run a query after I change this...

Thanks in advance for any help.

Upvotes: 3

Views: 3692

Answers (3)

Josh Davenport-Smith
Josh Davenport-Smith

Reputation: 5511

It won't automatically work just by changing the prefix in your wp_config.php. That is part of the process, but there are some database changes you need to make too.

Back-up before making any changes to prevent a disaster. Follow the instructions in the Wordpress Codex. Or, follow this walkthrough if you need help with the specifics of the process.

Upvotes: 3

li bing zhao
li bing zhao

Reputation: 1418

There is a plugin can help you easily to change your wordpress table prefix name.

Step1: back up your DB tables or everything.

Step2: install the Wordpress plugin :https://wordpress.org/plugins/db-prefix-change/

Upvotes: -1

david
david

Reputation: 57

backup the database first (of course) but as long as the tables in your database match the prefix it should be fine. I.e. if you renamed all the tables wp4_tablename then changed that prefix value in the config file that would work. If you just change the prefix in config without changing your actual table names that will break your site.

Upvotes: 2

Related Questions