ifacethoughts

table_prefix

This variable contains the prefix used for naming tables in the database used with WordPress. It is defined in [wp root folder]/wp-config.php and is set to “wp_” by default.

This variable comes into play when there are multiple installations of WordPress. The prefix can then be used to identify tables corresponding to a specific installation.

Plugin developers should use this global variable if they want to create separate tables for their plugin. Instead of using some hardcoded value, they should use this global variable. Here is the codex document related to this.

Back to the full list of global variables.

Technorati tags:

Discussion [Participate or Link]

  1. Abhijit Nadgouda @ iface » Blog Archive » Wordpress Global Variables said:

    […] $table_prefix […]

  2. references» Blog Archive » Wordpress Global Variables said:

    […] $table_prefix […]

  3. Working Within Limited Databases: How to Install Multiple WordPress Websites into a Single MySQL Database | Wordpress Webdesigner said:

    […] data, to certain database prefixes. In most cases, this prefix is set to the variable “$table_prefix,” making it the same as the prefix defined earlier in this tutorial. When this variable is […]

  4. Working Within Limited Databases: How to Install Multiple WordPress Websites into a Single MySQL Database | t1u said:

    […] as profile data, to certain database prefixes. In most cases, this prefix is set to the variable “$table_prefix,” making it the same as the prefix defined earlier in this tutorial. When this variable is […]

  5. Working Within Limited Databases: How to Install Multiple WordPress Websites into a Single MySQL Database | CSS Tips said:

    […] as profile data, to certain database prefixes. In most cases, this prefix is set to the variable “$table_prefix,” making it the same as the prefix defined earlier in this tutorial. When this variable is […]

  6. Install Multiple WordPress Websites into a Single MySQL Database said:

    […] data, to certain database prefixes. In most cases, this prefix is set to the variable “$table_prefix,” making it the same as the prefix defined earlier in this tutorial. When this variable is […]

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
My bookmarks

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.