I was including the wrong file. Instead of update.php I should include upgrade.php. I know it’s a silly mistake but maybe help someone who does the same in future.
Related Posts:
- How to store in the database directly the translation?
- WordPress plugin tables become corrupt
- Post meta vs separate database tables
- Is it mandatory to use $wpdb->prefix in custom tables
- Update Option Stored in Multi-Dimensional Array
- How to output message during plugin activation
- Prevent network activation of plugin
- Inserting Taxonomy Terms During a Plugin Activation?
- Using a database view = evil incarnate?
- Writing a plugin that notify my friends of new post that mentions(@) them
- WordPress and multithreading
- The ideal place for storing persistent PHP objects
- What is the correct way for plugins to create tables with special charset/collation considerations?
- Using wp_cron with custom time interval and the register activation hook
- Formatting of curly brackets array from WP database to get more readable output
- Actions or filters fired when data is saved in a custom table
- Call activation hook multiple times
- Only allow plugin to be activated on root site of multisite
- Hello dolly type plugin that allows people to add their own
- Sample — test — data for large WordPress install
- Custom Plugin Database relations
- 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?
- Override pluggable functions in a plugin?
- Plugin activation error due to unexpected output
- How to store data for posts/pages built with drag-n-drop builder?
- Database for development
- WordPress register_activation_hook table creation not working
- Is there a naming convention for database tables created by a plugin?
- Activation hook not creating table
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- Saving data from block editor to the database
- Creating table with plugin is not working
- Settings not set after calling register_setting()
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- Get a custom table to an array
- Default Plugin Settings Not Writing to Database
- Update/insert only a column of database table
- Subscribe to author?
- Insert terms for custom taxonomy on plugin activation, or each page load (init hook)
- How should I store a log for my plugin
- 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
- Strange issue saving custom field data for a WooCommerce order
- How to perform a heavy and long process in cron jobs?
- Form doesnt save to database
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Is using custom table to suit business needs instead of transients a big hit to page load speed?
- Plugin Development for registered users
- Optimising a big WordPress site
- wpdb->prepare and mysql UPDATE – how is it done?
- dbDelta SQL Query Not Working
- dbDelta not installing database
- What is the best way to store a few fields?
- Plugin: database creation
- Show dynamic list of products from custom api of another database under same host
- WordPress Plugin Activate / Deactive Failing
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Make Database query only when option is updated
- Can we intercept user_login and user_pass from a wp_login_form?
- How best to handle database version dependence (from $wp_db_version)
- WP: Search and replace in DB programmatically
- Multiple array for post_content on plugin activation
- Using AND and bracket grouping in SQL not working
- Class cannot be found, but it’s available in the file, I get: Fatal Error: Uncaught Error: Class ‘Blocks\Base\Activation’ not found
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- Plugin can’t be activated [closed]
- How do I debug an error that a plugin is causing?
- Save temporary registration data
- Activate / Deactivate plugin
- Update plugin settings option_name for big plugin update
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Why User_login key doesn’t work with wp_update_user()
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Save in my custom admin page and redirect to the saved object
- Relational / Associate tables using native WordPress functionality
- WordPress doesn’t create table on plugin activation
- Insert Data into Database
- Update database record in plugin
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Why Worpdress doesn’t create table in database?
- Form and database, plugin development
- How to filter get_adjacent_post()?
- Refresh or redirect page after activate my plugin
- I can install my plugin in localhost but not in my server
- Deactivate plugin on registration
- How can I get a plugin to hook ‘dbdelta_queries’ — a filter used during version update?
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- how can a plugin return an error message on activation?
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Can I log the searches that are returning 404 in the DB?
- Programmatically creating posts based on external JSON feed (asynchronously)
- WordPress database error: [Table ‘bitnami_wordpress.questions’ doesn’t exist]
- My activator class isn’t running the code inside
- Issue with WordPress Plugin Activation Hook and Table Creation
- Custom Plugin Breaks Other Plugin Functions
- Custom database table entry edit page
- How to get list of ALL tables in the database?