Questions tagged [database]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Can I retrieve database table content with ACF plugin/custom fields? [closed]

Perhaps a silly question but I would want to retrieve data from some database tables (in Wordpress). I'm using a template with WPBakery builder which let me output 'custom fields' on posts and pages. ...
0
votes
0answers
8 views

Insert NULL value using prepare()

I have similars queries /* Query */ global $wpdb; $tablename = $wpdb->prefix . 'data'; $sql = $wpdb->prepare( " UPDATE $tablename SET `date` = %s, WHERE id= %...
1
vote
1answer
25 views

How do I get WordPress login to ignore the password input if a particular username is used?

I am trying to build a login where users with an account number as their username can login without a password or email. When the user clicks login, if the username that has been input exists in the ...
0
votes
0answers
19 views

Remove all \n\t from $wpdb->prepare()

If I have a prepare method with a lot of fields like the one below, to make the code more usable and clear, I always separate the rules of my query with newlines, but if I have problems with these ...
0
votes
1answer
11 views

Right way to store a large set of similar information on website? [duplicate]

I want to add a list of companies' information to my website and I want to display the list in a page. Then by clicking on each company, user can see more information about that company in its ...
0
votes
0answers
55 views

Why User_login key doesn't work with wp_update_user()

I recently was playing with wp_update_user(). I faced an issue while changing the user_login key. Others like user_nicename or other fields change, but user_login doesn't change even everything looks ...
0
votes
0answers
11 views

Interactively display data from database

I have some data written in a Google spreadsheet that I would like to use on a WordPress site. What I am trying to do is to create a form on my site, where user would input their birthday (day, month, ...
0
votes
0answers
9 views

filterable Search from specific database tables

I have a WordPress website and I created custom database tables using Participants Database Plugin to store my data in my database now I want to add a filterable search that only search from those ...
0
votes
0answers
17 views

How to implement data residency in my WordPress site

I am developing a WordPress multi-site with woo-commerce and subscription plugin. This site will be used in several country like Bangladesh, Australia, United States and Canada. But I want user’s data ...
0
votes
1answer
18 views

how to count click tab menu and insert to database

I have a tab menu with the following structure, clicking on which will add an active class to the li element Now I need to count the number of clicks of each tab separately and more importantly save (...
0
votes
0answers
17 views

How to add specific script to WordPress webpage that will working with user input and databases

We are new to WordPress and want to create Website that will be taking user input, running specific script through databases using that input and then outputting specific results on the web-page or ...
0
votes
0answers
24 views

Submiting with problems on one of the options php wprdpress

Hello I having a strange behavior with a simple submit in a page that has to fill some data from 2 inputs. Basically every time i try inserting without values it insert, if i try and put 'teste1' it ...
0
votes
0answers
25 views

Improve performance by removing unnecessary database queries

I've just found out that main page of custom theme im developing does 150 db queries on every load (what takes even 2.5 seconds). Many of them come from functions.php, and are caused by for example ...
1
vote
1answer
20 views

What structure should post_content have in the database?

Let me start off by saying that I have no WordPress experience at all so I may be asking a really stupid question. What I need to do is transfer a bunch of articles from a old MySQL database to a ...
0
votes
0answers
11 views

Preserving backslashes in post_content

I am trying to preserve backslahes in "post_content". When I escape the content with another backslash, it gets saved into the database correctly. However the next time I load the page in ...
0
votes
0answers
13 views

Adding prefix to WordPress database tables breaks admin capabilities?

I have attempted a few different ways (manually, using Brozzme's DB Prefix Tools & Addons plugin) to add a prefix to an older WP database (right now table names look like posts instead of wp_posts ...
0
votes
0answers
21 views

I wanted to Know that how can I give ingore to 0000-00-00 in my config file

I wanted to know that how can I give ignore to 0000-00-00 in my config file so that I didn't get an error of invalid value for this Zero-Date 0000-00-00 in my site database.
0
votes
2answers
22 views

What is my error trying to create a new table in the database?

I tried creating the tables in different ways and I always get the same error: "Error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ...
0
votes
0answers
12 views

Which database tables do I need to import?

So I am re-building a client's WordPress website. It's a niche news site with thousands of articles. It's so messed up that simply cloning it and applying a new custom theme won't work. The media ...
0
votes
0answers
17 views

Is it secure to copy a database from a hacked server?

Is it secure to copy the database and uploads directory from an old hacked server to a new server or may they be infected? I'm not sure what was the attack type but it will save much time if it's ...
0
votes
1answer
31 views

I imported an restore an database and It shows #1067 - Invalid default value for 'user_registered'

My database tables become corrupted so for fixing them I restored data and It shows an error #1067 - Invalid default value for 'user_registered' how can I fix it.
0
votes
1answer
21 views

Set a cron job to delete a specific database table table every midnight

my name is frank, i have been trying to create a cronjob that will be deleting a database table every 12 midnight but i found no help, below is the database table. please any help? DELETE FROM ...
1
vote
0answers
14 views

How to move the WordPress site Layout from test site to Production site?

I make the changes in the Layout of the test site, and on the other hand my production (live) site was running and people make account on that and make purchases. Now I want to transfer the test site ...
0
votes
1answer
14 views

How to edit custom table data in frontend

I am trying to edit the data from the table in the frontend. when I click the edit the form doesn't anything it show only empty field Html Code <form action="" id="postjob" ...
0
votes
2answers
35 views

What is the best way to resurrect and update my old WordPress site?

I had an old WordPress site that was neglected for several years. It had been hacked, and I disabled it. I'd like to now get it back up and running with the latest version (5.5.1). I see from the ...
0
votes
0answers
14 views

Converting URLs with spaces from AWS S3 to DigitalOcean Spaces

I am converting a Wordpess site that references a few thousand URLs whose objects are currently stored on AWS, and I would like to move them to Digital Ocean Spaces. The problem is that when the ...
0
votes
0answers
9 views

WordPress database(MySQL) sync with the MSSQL database

I have WordPress website and database(MySQL), I want to sync WordPress database to my other portal database(In MS SQL), is it possible to do it? Please guide me.
0
votes
1answer
30 views

PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2

Recently I updated my websites php from 5.6 to 7.2 but afterwards my website sometimes/often shows the internal server error message. I set debug to true and got the following errors: PHP Warning: ...
0
votes
0answers
31 views

Dynamic step filter with PHP, MySQL and Ajax

I don't know if I'm right here but ... I'm creating a dropdown step filter with PHP, MySQL and Ajax for an WP Website and there are three steps. So when i choose the first step, I get a new dropdown ...
0
votes
1answer
21 views

Always get <errno: 150 “Foreign key constraint is incorrectly formed”> creating a new table with foreign key

I create a table in WordPress database with this SQL query: CREATE TABLE IF NOT EXISTS wp_ccwwhsh_sent_messages( `id` INT NOT NULL AUTO_INCREMENT, `timestamp` DATETIME NOT NULL DEFAULT ...
0
votes
2answers
17 views

Two separate wordpress installations at one domain

so I have this wordpress website knivesreviews I ha ve blog section there, but it really is just category. I would like to make it separate wordpress installation, but I'm afraid it will mess up my ...
0
votes
0answers
11 views

Post shows up in database, not in dashboard, screws up other posts in the loop

I'm pretty new to WordPress development and I'm really not sure what's happening here. I've created a new category called "Advertorial" and my goal was to loop through it with a WP_query and ...
0
votes
0answers
12 views

How to extend database with efficiency

I've been wondering what is the best way to insert new values to a plugin built over a plugin. I'm using QSM quiz plugin for Wordpress, but I also need custom feature to include. It would add some ...
1
vote
1answer
34 views

Why is it that not all users have a 'session_tokens' meta_key record in the usermeta table?

I've created my own code based on this good article - https://shocksolution.com/2019/04/16/find-last-login-time-for-wordpress-users-in-the-sql-database/ to get the last login date for a user. I'm ...
1
vote
1answer
41 views

WP All Import - Using Xpath to set a select value

I'm working on setting up an import using WP All Import, the idea is to update/add/remove posts within a custom post type which contain ACF fields. The CSV we are importing contains a column called &...
0
votes
1answer
19 views

Any other way of storing plugin admin data setting

I created a plugin, and used the add_admin_menu() to add some page for users to put their Api keys and secret word. My page content is just a form to collect those data the users puts in, now my ...
0
votes
1answer
140 views

Sending posts from Python to WordPress

We are working on a platform that gets news from various sources and runs some NLP analysis on it. We have the backbone of the backend down, we're now trying to output our results on a feed. Since ...
0
votes
1answer
12 views

Will memcached improve performance with WP Super Cache already running?

I'm working on a WordPress site that is expected to host up to 1000 concurrent users, so I'm exploring ways to make it run as fast as possible. I've heard that memcached helps WordPress sites load ...
0
votes
1answer
23 views

Will there be any concern if I upgrade my current Wordpress Database server from Centos 7 Mariadb 5.5 to Centos 8 Mariadb 10.3?

Currently I am using a dedicated web server connected via private network to a dedicated database server to run Wordpress. The database server is running on Centos 7 and mariadb 5.5. I am considering ...
0
votes
1answer
31 views

Writing a function for WP Cron to run a SQL command daily

I usually use the events manager in PHP MyAdmin to set up scheduled events but since migrating to WP Engine they do not allow it and I must write a function to use WP Cron instead. What should this ...
-2
votes
1answer
37 views

Where are database files of a WordPress website?

There are many threads talking about managing database of WordPress via phpMyAdmin. But surprisingly, not many threads show where these files exactly are in the server. There is a thread here: ...
0
votes
0answers
14 views

I want to schedule email (date, time is in database->table) wp_schedule_event() not working

I want to schedule email (date, time is in database->table) wp_schedule_event() not working, I want to send emails to clients on future different dates and times from database, I am developing ...
0
votes
1answer
103 views

Having issues with wp_postmeta and wp_usermeta tables too big

We've got a WP+woocommerce site that is over 8 years old. The site has over 60,000 users and a similar number of orders. The wp_postmeta has over 4,000,000 records and wp_usermeta has over 1,500,000. ...
0
votes
1answer
59 views

Error establishing a database connection (configuration)

I hope you can help me to fix my problem. I am using WordPress for the first time, and I don't know why I am getting Error establishing a database connection knowing that I have created the file wp-...
0
votes
0answers
17 views

How performant is update_option relative to update_post_meta when updating on each post load?

I've created an AJAX function that updates the views count of each post load. public function updateViewCount() { // ... $postID = $_REQUEST['post_id']; $key = 'post_views_count'; $...
0
votes
1answer
15 views

Why do database examples sometimes finish with an add_option call?

Take for an example this perfectly ordinary demo of adding a table. I'm assuming we've all seen examples like this before. function create_table() { global $wpdb; $table_name = $wpdb->prefix ....
1
vote
2answers
27 views

How much of my site can I recover from public_html?

While exporting our site in order to migrate it to another hosting, I failed to import the database. This is necessary since all the posts and pages are kept only in the database, and I'm afraid the ...
0
votes
2answers
75 views

WordPress Development Workflow

Hello WP DEV Community, I understand this question has been asked ad nauseam... I'm trying to customize a development workflow (WordPress + WooCommerce) that allows me to develop locally (to speed up ...
1
vote
1answer
32 views

Migrating Wordpress from DreamHost to Azure Wordpress Resource via UpdraftPlus “wp_options table does not exist…” error

Goal Our goal is to migrate a wordpress site from DreamHost to an Azure Wordpress resource. Process and Errors We installed UpdraftPlus (pro version) on both builds. We utilized it's Send a backup to ...
0
votes
1answer
21 views

In which format the data is stored in Wordpress Databases?

In lot of cases, I have seen the wordpress stores data in JSON like structure but not exactly JSON. For example, in usermeta table, this is the value (with meta key as wpkgbe_capabilities) a:1:{s:13:&...

1
2 3 4 5
47