Questions tagged [database]
WordPress stores user generated content, along with other configurable information, in a database (typically MySQL).
2,560 questions
1 vote
0 answers
30 views
Custom DB tables, being neat and tidy on delete
I am learning the steps for making a custom table for a plug-in I am designing. I have the functions that install the custom DB table working just fine, but I want to be a good citizen, and if a user ...
0 votes
0 answers
35 views
Why does psql work when called from shell, but not when included in a plugin PHP file?
I have the following php file in /wp-content/plugins/[my-plugin]/ test_db.php <?php echo phpversion(), PHP_EOL; echo '<br />', PHP_EOL; echo shell_exec('pwd'), PHP_EOL; echo '<br />', ...
3 votes
1 answer
86 views
DB table creation on reactivation - dbDelta errors on CONSTRAINTS
I'm working on a plugin and have an activation hook that creates several tables using dbDelta. The tables all get created without any errors or issues. Several of the tables have foreign key ...
0 votes
1 answer
52 views
Why does $wpdb->tables('all') omit some tables vs mysql "SHOW TABLES", and can I use $wpdb methods to get ALL the tables?
Basically, I've noticed that custom tables created by plugins show up in the array returned by $wpdb->tables('all') only sometimes See this question for background... In that question, and its ...
1 vote
1 answer
113 views
How to get list of ALL tables in the database?
This is strange. I know about $wpdb->table(). But it doesn't seem to show a table that I know "should" exist. I have the Profile Extra Fields plugin installed and activated. I used it to ...
1 vote
0 answers
51 views
How to easily delete image from database
Im trying to delete images from database, as its accumulating too many duplicated images, tried using some wp plugin but none has really worked, please is there any easier way to go about this? ...
-1 votes
2 answers
55 views
Cannot establish AJAX connection ('400 Bad Request')
Im trying to create a very basic AJAX script that shows a random post title, just so I at least know I can get AJAX to work. But I keep getting a 400 error in the Chrome console. I've been checking my ...
0 votes
0 answers
47 views
How can I efficiently process 50k+ Gravity Forms entries without running into memory or timeout issues?
I'm working on a WordPress shortcode that aggregates data from Gravity Forms entries. I have: Around 50,000 entries on an enrollment form Around 30,000 entries on a feedback form Over 200 trainings I ...
0 votes
1 answer
41 views
Is it possible to retrieve one specific container from a value field [closed]
Hello is it possible to retrieve in this case only display the text "Dit is een preview tekst" from the database? a:18:{s:9:"preheader";s:25:"Dit is een preview tekst";s:...
0 votes
1 answer
37 views
Database not loading after transfer via phpmyadmin
Following a hack; on a fresh install when after importing the database with phpmyadmin (dropping all tables inside database and import sql file after) wordpress does not seem to load the new database ...
0 votes
0 answers
46 views
How can you call to data in google sheet based on ID number?
I am making a website for a hockey league on WordPress. I have an API moving data into a google sheet. I want to create a template for "Player Profiles" using Elementor for where data will ...
0 votes
0 answers
82 views
Problem while importing a site in WPLocal: SQL files fail to import
I recently installed ZorinOS 17.2 on my pc that had Linux Mint XFCE 22 on it (by overwriting it). As a result, I had to reinstall WPLocal and import my sites again. As usual, I had to install some ...
1 vote
0 answers
29 views
Checking for stock in accordance with product's SKU
Im trying to figure out how to check for products in accordance with their SKUs. I have already figured out how to check if product is in stock. However, each product has 3 purchase buttons: one for ...
1 vote
1 answer
272 views
Error of 'P404 Migration skipped. Already completed.' on error_log file
Error_log files of two websites, https://saahm.net/error_log and https://ochim.com/error_log have the very frequent repetitive errors (P404 Migration skipped. Already completed.) like every second, ...
0 votes
0 answers
55 views
WP_Options tabel randomly increasing in size indefinetly
I have a problem with my wordpress page (woocommerce store, woodmart parent theme), where the wp_options table in my database gains almost 50MB in size, in what I thought was approximently every 10 ...