Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [database]

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

0
votes
1answer
12 views

Create 3 Levels of relations with Wordpress

I need to create this type of relation in Wordpress: A Catalog can have many Products A Product can have many Catalogs A Category can have many Products A Product can have only one Category So when ...
0
votes
1answer
15 views

What does wp_term_taxonomy.parent reference?

My initial thought was that it referenced another taxonomy (i.e. an FK from wp_term_taxonomy.parent to wp_term_taxonomy.term_taxonomy_id). ORMs like Corcel are built under this assumption. However, I'...
0
votes
1answer
16 views

Using $wpdb | checking entered email against existing emails in db

Without ranting too much, here is my snippet: if (empty($_POST["email"])) { $emailErr = "Email is required"; } else { $email = test_input($_POST["email"]); // check if e-mail address is ...
-1
votes
1answer
25 views

Wordpress custom template database value insert issues. Please find the code if any issues let share [on hold]

<?php if(isset($_POST['suivant'])) { // create a variable //$seqno=$_POST['seqno']; global $wpdb; $firstname=$_POST['firname']; $lastname=$_POST['lasname']; //$...
0
votes
1answer
15 views

Exporting Post type from one theme and importing it to another theme

I am stuck on an issue here. I have this one theme which has the post type called 'listing' and I have this new theme with the post type 'iwp_property' When I use the Wordpress Exporter/Importer tool ...
0
votes
0answers
24 views

JPG Image extension not inserting into Custom table of wp

I've created a custom table on database and I need to upload image from my template page member. In this page I've done all the codings. I'm able to insert data but stuck on the image insert. I can ...
0
votes
1answer
19 views

Should I store critical css in the database or in my theme's filesystem?

I have a method for detecting a post's critical css when the page is requested and in-lining it to optimize page speed. I would like to cache this css to avoid having to compile it for every page ...
0
votes
0answers
9 views

update_post_meta performance in a loop woocommerce

I have a simple question, I am working on the list order screen of woocommerce and want to add some buttons that via ajax will update some data to the database using update_post_meta. The issue is ...
0
votes
0answers
11 views

Main menu assignement keeps reseeting

I've got my main menu assignment that resets over other day (approximatly). The main menu has to be assigned as primairy to work for my template. Eventually after one or two days i see that the menu ...
0
votes
0answers
7 views

Creating search page based database information

I am new to WordPress but not to web development. I have a mySQL database of information of products, and I want a user to be able to enter in a search bar for a product and all products containing ...
0
votes
1answer
22 views

Help me to intergrate product database to Wordpress

I am converting my company's website from ASP.NET to Wordpress. Everything is fine except that the old database of the website is designed to be quite troublesome for the conversion process. I need ...
0
votes
0answers
13 views

Dynamic Pages Equivalent

Is there a Wordpress equivalent to wix's dynamic pages? Where you can design the layout for a single page, connect the elements to a collection, and the page can then display items or groups of items ...
0
votes
0answers
18 views

how restrict user to give star ratings once for a post?

I am creating a plugin where i want to restrict a user to do give ratings to the post but not more than once. function frs_insert_ratings($content) { if(!is_feed() && !is_home()) { global $...
0
votes
1answer
21 views

Why am I being prompted to reinstall wordpress?

Some background: My website with blog had been moved to a new hosting company. Everything worked great. I periodically logged into the blog to update wordpress whenever prompted and all was well. ...
2
votes
1answer
24 views

WPDB: how to get the value of a field in a custom database table

For my WordPress site, I would like to echo the value of a column in a row (determined by the user's ID) of a table in the database for my site. This table was created by a plugin so it is not ...
1
vote
1answer
20 views

Databases - Submitting data from inputs to database [closed]

I am attempting to submit data to a table I have created within my database. For sanity sake I have called it 'wp_email_subscribers'. Including the wp_ prefix. I know there is a way to insert data ...
0
votes
1answer
35 views

Integrating data from external databases

I want to develop a new website to have three main components, a blog, a forum and a (huge) library of historical images. The library of images is stored in a MySQL database that is already in use on ...
0
votes
1answer
36 views

Help posting values to DB on submit using $wpdb->query

I am not new to WordPress but this is the first time I have tried to use the $wpdb. I have set up a form: <form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']);?>"...
0
votes
1answer
25 views

Is it possible to query from external database? [duplicate]

I have an extarnal database that I want to show some data in my wordpress site. What are the necessary steps to achieve this? edit: I changed config.inc.php according to https://stackoverflow.com/...
0
votes
1answer
27 views

error establishing a database connection 3

This error has already been faced by a lot of people, but I could not find an answer in my case. My wordpress website works perfectly in local What I have done: Upload with filezila Create a sql ...
0
votes
0answers
16 views

What's the easiest way to connect external database and display data on wordpress?

I want to use google cloud sql for keeping my data. The data is changeable from another application. I give necessary permissions to cloud sql but I cannot find easier way to show the data on the ...
1
vote
0answers
25 views

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I have no problems using the dashboard, viewing plugins, etc. but when I try to view the front end I get Your PHP installation appears to be missing the MySQL extension which is required by ...
0
votes
0answers
14 views

Moving attachment postmeta rows to new database

I am moving a lot of content from one existing (and damaged) Wordpress installation to another existing installation. I am trying to bring the media library attachments into the new site, but when I ...
0
votes
0answers
10 views

How to fix/avoid conflicts between multiple local host installs?

I work primarily on a windows development machine using WSL as my local dev server. Uptill now I haven't bothered configuring localhosts. Recently, I have started to work on multiple copies of the ...
0
votes
2answers
20 views

Comments are in database, don't show up in WordPress backend or frontend

I am in the process of rescuing the content from a WordPress site with a bloated/damaged database. Everything has gone according to plan except for the comments. I can see that the 4000+ comments are ...
0
votes
1answer
30 views

Can't successfully check if post with title exist in database

In WordPress, I am trying to import posts from a CSV file. I want to check, if post with title already exist. I am trying to do this using a database query, but I am still able to import the same ...
0
votes
0answers
5 views

Woocommerce - Category not work after import to database

I imported database in the phpMyAdmin - only woocommerce tables. When I go to product categories page then I have only a few categories, there must be more. UPDATED I just added a new category as a ...
0
votes
1answer
37 views

Is it best to avoid using $wpdb for security issues?

I'm using WordPress Multisite with multilingualpress. In order to get the href, outside of my navbar, to the page with the appropriate language, I am using an SQL query that queries $wpdb within the ...
0
votes
0answers
21 views

Comparison between multiple products

I have a wordpress problem. https://www.vpnmentor.com/vpn-comparison/nordvpn-vs-vyprvpn/ kindly go to this link. You should see a comparison between 2 products. I want to achieve something like ...
0
votes
0answers
13 views

How to create a custom linked drop down in wordpress?

I want a to add a linked drop down by populating data from database custom tables. The drop down basically will be selecting Country when selected the next drop down must display the corresponding ...
0
votes
1answer
21 views

WordPress Database Query works in phpMyAdmin but not in the code

I have a simple SQL query: SELECT * FROM test_table__csv_import_temp_joblist WHERE url ='https://www.example.com' In phpMyAdmin, it works well and returns a result. In WP it returns nothing: $sql ...
0
votes
0answers
15 views

Get the last post ID

I'm trying to understand the ID mechanism in wp_posts in WordPress. Whenever I add a product (woocommerce), page, or an image, they are recorded in wp_posts and assigned an incremented id. Let's say, ...
0
votes
1answer
24 views

Cant connect to database with php 7.3

when i update my site from php 5.6 => 7.3.0 . i recviced this error 'Error establishing a database connection'.. But when i downgrade php to 5.6 , my website work fine . Anyone know this issue . this ...
1
vote
0answers
23 views

Delete query not working in plugin

<?php if(isset($_POST['deleteValues'])){ global $wpdb; $table = $wpdb->prefix . 'addkeywords'; $where = array( 'id' => $id); ...
1
vote
0answers
22 views

I got an issue after i migrated a site

I recently migrated a site to a larger server. Everything appears to be fine, the site works everything transferred over. The site does have an SSL cert. Recently we started to get flagged as unsafe ...
0
votes
0answers
13 views

Warning :missing argument 2 for wpdb::prepare() and warning:cannot modify header information [duplicate]

Warning: Missing argument 2 for wpdb::prepare(), called in /home1/i9e6m0a8/public_html/contestbuzz.net/wp-content/plugins/contest-beast/contest-beast.php on line 2493 and defined in /home1/...
0
votes
0answers
8 views

split/part media uploads from post table

I'm here to ask a question close to another one or this another too but quite different. The reason is that in a magazine website with more than 3500 posts and the same size of images, the wp-post ...
0
votes
0answers
21 views

Updating the database after parsing CSV document

Im trying to update the database based in a CSV document, if the first value in the CVS row is equal or greater than 300, it should update the database, and so on....but I cant get it to work, the ...
1
vote
1answer
25 views

change wp user status from wp_users table

The wp_users table doesn't seem to change when I change a user role from editor to administrator via phpmyadmin when I edit it. Where is the user's role stored in the WP database? Any clues?
-2
votes
1answer
22 views

why you don't Implement PDO for access every thing to database

that is.. why wordpress don´t use PDO if it is more secure, and prevent a lot of injections, and issues with security. Thakns
1
vote
0answers
21 views

how to solve slow WordPress site caused by attachment_metadata

My WordPress sites starting to become slower by time, after two years they become very slow. I tried many things, such as: improved my DB, used cache plugins (WP Rocket and W3 Total Cache) which both ...
0
votes
0answers
63 views

Insert JSON output into Wordpress Database

I'm tearing my hair out trying to get this to work! I am writing a plugin to display cricket fixtures, results and match details on a website, taken from an API JSON output off another site. I have ...
0
votes
1answer
8 views

Finding a page holding a specific string/URL that is used in the content

In my situation do I want to find pages that have a URL in the content of the post that is redirecting to a 404 page doesn't exist. I want to able to search for this URL and find on which page(s) it ...
-1
votes
1answer
12 views

Prevent creation of unused database tables?

I have a Wordpress Multisite, and when a new site is created all the Wordpress database tables are created, but most are unused by me. Is it possible to prevent creation of these tables: _commentmeta ...
0
votes
1answer
18 views

How to insert data into MySQL database from the form created in WordPress site

How can I insert the data entered into the form in WordPress site to the MySQL database? I have created a form in the site. I am able to run PHP codes using snippets but I don't know how to update the ...
0
votes
0answers
19 views

Is there a way to save different data when USER interacts with the same POST?

I would like a kind of relationship database without create database because I’m not very confident with it. So I think about an alternative using Wordpress default features like posts, categories ...
-4
votes
1answer
45 views

how to Optimize Wordpress database for 10 million post? [duplicate]

i am trying to create a website with 10 million post but after half a million website posting goes too slow how i can optimize my database and import data like a new website
2
votes
2answers
156 views

Get Database Credentials from within the themes file

I have a freelancer working on a program for me. I gave him access to the theme folder via FTP. He uploaded phpMiniAdmin to that folder and, somehow, obtained the database credentials, which he then ...
0
votes
2answers
32 views

Create an unique ID number after submit form

I'm still learning PHP and MySQL and need to create a unique number in Wordpress site (as a order number ID) every time, when user fill and submit "order" form from frontend and save it to database. ...
0
votes
0answers
44 views

Failed Jetpack Update Destroyed My Wordpress Website

All was not lost, fortunately, but because I had an old copy of the website and database and used a local server I was able to determine the culprit behind the loss of all my recent changes. I was ...