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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

1
vote
0answers
7 views

Update results, Before deleting the related category

There is a DB that contains 2 tables posts and categories, Each category could contain many posts, So I'm using one-to-many relation between the two tables. Using the id of the categories and a ...
0
votes
0answers
9 views

How to save data input by client while filling out the form?

I have a small website with 2 different contact forms. One form, created using Caldera forms (drag-and-drop) is quite long, about 10 pages (can't make shorter), and i was curious if there is a way to ...
-3
votes
0answers
9 views

INSERT DISTINCT country_name to wp_tableName [on hold]

I want to insert Unique Name of country to table I have ID auto increment and column country_name If someone insert one country name it should not insert again.
-3
votes
0answers
25 views

Gutenberg showing blank page on local site [on hold]

I have just set-up a LOCAL SITE out of my live site on the web. I find that everything's working fine. Except editing the posts in Gutenberg. [Classic works fine]... I used git-ftp to pull ftp server ...
1
vote
1answer
64 views

What's the proper way to use a custom table?

I manually added a table to my wordpress database using sql using CREATE TABLE. I want to add functions for adding, modifying, and removing the data from this table just like with wp_update_user(). ...
0
votes
2answers
40 views

Display post number by category

I try to add auto increment post numbering by category. Like cat="myID" > post 1, post 2, post 3... Display post number not post ID number In find this solution, and use post_meta looks a good way. ...
0
votes
1answer
9 views

Images not found after migrating Wordpress website

I recently migrated my website to a new hosting platform and since uploading the files and changing the database details, some images aren't being found. I've checked the FTP and the files are in the ...
0
votes
1answer
31 views

How to reset the post ID increment

So, after working on a script that imports tons of data from another API, and doing lots of testing, all new posts I make have a post ID above 10,000,000. Thing is, now that I'm done, all my test ...
-1
votes
0answers
21 views

Partition the posts table by year? [closed]

Maybe this is more of a serverfault question than wordpress. But does anyone know how to partition the posts table in the database by year? Edit: Problem seems to be something other than the database....
0
votes
1answer
18 views

How to replicate data storage and querying using Wordpress. Custom posts/fields or Custom db tables?

I am new to Wordpress development but have experience of other dev. I would like to store information that in a more trad setup would mean setting up some tables with primary keys and then a joining ...
0
votes
1answer
16 views

error establishing database connection (WAMP + filezilla)

I am getting the error: Error establishing a database connection. I go to localhost, and it brings up the wampserver homepage (I am using wamp obviously) I click on my project which is called ...
0
votes
1answer
24 views

Is it possible to add different databases to a Wordpress installation? [closed]

I have written a script that automates a process, the end result is that it adds data to a database table each time it is run. I would like to put this on my website and query the database from a page ...
0
votes
1answer
15 views

Duplicate child theme incl. design changes

My goal is to be able to have two identical child themes except one thing (e.g. the color of a button) for the purpose of A/B testing using the Nelio AB Testing plugin. However, if I upload another ...
0
votes
1answer
28 views

create a table using user meta custom data

I am trying to create a table that is populated by the users: name, points, training completed. All of this data is in the users admin section. Is there a plug in or code I can look at to understand ...
-1
votes
1answer
23 views

Assign all Post in Wp to a specific Category

I used database to empty wp_postmeta, wp_terms, wp_term_relationship, wp_term_taxonomy. And I have post content of about 50k. I just created a new category in wp, is there any way to assign all the ...
0
votes
0answers
21 views

Is there a way for two deferent themes to consume two different DB on a same WP instance?

Before you downvote, yes I know there is a lot of similar questions around the web. But nothing touches my specific situation and how I should approach this problem. I have a build a new theme for a ...
1
vote
1answer
20 views

Multiple postmeta with same name for one post in wp_postmeta table

I have a hidden post meta called _payment for my posts. When i was looking into the tables of the wordpress, I noticed that there are tens of this post meta with the same name for the same post! Here ...
0
votes
0answers
10 views

Show Pyramid Tournament Data

we play badminton and play pyramid tournaments. The results thereof are in a external database table with unique id number, nickname and position (in the pyramid). I need to populate a wordpress page ...
0
votes
1answer
86 views

Different Taxonomy Values for Each Post

I'm trying to build a site at the moment that includes the different stores and times that albums will release. I'm not sure how I should structure it with custom taxonomies and custom fields etc. ...
3
votes
1answer
32 views

Multisite: How to store global options vs. site options?

Hey there I am pretty confused on how to store network wide options within a WordPress multisite installation. The usual way to store any settings in WordPress is: add_option(); update_option(); ...
0
votes
0answers
58 views

Website is not loading whenever I update something

Recently I found that my site is not running smoothly in the back-end and today I've realised that whenever I update a post, a page or even empty all caches from W3 plugin the site is not loading ...
0
votes
1answer
31 views

How to access custom Wordpress database tables

I have this sample code that I found online that's supposed to count the number of rows in a table. Of course... It works, but when I created my own table using phpMyAdmin... It no longer works. What ...
1
vote
1answer
34 views

database interactions using OOP

I'm developing wordpress plugin which store data in database. I tried to start OOP way for my plugin according to boilerplate from Best Practicies: https://github.com/DevinVinson/WordPress-Plugin-...
3
votes
0answers
31 views

How to track user progress?

I'm looking to build a very lightweight learning management system of sorts. I'll have 2 custom post types "Course" and "Lesson". I will associate the Lessons to the Courses, probably by using the ...
2
votes
0answers
13 views

Best Practice for Syncing Local Development With Staging Development [closed]

My team and I focus on custom functionality locally using MAMP on a few Wordpress projects while our graphics guy who works on the styling, typography and layout settings works on the staging ...
3
votes
1answer
33 views

Strange characters on wordpress site - Not UTF8 Issue

I've imported WordPress post data onto a new site and noticed I have strange characters showing on pages and Blog posts. It usually shows where apostrophes should be. I've searched multiple ...
0
votes
2answers
23 views

unable to use my wordpress site after moving

I downloaded my wordpress site and using it on localhost, but I couldn't. I changed my url in mysql db and followed this . still I do not have access to my website or wp-admin. I have https://...
1
vote
0answers
14 views

What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?

I'm currently testing some features on a sandbox environment. I have an existing production website and I'd like to ship my production users and other related tables on new sandbox environment. While ...
0
votes
1answer
22 views

Use admin-post to submit form data to external database

I am creating a custom form in WordPress to store and send data to an external database. As part of testing, I was successful in creating a form that submitted form data to the external database by ...
0
votes
0answers
15 views

Is my database concern correct regarding data imports?

I've uploaded 3,500 pages into custom fields (using various plugins) via a .csv file. Somewhat understandably there were a ton of errors in the .csv but eventually, I was able to successfully import ...
1
vote
1answer
31 views

Delete all post meta except featured image Using SQL

Please I just migrated my site and I found out that wp_postmeta consumes most of my cpu resources, Is the any Sql code to Delete all post meta except the featured image. I dont want to Use wp ...
2
votes
1answer
23 views

Deleting All tags except categories Wp database

Please Is there any way to run an SQL code to delete all post tags in wordpress except categories via database. I want to run an sql code that will delete all my tags in wp, but not deleting my post ...
0
votes
2answers
33 views

database error WordPress move from one hosting to other

I have moved my wordpress from one hosting to other but it gives database error Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'user'@'localhost' (using password: YES) in /home/...
0
votes
0answers
29 views

Connection between user_roles in database and show user data in the front-end

I'm working in WordPress and I'm trying a student/examiner service, with each role have specific task and rights in the site. This is my requirements that I want to implement (so far): I have 3 user ...
1
vote
1answer
27 views

Finding the original login information in the database

I manage the WordPress installation at my job but I'm not the first to occupy it. I've inherited this responsibility from a guy who no longer works here. Right now, we use and AD plugin that is ...
0
votes
1answer
25 views

How can I stop 'in use' message from intermittently blocking my wp_posts table?

How can I stop the 'in use' message from intermittently occurring in phpMyAdmin wp_posts table? I have no warnings and no error messages prior, but when it happens to my wp_posts table, all my ...
1
vote
1answer
17 views

Importing CSV into database table not working?

global $wpdb; if (isset($_POST["import"])) { $fileName = $_FILES["file"]["tmp_name"]; if ($_FILES["file"]["size"] > 0) { $file = fopen($fileName, "r"); while (($column = fgetcsv($file, ...
2
votes
1answer
41 views

Why can't I swap a DB in a WP install? [closed]

Something I'm confused about, trying to change the database in an existing WP install, for example: I have a local WP site (in XAMPP) working fine off a DB called database-A, however if I change, in ...
0
votes
1answer
35 views

Check if a value exists in database table

I have a custom self made registration form where a user needs to enter his address, I need to check if his address is already added in a custom table(which I have made manually with table prefix). I ...
0
votes
0answers
23 views

custom data model - link and populate from admin backend

I read this question Should I use custom post types or a custom database tables for plugin development? and the associated accepted answer, both of which I found very helpful. My question is, given I ...
2
votes
1answer
29 views

What is stored in the webserver? (Separated Database)

Assuming a classified website where real estate agents post their houses advertisement for rent or sale When I built the server, I separated the database and the webserver Database Server: Ubuntu ...
0
votes
1answer
18 views

content disappearing minutes after it's published

I'm with a very serious problem. Some information disappears after being published. Not exactly at the moment, but it shows up for a few minutes and then disappears. This does not happen with ...
0
votes
1answer
38 views

How to add download link from database on custom page template?

I used a variable in head tag $download = $wpdb->get_results("SELECT realname FROM odm_data where id='$id'"); When I call it using <a href="download.php?file=<?php $download ?>">...
0
votes
1answer
24 views

Lost in trying to create user database system

I've done a lot of reading and am still lost in how to approach my website. My goal is to have a login system, where these users have their own content they can save and manipulate. Say for example a ...
0
votes
0answers
35 views

Function stops working

I have a function which inserts certain values to the database on publish_post but for some reason when I add more to the code it all of a sudden stops working. Can you tell me what I am doing wrong ...
-1
votes
1answer
37 views

How to store a plain password in WordPress database in another field

Does anybody knows how could I get the plain password (via hook) in the moment a user registers and before it is hashed? For example, when they are going to register a blog. http://prntscr.com/k4sfbr ...
0
votes
0answers
32 views

wp_term_taxonomy count column is not saving to the requirement

As I'm trying to insert SubCategory into wp_term_taxonomy table. After executing the below lines of code $query_term_taxonomy = $wpdb->insert('wp_term_taxonomy', array( 'term_id' =>...
0
votes
1answer
31 views

After database migration, posts not showing up in dashboard

Transferring domains, I migrated a WordPress database using the export/import functions in phpmyadmin. Everything worked as intended, until I tried to change permalink appearance in the WP dashboard. ...
0
votes
0answers
22 views

HyperDB: How to display MySQL table data from external (non-default WordPress) database

My goal is to display information from an external (non-default) WordPress database using HyperDB. At this time information does not display in the generated table. Could someone provide an example ...
0
votes
1answer
64 views

How can a Firebase user registration and login be integrated into a Wordpress site?

We have an app that uses a Firebase database for users and they can register and log in using the app. I need a way to get this functionality in the website for the app but the website is a ...