Help articles Database

How do I change the table prefix in my wp-config.php file?


Changing your table prefix should never be necessary for a live site, and will almost certainly break your WordPress site. Please use caution when changing this value, and do so only if you know what you’re doing. You’ve been warned.

The table prefix in WordPress specifies what string is prepended to all of the tables in your WordPress installation’s database. WordPress uses this value to determine which tables in the database it recognizes as belonging to the current site. Sites created on Flywheel have a randomly generated database prefix.

If you are migrating your site to Flywheel, you will almost always need to change the table prefix setting to match that of the tables that you are importing. (This is much easier than changing the table data to match the prefix setting.)

You can view and modify your table prefix setting in the Flywheel control panel, under the “Advanced” tab for a site:

Change the database prefix in the Advanced tab of the site's Flywheel Dashboard

In this case you can see that the prefix for the site is wp_. This is the default for WordPress installations.


Prefixes generated by Flywheel will look like wp_jx3s3d5pqm_

Clicking “Change” will open a modal window asking you what value you’d like to change it to:


It is not possible to change your table prefix directly in the wp-config.php file; you’ll need to use the method above. For more information on making changes to your wp-config file, see this article: How do I make changes to my wp-config.php file?

Was this article helpful?

  • Frequently Asked

    The most commonly asked questions, and a few we just think you should know.

    26 Articles
  • General Questions

    Questions that don't fit elsewhere, or those about Flywheel in general.

    59 Articles
  • Getting started

    Everything you need to know to get your first Flywheel site up and running.

    16 Articles
  • Domain Names

    Details about how to manage DNS and point your domain names at Flywheel.

    13 Articles
  • Billing & Accounts

    Questions relating to payments, billing and managing your account on Flywheel.

    13 Articles
  • Blueprints

    Learn everything there is to know about what Blueprints are, how to create them and how to make the best use of them.

    5 Articles
  • Database

    How to access your WordPress database to make changes and update content.

    3 Articles
  • Local by Flywheel

    Everything you need to know about our amazing, free local WordPress development software for Mac and PC.

    6 Articles
  • Organizations

    Everything you need to know about managing your team with our Organizations feature.

    8 Articles
  • Plugins

    Which plugins work best, which plugins work worst, and everything in between.

    7 Articles
  • Security

    Details about everything Flywheel does to makes your site so secure.

    13 Articles
  • SFTP

    Information on setting up and troubleshooting with SFTP connections and file transfers.

    4 Articles
  • Simple SSL

    All there is to know about our free, automatically installed and activated SSL certificates.

    9 Articles
  • Staging

    How to get the most out of Staging, which allows you to duplicate a site, make changes, and then push those changes to the live site.

    7 Articles
  • White Label

    Everything you need to know about our Whitelabel subscriptions for branding and reselling Flywheel.

    4 Articles

Flywheel help

Help is just a click away! Log into the Flywheel dashboard to instantly chat with an expert, open a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in
WordPress experts

Try it yourself. It's free & takes less than 60 seconds. Sign up

[if lte IE 8]
[if lte IE 8]