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
1answer
48 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
15 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
60 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
22 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
12 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
63 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
121 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
23 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 ...
2
votes
1answer
50 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
103 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
312 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
17 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
58 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
51 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
51 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
20 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
315 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
68 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
19 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
17 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
29 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
100 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
36 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
40 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:&...
0
votes
1answer
18 views

Is there a way to edit the WP content database in an admin panel or external page?

I have a lot of content and some of it needs to be updated and edited. I was wondering (hoping) that there is a way to access the database from an external linked source, i.e. Excel, or in a table on ...
0
votes
2answers
88 views

WP 5.5, child themes, customizer and a weird cache issue

Update: I created a fresh new installation of WordPress, copied both Base and Base Child themes and activated Base Child. The Appearance/Customize gives the same white screen as described in point 1 ...
0
votes
1answer
31 views

How to list all categories and their IDs using SQL query?

I am looking for a SQL Query that can give the list of all categories created in WordPress Site along with it's category IDs. Please advise a query to get it as category/term relationship is quite ...
0
votes
0answers
26 views

How to Submit Form in Admin

I have a Form in Admin. How can I Submit Form in Admin Panel ? I searched a lot in Google but did not get any good result. How the Add New User for is submitted ? I would like to follow the way.
0
votes
0answers
23 views

How to filter database data based on select options using jquery

I found this code on a website which works fine for filtering data from two different select box but I have totally five comboboxes. I want to extend this functionality to work for the other three ...
0
votes
0answers
14 views

How do you tie a database to a block?

I am rather new to wordpress, and need help tying a database to a block and get it to function like a search engine for a candidate.
0
votes
0answers
14 views

Delete Custom Post Types via SQL

I have a website that operates similarly to many freelancing websites where people can make bids. Its become painfully slow in recent weeks and I used query monitor to find out the issue is likely ...
0
votes
1answer
63 views

Update wp_postmeta table based on 2 keys

I want to update the wp_postmeta table in the database based on 2 keys, is there a way to do that using any of the wordpress default functions. This is my DB query which is working fine: $sql = "...
0
votes
1answer
73 views

/wp-admin not accessible after migrating to local host (no plugin issue)

I migrated my local Wordpress site to my WPEngine account and it's been working without any problem! After adding some content, I decided to export the database from the live version and import it to ...
0
votes
1answer
15 views

Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?

I made a li'l module to help myself develop sites for various clients, and one thing it provides is an easy template for custom post types. It allows me to register post types much more easily and ...
3
votes
1answer
38 views

Prevent changing the length of post_name column on WordPress Update

We've some Arabic websites running on WordPress, and use Arabic slugs in the posts' URLs. You know that post slug is stored in the post_name column in wp_posts table, and the default length of this ...
1
vote
1answer
129 views

Saving data from block editor to the database

I'm developing a wordpress plugin and looking to save data entered in a block to a mySQL table. That's it. But how can data be sent from the block editor to the server side? I've spent two weeks ...
0
votes
1answer
22 views

How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development

First time here, facing a bigtime wordpress situation. My Ubuntu installation crashed beyond repair during upgrading version. Managed only to copy the wordpress files, installed in /opt/lampp/htdocs, ...
0
votes
1answer
83 views

Should I use docker in wordpress production?

My question is, is it a good idea to use docker for a big woocommerce website (more than 100k products)? Or will this incur a noticable performance cost compared to running wordpress straight on the ...
0
votes
1answer
21 views

when looping through custom post data not appearing

i have a loop that fetch custom post type from the database now when i go to the page the data doesnt appear but when i refresh the page 2 times the data shows here is the code: <div class=&...
0
votes
1answer
62 views

Problem migrating to localhost

Hey guys :) I have to following case. I was given a WP site for "fixing". The website is huge in size. It's around 3GB and the DB is around 350MB. Most of the DB size is coming from postmeta ...
0
votes
1answer
22 views

How to do database for download stats?

So I have a existing wordpress site and we are building now download section for it. Downloads will be custom post type and files. Now we need to have some stats, like number of downloads per cpt (...
1
vote
2answers
39 views

Where does WordPress store plugin (enabled/disabled) status for multisite?

A recent update to one of the plugins I use broke my multisite blog and in the process of debugging it, all of the plugins got disabled. Now I have to try to figure out which plugins used to be ...
1
vote
0answers
22 views

Updating Media Published Date When Parent Post Is Modified in Wordpress

I am hoping to make the published date of my media files always equal the modified date of the post it's attached to. e.g. Image 1 (date: 1/1/20 5:00PM) is attached to Post 1 (date: 1/1/20 5:00PM) ...
-2
votes
1answer
28 views

How to create a table [closed]

This code doesn't work for me. Do you have one where I can create a table in my database? function creation() { global $wpdb; $table_name = $wpdb->prefix . 'form'; $sql = "...
1
vote
1answer
190 views

WooCommerce sku location in DB

I need a little help. We want to connect our physical shop system with our virtual shop developed with woocommerce. So we need to be able to find where the SKU numbers are registred in the database so ...

1
2
3 4 5
47