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

learn more… | top users | synonyms

0
votes
0answers
8 views

WooCommerce change price from URL endpoint / parameters

Here is what I am trying to do: A fellow site makes a request to my site like this: http://example.com/?add-to-cart=14&REQ&id=32&key=6337 Then if the REQ parameter exists, I crosscheck ...
0
votes
1answer
11 views

Can I customised default WP table

I have a XML file that consist of product information. Format of XML file : <product> <name>Product-1</name> <description>this is product 1 description</...
0
votes
1answer
15 views

execute custom function on database connection error

is it possible to execute a function on wordpress db connection error? I mean is there any hook or something in the (error stablishing database connection) thing...? I want to do something when I get ...
-2
votes
1answer
19 views

CSV generated through admin-ajax.php retuns empty [on hold]

I'm trying to generate a csv file based on data passed through an Ajax post. The posted data are user id's, these are then used to retrieve the user's email which will be put into a csv file. No ...
0
votes
1answer
509 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 ...
-4
votes
0answers
14 views

write a generic script which allows any database in the box and output as below [on hold]

Write a generic script which allows any database in the box and output as below. Database is running in host < > since <> Following are the details: # DB Name : TEST Version ...
0
votes
0answers
29 views

I want 3 WordPress websites, with the same users able to login to each

I want to install 3 WordPress websites, and I want users to be able to sign up to any of the sites and then access all the other sites with the same login credentials - like Google where you can sign ...
0
votes
1answer
32 views

WP Query - filtering terms with regex

is there a possibility of filtering posts by terms using regexp? My code doesn't quite seem to work. $tax[] = [ 'taxonomy' => 'tax_name', 'field' => 'name', 'terms' => $...
0
votes
1answer
18 views

How to create a custom page for unrelated database?

I'm writing a plugin to display products (my first plugin). I have a 10.000 product database with ids, names, images, description. I can display all of them from a page template/dummy page. How can I ...
0
votes
3answers
50 views

How to properly insert data into custom table via plugin

I have a plugin that reads data from an uploaded file and runs queries on the wp database. These inserts are into a table created by my plugin, so they aren't the post type. This is how I got it ...
4
votes
2answers
37k views

Connect to database using wordpress wp-config file

How can I connect to the database using the wp-config.php file ? I'm trying to make a script more Wordpress friendly, and I need to connect to the database, but without installing the script as a ...
-1
votes
0answers
11 views

About wordpress data

student will send application via school website. I want to edit custom database table data through wordpress option page/wordpress dashboard & print this via option/dashboard. How do I do this?
1
vote
2answers
467 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( '...
0
votes
2answers
23k views

How to display data from custom table in wordpress database?

I want to retrieve data from custom table, that I've made inside the wordpress database and display it in a wordpress page , like posts Thanks in advance
0
votes
1answer
407 views

Fatal Error in \wp-admin\includes\misc.php after failed WP update

I was recently approached by a client whose wordpress site had been hacked. The hack caused traffic from search engines to be hijacked to cuteonbags.com. I narrowed down the malware in question and ...
0
votes
1answer
655 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
1answer
8 views

Does Wordpress Support Using Named Pipes on the Windows Operating System?

Okay, suppose I wish to disable networking completely on a development machine running MariaDB 10.1.14, and instead use Windows' Named Pipes/Sockets. I'm using a local copy of Apache (2.4.23 x64 VC14),...
1
vote
1answer
10 views

cache specific data?

I want to display some information from database in each post, for example date of registration of user and user role etc. It is quite static data that doesn't change. Now if I make a query to the ...
-3
votes
0answers
32 views

Create like button from scratch

Would someone kindly give me a pointer on direction to take to create a simple test data unique to each user that can be updated by other user from front end and saved in database. I know it sounds ...
-1
votes
2answers
39 views

Which is less DB intensive in the loop: custom taxonomies or meta fields?

If I'm checking for a certain variable for each post in the loop, is it less DB intensive to specify that variable using custom taxonomies or meta fields?
-1
votes
0answers
42 views

Removing duplicate user emails from the database

I converted a database to WordPress. There are many users with the same email addresses. I imported all users, but now I'd like to delete the multiple users with the same e-mail and attribute all ...
7
votes
2answers
3k views

$wpdb won't insert NULL into table column

When i try something like this $status = NULL; $wpdb->update( 'table', array( 'status' => $status, ), array( 'id' =>...
0
votes
1answer
449 views

Inserting Post Meta From SQL

I'm trying to get post meta to be updated/replaced with $wpdb and running into issues. I have working SQL, but cannot get it work when coding it up for my WP plugin. Extra note: The post meta being ...
0
votes
1answer
70 views

Voting System, database connections?

Basically I'm trying to make it so that all pending posts can be voted on if the user is logged in. once it gets to 10+ votes it will become published. OK so no longer using database connections and ...
0
votes
1answer
428 views

Creating a search form and displaying results

Im trying to create a plugin for a site where the user can see a table of orders from customers in the Wordpress dashboard, It's a custom db but I'm using the wp-list-table, I've wrecked my brain for ...
0
votes
1answer
56 views

Database alteration: users who voted

I have a post voting system that stores and displays the vote as an integer. When someone clicks on plus the vote increases by 1, when minus - decreases by 1 (exactly the same way as on this website). ...
0
votes
0answers
10 views

Plugin option page store draggable list in WP database

I have create a plugin. On the plugin option page I use a sortable list. I will save the order in a db table (example xxxtest). What's wrong. I see that ajax transmit (success alert) but nothing ...
0
votes
0answers
7 views

Bulk update post slugs (find and replace all)

Is there a way to bulk update permalinks through the database? I have several 100 posts and all I want to do is replace all "-" to "_" to the permalink. I could just manually update but that's too ...
0
votes
1answer
27 views

Error establishing a database connection problem in xampp saver

Im beginner for the word press development, Im try to install my local host to word press but i had following problem, can you please help me to fix this My WP-CONFIG // ** MySQL settings - You can ...
-1
votes
0answers
11 views

Create dynamic webpages of images based on image tags [on hold]

I have a database of pictures associated with different tags. I want my website to dynamically create a webpage based on a specified tag. For example, if one clicks on "Puppies" I want all the photos ...
0
votes
3answers
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

Use Shortcode to pull specific custom post type into any page

I'm looking for a way to code a shortcode like [shortcode slug="slug-name"] that will pull data from the slugs specific custom post type and fill the variables of my template that I'm attaching or ...
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, ...
16
votes
1answer
502 views

How can I trust switch_to_blog()?

When I call switch_to_blog() with a blog id, I don’t know whether that blog actually exists. The function returns always TRUE. Test case: switch_to_blog( PHP_INT_MAX ); $post = get_post( 1 ); ...
0
votes
3answers
843 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
0answers
14 views

Multiple file upload frontend and capture their paths

<input name="image_url" type="file" /> <input name="Submit" type="Value" value="Přidat" /> I have this in html form and this in php : if ( $_FILES['image_url']['name'] != "" ) { ...
4
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
616 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
10 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
422 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
29 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
23 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
36 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
11 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
51 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
3k 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
26 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 ...