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

learn more… | top users | synonyms

0
votes
0answers
11 views

Website error when I backed up my website from my old web host and restored the site onto my new web host

I just recently backed up my website from my old web host and transferred the domain to my new web host. I then restored the database files and SQL files as well as corrected the configuration.php ...
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 ...
-1
votes
0answers
9 views

how do i control the flow of data into database in wordpress like wise in jsp,php or any server languages [on hold]

I came across wordpress website bulding tool and been working on it since 10 days. How could i deploy code that controls the data like checking user login section or retreving the data from database ...
1
vote
3answers
47 views

How to fetch Data in WordPress using MySQLi or $wpdb

I have custom table like this: useraw 1. id (Primary*) 2. user_ip 3. post_id 4. time I am inserting data in the table using $wpdb->insert($table_name , array('user_ip' => $user_ip, '...
0
votes
2answers
28 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</...
1
vote
2answers
25 views

Selectively restoring original posts from a compromised site to a freshly installed WordPress database

My site has recently been compromised. If I restore the full database, google says there is hacked content on my site. The hacker has created many new garbage posts in my site - which already got ...
0
votes
1answer
325 views

“Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen?

I have apache virtualhosts up and confirmed working. I want to install wordpress for one of the vhosts, so I unpacked all the wordpress files in the document root for that vhost. I proceeded to follow ...
1
vote
0answers
21 views

Transferring WordPress Database - Serialised data

I'm attempting to migrate data that is using a plugin (WordPress Job Board) to a new instance of a plugin (WordPress Job Manager). The plugins are storing data differently in certain parts of the data....
0
votes
0answers
19 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
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
23 views

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

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
514 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 [closed]

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
30 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
34 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
56 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
468 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
657 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
10 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
33 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
43 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
458 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
433 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
58 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
8 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
31 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 [closed]

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
16 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
504 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
852 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
15 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
622 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
12 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
431 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
32 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
24 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) ...