It is mandatory, though it is not enforced.
Consider the scenario when two WordPress site has been setup in the same database. One with prefix wp_
and another with wp2_
. If you install your plugin in both of the sites with the prefix, your created tables will be wp_liveshoutbox
for first site and wp2_liveshoutbox
for the second site. But if you omit the prefix, both of the site will be using the same table named liveshoutbox
and the whole thing will break up.
Related Posts:
- WordPress and multithreading
- Actions or filters fired when data is saved in a custom table
- Custom Plugin Database relations
- Activation hook not creating table
- Creating table with plugin is not working
- How to create database table, add data, update and delete using wpdb via plugins?
- Using WPDB to output raw XML fails because of wp-blog-header.php
- wpdb->prepare and mysql UPDATE – how is it done?
- dbDelta not installing database
- $wpdb->update Issue
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Why doesn’t my Table get created?
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- Update database record in plugin
- WordPress plugin tables become corrupt
- multiple record insert creating many duplicate records
- Should I use wpdb prepare?
- Post meta vs separate database tables
- Update Option Stored in Multi-Dimensional Array
- Default table collation on plugin activation?
- $wpdb->insert_id
- WordPress Unit Testing – Cannot Create Tables
- Using a database view = evil incarnate?
- Check for success of $wpdb->update() correctly
- Writing a plugin that notify my friends of new post that mentions(@) them
- Getting wrong relationship value in $args in wp_Query?
- Not sure the best way to save custom plugin data
- The ideal place for storing persistent PHP objects
- What is the correct way for plugins to create tables with special charset/collation considerations?
- What is the added “complexity” of custom tables?
- Plugin development with unit tests
- How is the data stored in the database?
- Formatting of curly brackets array from WP database to get more readable output
- How to modify post content before writing to database?
- $wpdb->insert is changing a value
- Retrieving custom fields with $wpdb->get_results
- Hello dolly type plugin that allows people to add their own
- Really simple query giving error in SQL syntax
- Sample — test — data for large WordPress install
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- why creating tables using $wpdb is not being executed while installing plugins?
- How to use mysql IN statement with wpdb update method?
- How to store data for posts/pages built with drag-n-drop builder?
- Database for development
- Using $wpdb object in a widget
- Is there a naming convention for database tables created by a plugin?
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- How to edit mySQL wp_posts table from plugin php?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- Saving data from block editor to the database
- What for the tables ending with the meta used in database of wordpress?
- $wpdb -> Batch insert from XML File?
- Why my database table not created on activation?
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- How to Download and install plugin database remotely
- Get a custom table to an array
- Update/insert only a column of database table
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- How to update an existing table while updating plugin?
- How to insert data to a database table when the field is not yet created?
- Where to store the name of a custom table?
- Subscribe to author?
- include wp-blog-header not working on MAMP
- I’m designing a plugin to create database indexes. Suggestions?
- creating custom function to log actions in plugin
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- SQL query for custom taxonomy slugs
- Storing product price data in the database
- Issue regarding $wpdb->prepare()
- How should I store a log for my plugin
- Error on inserting a form value to database
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- Help With MySQL to WPDB Query Conversion
- Strange issue saving custom field data for a WooCommerce order
- how to search users by ajax live search
- How to perform a heavy and long process in cron jobs?
- Form doesnt save to database
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Update results, Before deleting the related category [closed]
- Storing data in wordpress database from ajax call from different website
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Plugin Development for registered users
- Create a table with wordpress plugin boilerplate
- Gutenberg table block with Bootstrap .table class
- Optimising a big WordPress site
- dbDelta SQL Query Not Working
- Can I create a table on my DB without creating a plugin?
- How to access custom WordPress database tables
- Is it necessary to do validation again when retrieving data from database?
- What is the best way to store a few fields?
- Plugin: database creation
- Adding columns to core tables
- How to query custom db table?
- Delete data from database using row action
- Show dynamic list of products from custom api of another database under same host
- WPDB: Update table
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?