Skip to content

Database table prefix

See your WordPress database's table prefix, choose another when you create a site, and know how WP Waterfall keeps it through copies, restores, and migrations.

The table prefix is the start of every WordPress table name, set as $table_prefix in wp-config.php. New sites use wp_. You can choose another prefix when you create a site, and WP Waterfall keeps it everywhere your data goes.

A prefix holds letters, digits, and underscores, up to 40 characters. Capital letters count, so WP_ and wp_ are different prefixes.

How do I see my prefix?

  1. Open the site, then the Info tab.
  2. Find Table prefix in the environment details. Select the copy button to copy it.

Each environment shows its own value. A copy of an environment keeps the prefix of its source. The API returns database.table_prefix on the environment, and the MCP tool get_site returns it too.

How do I choose a prefix for a new site?

  1. Open Sites, choose Add site, then Install WordPress.
  2. Under Advanced, type the prefix in Table prefix.
  3. Create the site.

The prefix applies to a fresh WordPress site, WooCommerce, and a Multisite network. In a network, every site table uses it: with site_, the second site's posts table is site_2_posts.

You cannot change the prefix of an existing site. To use a different one, create a new site with that prefix and move your content there.

Where does the prefix stay the same?

  • Staging and previews copy the database with its prefix.
  • Clone content and promote copy tables by name. The source and target prefixes always match, because a copy starts from the source.
  • Backups and restores keep the prefix. If you restore a backup from a site with a different prefix, WP Waterfall renames the tables, user rights, and roles option so WordPress still works.
  • Search and replace covers every table with your prefix, including every site table in a network.
  • Local development writes your real prefix into the local wp-config.php. See Develop locally with DDEV.
  • Migrations keep the prefix of your backup. See Migrate a Multisite network or a site with a custom prefix.

Still stuck?

Email support at wpwaterfall dot com with your site name and what you tried, or send us a message.