WordPress stores user generated content, along with other configurable information, in a a database (typically MySQL).

learn more… | top users | synonyms

0
votes
1answer
19 views

Trying to establish connection to External Database

I'm trying to get a connection to a separate external database from the database the wordpress site depends on. I have a PHP file inside the same location of my theme, it is basically a blank PHP it ...
0
votes
0answers
18 views

Assign $wpdb to a class property to access WordPress Database [on hold]

In my PHP Class instead of calling global $wpdb all over the place to access the database I want to assign it to a class $_db property. If I vardump() my $this->_db it shows all the stuff that ...
0
votes
1answer
27 views

Get posts and include taxonomy term

How can I return taxonomy terms within post data, from the same query. Currently I'm calling get_posts / wp_query and then looping over and calling wp_get_post_terms. Needless to say it thrashes the ...
0
votes
0answers
11 views

INNODB Supports transactions, row-level locking, and foreign keys

When I try to create a table for a plugin (that was dropped in the past) I get the error: #1005 - Can't create table 'database_db.wordpress_popularpostssummary' (errno: -1) (Details…) And the ...
0
votes
1answer
25 views

$wpdb->delete column values IN ARRAY()?

I am wondering if this is possible? $wpdb->delete( 'table_name', array('id' => array(1, 2, 3)), array('%d') ); So, in this situation, it should remove 3 rows at once, and call the ...
-4
votes
1answer
10 views

Modifying 'post_content' on 'wp_posts' but post not getting updated [closed]

I had to make some changes in some of my wordpress posts and I thought about making them directly on the database. I opened phpMyAdmind and I went to 'wp_posts' and found one of the posts, clicked ...
-3
votes
0answers
24 views

Wordpress content not updating

Any Ideas on why changes on a website does not reflect until user logs out and log back in. However, the updated content can be seen in the database even when it is not showing on the website.
0
votes
2answers
28 views

Change options table prefix only

I am not able to find, How can I change the only options table prefix. I do not want to change other tables prefix only need to change options prefix. Please guide me. Thanks
0
votes
1answer
32 views

Get wp_current_user_id using PHP and MySQL

awesome people of the Stack Community! Like the newbie coder I am, it took many hours but at last I got: a HTML form inside wordpress -> to submit value to MySQL database -> and then store the ...
3
votes
1answer
38 views

Is sanitize_text_field() is enough to save to DB?

So here is the situation. We allow users to enter input data, i.e. user_first_name and user_additional_comments. Then we use sanitize_text_field() , which is named as save. But after this filter: ...
0
votes
1answer
29 views

what are pmxi tables?

I'm on multisite mode. I can see that for each site of the network there are 4 'pmxi' tables. What are they for? They're something like this siteprefix_pmxi_files siteprefix_pmxi_imports ...
2
votes
1answer
34 views

Usage of Direct Database Call Without Caching Error

I have a custom function that creates a dynamic copyright year range based on the year of the first and last posts in the database: function jldc_copyright_dates() { global $wpdb; ...
-3
votes
0answers
21 views

Error establishing a database connection on amazon ec2

I'm getting an error establishing a database connection on Amazon EC2. The database is there and I have the right credentials. Here is my wp-config.php: <?php /** Enable W3 Total Cache */ ...
0
votes
3answers
42 views

moving wordpres from one VPS to another - Error establishing a database connection

I had a wordpress site on VPS server and decided to move to faster one - with the same host provider. I had VPS on CentOS with Plesk and moved my domain to another one with the same OS. I have ...
0
votes
0answers
21 views

Search result by taxonomy name

Currently my search filters by title and I'm trying to filtered by taxonomy tags. How do you I do that. Here is my code: $query = " SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_status = ...
0
votes
1answer
41 views

Sorting custom post type columns with external data and without meta values

I created a custom post type 'Book', for which data is stored in an external database (like ISBN, author etc). The WordPress database contains the ISBN per custom post, which connects the correct data ...
0
votes
0answers
21 views

Using SET statements in wpdb query

I'm running the following queries directly on the database: SET @curr_time = IF(TIME(NOW()) < '06:00:00', DATE_SUB(NOW(), INTERVAL 1 DAY ), NOW()); SELECT Start_Time as 'start_time', Title_Name as ...
1
vote
1answer
30 views

Wordpress Database lost auto increment

After rolling back a Wordpress database to a backup version it seems that all the tables lost their auto_increment on the primary key columns. I read on another post this could be to do with InnoDB ...
1
vote
0answers
28 views

The word 'exit' in a content box causes WordPress to serve a 'Not Found' page [closed]

I've been developing with WordPress for years, and this is a new one. When the word 'exit' is included in the content of a post, even if inside another word like 'complexity', the post will not save. ...
0
votes
1answer
32 views

wpdb query on custom table not working [closed]

I want to show one custom table from my database on which WordPress is installed. So I googled this code: <?php $results = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ...
-1
votes
1answer
24 views

1000+ records per user: Multiple user tables or one large table

I want to allow users to have 1000+ records in my wordpress system. I was wondering is it best to have just one table for all users and their records or one table per user? Keep in mind that I ...
1
vote
1answer
19 views

Can I transfer a mysql database to another site?

I've been playing around with WP for about 2 years so I know my way around, but I'm kinda new to working with databases. I've been making sites not relying on a database too much. However, I have a ...
0
votes
0answers
12 views

Exporting a multisite DB for a single site production site

So I have a wordpress multisite that houses all of my client test sites(14). This means that its all one database obviously. This client is now ready to go live on a single wordpress instance so I'm ...
0
votes
0answers
31 views

Storing Unique Data on the Database

I have created a custom table on my database using the code below: function dbcreator_activate() { global $wpdb; $table_name = $wpdb->prefix . "ftbstatistics"; if( ...
0
votes
1answer
22 views

How to transfer one domain to another domain without losing theme options (customizer)?

I have developed the one wordpress site with custom theme, Here I used the custom customizer options. Then site completed on my local machine I mean localhost (http://127.0.0.1/wordpress). Now the ...
0
votes
1answer
22 views

Finding the login page from database?

long story short I was given the login information for an older gentleman who unfortunately passed away who managed a young lady's Wordpress website. Was asked to manage and update the site for the ...
0
votes
0answers
12 views

Options of accessing wordpress data from mobile app

There is an existing wordpress website and I would like to make native app(probably will do crossplatform native with React Native as I have experience with it) for it. So my question is: is there an ...
0
votes
0answers
20 views

Custom database query with accents returning no results

I have an issue where using accents in my custom database query (wpdb) returns no results. $wpdb->get_results( "SELECT * FROM table WHERE city = 'Montréal'" ); Returns nothing, while ...
1
vote
1answer
36 views

Plugin Options Not Saving to Database in WP 4.5

WordPress 4.5 broke my plugin and there are no obvious clues why in the change log The plugin controls the visibility of menu items. Users select one or more countries and whether to show or hide the ...
0
votes
3answers
51 views

Create Tables in WordPress

I am very new to WordPress, and today is my 1st day on WordPress. I have a requirement which is very normal for any developer on their platforms, but for me it's challenging In my WordPress site I ...
0
votes
0answers
14 views

same users different websites other then wordpress

I am creating a network of sites. I have some wordpress installations as well as some other scripts installations. I know that i can use single wordpress users table for different wordpress ...
0
votes
2answers
57 views

Why my wp_posts data is so huge?

My WordPress has only 23 posts but the wp_posts data is over 70MiB. Is it the average size? The Posts I have were created with WPBakery Visual Composer and has 10 revisions. However, I deleted all the ...
0
votes
1answer
24 views

Scheduling posts in database

I have more than 100 posts to schedule. I have set the date and the status (future) with a SQL query. But when the time comes the post is not published and in desktop I can read message 'Schedule ...
0
votes
0answers
12 views

compare database values before an update

in my wordpress, I want to store my form data to database by using: update_user_meta(); I successfully store the data to database and write it to the page, but the problem in whenever I updated the ...
0
votes
0answers
25 views

Custom post types from custom database

For a plugin I want to use custom post types based on data stored in an external database. This database isn't related to WordPress (the structure of the tables is independent). The datastructure is ...
0
votes
0answers
16 views

Wordpress Switching from Dev to Live URL - Database [duplicate]

So I was working on a WP site with a staging URL. When it was time to go live I thought I could just change the WP_HOME & WP_SITEURL in wp-config.php and live would be good. I quickly realized ...
-1
votes
1answer
10 views

database search feature

I am looking to create a website that creates and searches the created database then displays the results on a custom page. I initially thought this would be a lot easier than it is proving to be. I ...
0
votes
1answer
16 views

Missing latest posts and options after DB migration via phpMyAdmin

The latest posts and options are not appearing after importing the database. I'm missing all the latest posts and the latest Advanced Custom Fields. The export is from the remote server and import to ...
0
votes
0answers
15 views

Database collation and char set issue

I attempted to import my WordPress website from local host to live server online and i get an error #1115: that i have wrong db collation of utf8mb4. So i googled and changed the cllation to ...
1
vote
2answers
53 views

Installation with sql server express edition

I have developed a web portal in wordpress using xampp server. i have my database in my sql. Now i need to deploy this wordpress portal on other system with sql server express edition. So how can i ...
0
votes
1answer
26 views

What unexpected data might be stored in terms table and related tables?

In order to remove thousands of old taxonomies and terms used during development, I recommended the following SQL queries to another dev: TRUNCATE wp_terms; TRUNCATE wp_termmeta; TRUNCATE ...
0
votes
1answer
31 views

Why Worpdress doesn't create table in database?

Primarily this is the only code in my main plugin page. It should create table in the database while I am activating it. But, it is not working at all. Plugin activating successfully. Please, help me ...
1
vote
0answers
28 views

wp_insert_post causing There was an error connecting to the database: Access denied for user 'root'@'localhost' (using password: NO)

I have a multi-step form which I am trying to fix but I am getting the error: Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in ...
0
votes
2answers
43 views

Where does the actual data stored by add_post_meta

I am pretty new to WordPress API, loving it btw, I have a small project, adding a like button to the end of every post, pressing it makes user like the post, button changes to dislike, pressing again ...
0
votes
0answers
20 views

Add a Filed to WordPress User Table

I am going to give points for users for their activities. I thought to add a field for user table. Is it a bad idea? I use my own function to update that field.
0
votes
0answers
17 views

Why Do I Still Getting Duplicate Rows in SQL?

I'm creating a Custom Freight System which stores the order and the products requested by the user into the WordPress Database. The Problem When I insert the product into the wp_my_custom_products ...
0
votes
1answer
47 views

Restore woocommerce orders

Recently my server team replaced my database and they put our previous Database . So we lost our order details of one day[particular day] . Now the server team give the backup that contain the lost ...
0
votes
2answers
51 views

User content database

I am trying to set up a login where in each users profile they can add their CV and details. These details and CV will then be shown in a page that can be seen by anyone. The user has the option to ...
0
votes
0answers
24 views

Join Wordpress databases from 2 different installs

I'm just now getting into SQL and the core of Wordpress (PHP). So I'm not an experienced WP developer but not intimidated by the tools. But, if the answers could be dummied down a bit would be very ...
0
votes
0answers
42 views

How to delete a stuck post using phpMyAdmin

I was attempting to change some leftover http:// references in the DB using Update/Set SQL statements. I was getting confident and started doing them in bulk and stopped noting exactly what I was ...