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

learn more… | top users | synonyms

3
votes
2answers
3k views

Insert query inserts 2 entries, should insert 1

I've written a small posts by views plugin, well at least started one. My tables are set up but when they are updated the code adds 2 entries into my table when a post is loaded and views are tracked....
0
votes
1answer
599 views

Save custom meta box data to database

I have a custom post type Events. Under Events, I have a custom meta box which selects the time and data of the event: <?php $meta_boxes[] = array( 'id' => 'event_date_option', 'title' ...
0
votes
0answers
8 views

WP_Query - Find the State and Match Zip Code

I a trying to develop a search box in which people can type in the State and enter a zip code and in return the results will show specific people. I have added Advanced Custom Fields and each person ...
0
votes
1answer
412 views

How to set search query for joining two tables in sql?

What's the wrong with this query? SELECT l.company_name,DISTINCT c.sub_cat_name FROM tbl_listing l,tbl_sub_category c WHERE l.company_name LIKE '%cy%' and l.city_id='2' and l.area_id=23 ORDER BY l....
1
vote
0answers
17 views

Localhost to Staging to Development Dynamic WP-CONFIG

I am trying to setup 3 environments: Localhost, Staging and Development. The issue is that each environment has its own db. We want to have ONE config file which will dynamically change the Db ...
1
vote
1answer
17 views

Wordpress Multisite blogs not working after domain swap

After I swapped over my domains and updated every instance of the old domain in the database and everything else in this guide: https://wpengine.com/support/how-to-change-a-multi-site-primary-domain/ ...
2
votes
1answer
61 views

How to log database changes during an upgrade?

I have Wordpress installed in a classic LAMP configuration. Is there any way to, in a protected environment (like staging), automatically log all database changes (i.e. drop indexes or alter tables) ...
0
votes
2answers
25 views

Export only pages and posts with mysql dump

How to export only pages and posts using mysql database to database approach? More precisely: what tables should one select for dump (I suppose wp-posts and wp-post-meta ) is it safe to export only ...
0
votes
1answer
9 views

SELECT SQL_CALC_FOUND_ROWS with wordpress search

When I make a search on my site no posts are retrieved and through wordpress debug I get this error message: WordPress database error: [Table 'theme_se.wp_comments' doesn't exist] SELECT ...
0
votes
1answer
44 views

Ajax not working to insert, query and result data

On my site, through a form I send/register same information in database, do a SELECT/query and return it! Return the last table saved in database, just that user just entered on the form (along with ...
2
votes
2answers
1k views

Ways of managing staging and production wordpress sites?

Ok I've see a lot similar questions.. but they all either outdated or do not fall in in my problem. So the problem is: We have a website and its clone stage website. On that website apart form me ...
0
votes
0answers
24 views

Connect Local Install to Remote Database

I would like to connect a local installation of WordPress to a remote database. How would I go about accomplishing this?
0
votes
1answer
2k views

Retrieve and display data from custom db table in admin area?

So, i'm having a bit of an issue with a plugin i'm developing, I wonder if anyone can shed any light on the situation, as many, MANY searches have come back with zero help. :-/ Basically, my plugin ...
0
votes
1answer
25 views

Child theme functions.php file change database entries

I'm sure my title is not the correct terminology. I will do my best to explain what I'm trying to accomplish. Years ago I spent countless hours customizing a theme. I was finally forced to update ...
1
vote
2answers
31 views

Setup 3 Sites To Connect To 1 Database and Share Data

How do I setup 3 different Wordpress installations on 3 different servers, all of which connect to a single database and also share the same data? I'd like to set up 3 different servers. One for ...
0
votes
0answers
35 views

How can i change posts dates random?

I have totaly 5k content. I need change all of them dates. How can i set randomly dates? SQL? Example from 01.01.2010 to 20.06.2016 everyday can be dates.
0
votes
0answers
13 views

wpDataTables Front-End Editing with Custom Post Types [closed]

Has anyone used wpDataTables front-end enditing with custom post types? It seems as if it might be impossible for this to work because wpDataTables can only update one table at a time, and custom post ...
-1
votes
0answers
23 views

Error establishing a database connection using Azure

We're using Azure to host our website, last week we accidently hit our maximum number of connections so Azure stopped our website. But today, Azure has re-enabled out website but now it isn't working. ...
0
votes
0answers
12 views

Database with mixed collation (utf8mb4 & utf8_general_ci)

Each time I was uploading my WP install from offline to online, I was noticing strange characters in text and digging a bit I have discovered that wp-config.php on the online server was set to define('...
2
votes
1answer
26 views

Get all tags not just first 10 with wp api 2.0

if I do /wp-json/wp/v2/tags I only can get first 10, and seems the adding per_page=0 no longer work on it for getting actually all tags. Anyone knows how to actually get all the tags with wp-api 2.0?
0
votes
0answers
15 views

Override $table_prefix only for the options table

The only documentation i found was too obsolete. (https://wordpress.org/support/topic/two-sites-two-themes-one-database-same-content) and this one (Change options table prefix only) doesn't help me. ...
0
votes
1answer
24 views

Wordpress plugin boilerplate table create

Hi I have a terrible problem. I generated the code plug on the page: http://wppb.me/ And now, in no way do I add a table to the SQL database installation. I tried to do it this way: includes/class-my-...
0
votes
0answers
15 views

How to insert an uploaded file programmatically to DB?

I have uplaoded a 1GB file with extension bin.part (xxx,bin.part),directly to the uploads folder in the server, but I dont see it in the media library in the wordpress admin . I have tried using the "...
0
votes
0answers
14 views

Call to a member function insert()

I did a POST form and try to sign in to the Wordpress database is showing this error. Fatal error: Call to a member function insert() on a non-object in C:\wamp\www\teste\wp-content\themes\...
0
votes
1answer
489 views

Merge two databases: OLD SITE -> NEW SITE

I am working to a restyle of a website. I made DB dump from remote server and made local installation, then started to work on my local machine. While i've been working other post have been added to ...
1
vote
1answer
450 views

Create custom column in post table in wordpress

I want to add two custom field to table wp_posts, and that I need for my plugin. now to enable these fields I have changed core file of wordpress wordpress/wp-admin/post.php $data = compact( array( '...
1
vote
1answer
35 views

Wordpress Integration with Google Groups

I'm having some trouble trying to make an area on my WordPress site, that must be accessible only to members of my Google Group. I tried to make it with some plugin, but most of them would take me to ...
0
votes
0answers
37 views

How to generate notifications when MySQL data base changes

I am developing a WordPress multisite and I am wondering how I can generate notifications when MySQL database changes? For example the user in site #1 can sell his society. When he selected it, it ...
3
votes
1answer
35 views

stdObject stored in database. How does one convert it to usable format?

So I logged on phpmyadmin, went to check out how data is stored in a table and saw it''s 'data' columns contents (pasted below): a:8:{i:2;O:8:"stdClass":2:{s:5:"label";s:6:"Vardas";s:5:"value";s:1:"A"...
-2
votes
1answer
46 views

Fetch all categories from database

My Android project needs to fetch the database every day. I have a category structure like: console tablet camera phone laptop other The structure of the WordPress database is very confusing. I ...
0
votes
0answers
27 views

How to display the results of inner join to user?

I have three tables of contents. And I put them together and display the result to the user, how can I do this? MY CODE THAT INSERT DATA IN TABLES: function cadastra_experiencia($nome, $email, $...
2
votes
2answers
2k views

what to do when your WordPress database is too large?

Well I have asked this question in WP Forums, StackOverflow, and GoDaddy community as well, but nothing worked out. Hoping something is in here. I used 2 separated subdomains for my blog and site (...
2
votes
1answer
31 views

Change setting name in Customizer and keep the data

I created a theme while back when I was new to Customizer API and for some weird reasons I named theme settings as: $wp_customize->add_setting('thefunk_theme_options[header_color] Instead of just ...
0
votes
0answers
16 views

Sharing tables between 2 different websites based on the same database

I have 2 different websites installed on the same database. The 2 websites are sharing the users tables, but I want them to share the posts tables too. I tried to do it by editing wp-db.php. After ...
0
votes
1answer
39 views

How to connect and insert data in database of wordpress?

On my website, there is a section called "My Ideal plank." It is a form where the user will enter their data and there will be a return message with the type of ideal board for the person. First ...
0
votes
0answers
21 views

Wordpress Authentication without Wordpress functionality

The requirement is to authenticate against the WordPress users tables to get past the paywall but not offer any WordPress functionality. The problem to resolve is that since the user is ...
1
vote
1answer
67 views

Store and Work with huge array in WP [closed]

I need to get all terms that have post with dates in custom field. So I need a list for all dates from the term. I need to know exactly what is tha dates within each term in my site. It's not in term, ...
0
votes
2answers
2k views

Storing textbox values in Database

I am new to WordPress but I am good with PHP programmings, if I wanted to get value from the textbox and store it in the database in WordPress can I do? for ex form1.html <form name="form" ...
0
votes
0answers
15 views

Trim data before insert?

Recently I use this syntax to input data like below: $STRING_DATA = StrToLower(Trim($input_data)); $wpdb->query ( $wpdb->prepare ( 'SQL SYNTAX WITH PARAMETER STRING', $STRING_DATA ) ); Do I ...
3
votes
1answer
53 views

Right way of storing large number of custom post fields

On one of the sites of my multi-site network; I'm creating a custom post type 'Events'. Each of the 'Events' post will have about 30-50 custom post fields - because we require event creators to enter ...
-1
votes
0answers
30 views

Wordpress Theme linking to a Sharetribe Database

I am a wordpress newbie and am building a site and am keen to use a Wordpress Theme and then link it to a Sharetribe.com database. I do however want to have a multifunction search bar on the home page ...
0
votes
1answer
31 views

WordPress database error (wp_terms)

I'm having the following issue. Whenever WordPress try to get any term from database (product_tag, portfolio_tag, etc) I see messages like: WordPress database error: [Error writing file '/tmp/...
0
votes
1answer
647 views

How Do I Merge Categories With phpMyAdmin

I tried the following phpMyAdmin query to merge my category 112747 into my category 112748: UPDATE wp_term_relationships SET term_taxonomy_id = 112747 WHERE term_taxonomy_id = 112748; It did not ...
0
votes
2answers
5k views

Inserting data into custom tables

I am trying to create custom input tables to send data into custom tables on the wp database. I cannot get my script to do anything. The user will enter a type of liquor, like vodka or whiskey, ...
0
votes
1answer
14 views

Regenerate user_nicename column

I'm struggling with a database issue. I took control over a solution created by someone else. When inserting / updating users in the database, the earlier developers wrote a custom database script to ...
2
votes
1answer
234 views

Can I store my custom comment_type into wp_comments table?

I'm developing a system where a post can have multiple replies/feedbacks. As of now I's storing each of the comments as a serialized postmeta. But just today I figured out that I can use the existing ...
1
vote
1answer
37 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
3answers
821 views

Fetch a single row from a custom table for to a given ID

When I want to get a single row from a custom table of my WordPress database by providing a username through function call, it does not work. When I mention the username in where clause of the query, ...
0
votes
1answer
35 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
26 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 ...