Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 answer
41 views

How to set up hierarchical relationships without using plugins / meta query

I'm running a large database of musical artists and their releases. I inherited the site after it running for a long time. There are currently several different custom post types, created with a ...
user avatar
0 votes
0 answers
13 views

How To Save Data From Remote APIs To ACF?

I've been attempting to ingest remote data from an api partner into Wordpress. To data I've used wpallimport plugin, but it's quite limited. How would one connect with a remote api and then save the ...
user avatar
0 votes
0 answers
17 views

WordPress is not creating table in database after activating plugin,

I struggled with this a long time! Can anyone help me? My plugin is not creating a database table once activated. The following code is in the main plugin file. function woocq_activate() { global ...
user avatar
  • 1
0 votes
1 answer
19 views

custom tables in wordpress Database? (can i just create them with sql?)

i just want to create a custom Table in my WordPress database and i saw many php functions to deal with that my question now is : can i just create them with an sql command and for what do i need to ...
user avatar
0 votes
0 answers
16 views

Backend tool to list and classify users according to meta fields [closed]

My site is currently handling additional user data by saving it to user meta fields. I'm looking to add functionality to view users in the backend along with the meta fields of my choice and then ...
user avatar
0 votes
0 answers
20 views

Having a repeating custom field in admin custom post type, what I'd go better with, for DB's sake? ACF repeater or query a different post type?

I have: A main custom post type - 'Cards' - each post showing its ACF repeater custom field - 'operations' - with the following sub-fields: 'add/remove', 'amount, 'value', 'date'. Let's say the fully ...
user avatar
0 votes
1 answer
21 views

Can we intercept user_login and user_pass from a wp_login_form?

with my plugin, I have a login form. I use the wp_login_form() function of Wordpress. As you know, this function links to the wp-login page. But if the user_login is not present or if the email is ...
user avatar
0 votes
0 answers
19 views

Convert a WordPress site into a portable, local, self-contained application that can be run offline [closed]

I have a WordPress based app which I use daily. Sometimes my web-server has issues and the database connectivity is bad. There is also the chance of my internet connection going down on some days ...
user avatar
0 votes
0 answers
10 views

wp-options table get locked [closed]

We have created a website using Visual Composure. The website is generally working fine but sometimes faces two issues that are critical: WP-Options table gets locked so started getting database ...
user avatar
0 votes
0 answers
13 views

Search Character Set Problem

I have a local WordPress setup in the Turkish language. I have a post title like ... MAMASI .... When I search by keyword maması in lower-case it doesn't find post. I try the table Character set ...
user avatar
  • 181
0 votes
0 answers
24 views

Add posts to custom table in database instead of wp_posts

What the code does: Imports posts, loops through all the posts and calls wp_insert_post to create a new posts for each import. Objective: Import posts and store them in another table, not under the ...
user avatar
  • 177
0 votes
0 answers
15 views

Can't log into wordpress site - I have made a new user and still cant access

I recently took over website management for my company but I can not access 1 of our sites. The user name and password provided by the last management team does not work. I refrenced my Wp-Config to ...
user avatar
0 votes
0 answers
11 views

Need help with creating a searchable user data by name or specific number like ID

Thanks for this gift. Here is my issue, i wish to be able to add users profiles to my wordpress company site in which we register the users name and other details as need be. The purpose for this is ...
user avatar
0 votes
0 answers
7 views

Compare User meta_value with Product meta_value

In Wordpress I've added a new field called "user_branche" on the user edit profile page within the admin. On the Woocommerce product page in the admin I added a meta field called "...
user avatar
  • 103
0 votes
2 answers
25 views

Check if an option exists and get its value in one hit

I have an option admins_settings that has an array of sub-options that is stored in the wp_options table. Before I get its value from the table, I check if this field exists by running this code: if ( ...
user avatar
0 votes
0 answers
19 views

New installation fatal error in 5.9.3 at edit or create entry

I just make a new download and installation of Wordpress. So far so good until I edit or create a new entry. Remove it works. Notice: Undefined property: WP_REST_Terms_Controller::$sql_clauses in /wp-...
user avatar
0 votes
0 answers
24 views

Storing transients giving database error

Sorry if vague, trying to track down recent website slowdown reasons, and query monitor shows me this as a DATABASE ERROR consistently for two particular transients being added: Following the ...
user avatar
1 vote
1 answer
48 views

Make id column as AUTO INCREMENT on plugin activation

I am creating a wordpress plugin in which I am creating a table, the table is getting generated successfully on activating the plugin but the problem is, column id is not generating as AUTO INCREMENT ...
user avatar
0 votes
1 answer
35 views

What's wrong in my PHP code? I'm using Wordpress Astra Theme and I can't insert data into my SQL

<form method="post" action="functions.php"> <div class="form-group"> <input id="customer" name="Customer Name&...
user avatar
0 votes
1 answer
21 views

I want to replicate a wordpress website over multiple servers

I've noticed a bit of a spike in web traffic as of late and I want to balance the load across multiple servers. The website is running the latest version of Wordpress. Can I setup a second website ...
user avatar
1 vote
0 answers
23 views

Sync user meta data to a second database

I need to sync data from the wp_users and usermeta databases to a second table upon registration. I have accomplished the wp_user part successfuly by placing the following code in my functions file: ...
user avatar
1 vote
1 answer
27 views

Are custom tables in the database overwritten when WordPress is updated to new versions?

I'm relatively new to customising WordPress and I am unsure what happens to custom tables that are manually added to the database when WordPress is updated to a new version. Are custom tables deleted ...
user avatar
  • 11
0 votes
0 answers
34 views

White Screen in Home Page

Initially I installed WordPress in my Linux Mint OS. It was working properly. Later I added another Database to the site. I changed siteurl and home value at wp-options table. I changed Database ...
user avatar
  • 377
0 votes
1 answer
35 views

Using PHP Code Snippets to query a database, $dbconnection->get_results is outputting nothing

I'm currently trying to run this php code snippet in a WordPress Page using a PHP code snippet extension. //Database connection script //Connecting to our master database global $wpdb; $hostname = &...
user avatar
1 vote
2 answers
46 views

Does Wordpress ever need multiple databases?

Is there ever a reason to run a Wordpress install that uses more than a single Database to run? Like for instance, could a Wordpress installation get so large or gain so many users that it needs ...
user avatar
1 vote
1 answer
20 views

WP plugins for building a database?

I am a beginner at WP, I need some ideas on how to proceed with the following problem: I need to create a tool that will build a database for a client's WordPress site. The database surrounds authors ...
user avatar
1 vote
0 answers
27 views

Wordpress Multisite - can I somehow merge the tables?

First of all, I need to say I'm not a fan of WordPress at all and I have never fully understood it. But I have inherited a multisite wordpress where anyone can register his own site. All in all, we ...
user avatar
0 votes
0 answers
33 views

Tracking Visitor LatLng with Wordpress using JS, PHP. How to put data which was extract using JS into DB

Case: I tried to implement via js a geolocation tracker (not an IP Tracker). The code snippet is under Divi > Integration > Body Tag (Divi Page Builder). Afterwars i build via PhpMyAdmin a table ...
user avatar
0 votes
0 answers
23 views

How to backup just pages from my site, but not posts with other post_type values

I want to backup just pages from my site, but not posts with other post_type values, so my first question is – will this do the trick? enter cPanel phpMyAdmin filter the table wp_posts for post_type=...
user avatar
  • 101
0 votes
0 answers
23 views

Error establishing a database connection in wordpress site , website not opening

i had my website using wordpress in cpanel with PHP 7.4 version , mysql 5.6.41-84.1 version , i got Error establishing a database connection tried enable define('WP_DEBUG', true); got Warning: ...
user avatar
1 vote
0 answers
36 views

Strange issue saving custom field data for a WooCommerce order

I have an issue with WordPress update_post_meta() function. So I have made a custom input field for WooCommerce orders which hold Tracking number. Most of the time everything is running smooth and I ...
user avatar
0 votes
1 answer
14 views

Database entry removed on browser refresh, Ajax PHP jQuery

I have a form that updates columns in a database table on submit of a form via ajax. Everything works great, the database table columns get the information however once the browser is refreshed the ...
user avatar
0 votes
0 answers
16 views

How to get the records from start with A to G in php and mysql

I have to show the records from A to G resutls from database. also tried the following code to show. Is there any mysql function available or should we use php to customize it. Mysql query SELECT * ...
user avatar
  • 11
0 votes
0 answers
17 views

How to get specific column data conditionally in database in Wordpress?

I have unique request_id and similar item_id columns in database. Therefore, the same item_id can be stored more than once. I'm trying to get the request_id of the last item_id I specified among the ...
user avatar
0 votes
0 answers
24 views

How to loop while adding data to database?

I've made a code in functions.php file to add data to database from select form but the data inserted in the database is the last option from the select only not all the data. so I'm trying to add all ...
user avatar
0 votes
1 answer
33 views

How to delete post comments from the database via SQL statement?

So, I've taken over management of a Wordpress site that hasn't been maintained very well. We currently have approximately 12,000+ spam comments on various posts. The default UI isn't very helpful at ...
user avatar
  • 119
0 votes
0 answers
20 views

Can I achieve this with Wordpress?

Feels nice to be part of StackExchange. I used to make websites with wordpress around 8 years ago but now I’m a bit out of the loop. Well I was given an offer to make a website with a bit of unusual ...
user avatar
2 votes
0 answers
73 views

Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?

Background: I have a plugin with the purpose of changing up the indexes on some of WordPress's tables to make them more efficient for large sites. The plugin changes some primary and other keys for ...
user avatar
  • 427
0 votes
0 answers
45 views

Wordpress Database - wp_usermeta and the correct number of session_tokens rows

I've been doing some security research for lack of a better term in our database re: specific users and how they access the site. In the wp_usermeta table in the WordPress database, I recently noticed ...
user avatar
0 votes
1 answer
15 views

how to get Nearby zipcode

I need to get close/Nearby to zipcode list data zipcode so I'm using the example table name li_zipcode: id zip_code latitude longitude 1 35004 33.557327 -86.534508 2 35005 33.604744 -87.042442 3 ...
user avatar
1 vote
2 answers
57 views

How to fix the disappearance of the "\" character when updating a post in the database

foreach( $posts as $post ) { // Search for images and fill the missing dimensions in the current post content $post_content = $this->add_image_dimensions( $post-...
user avatar
0 votes
0 answers
18 views

Change SQL get_results to search for posts with custom term in custom taxonomy

I am using a SQL database query to get posts that are nearby a given location. I also extended this script so that people can search for posts with a certain name. Now I would like to extent it so ...
user avatar
  • 230
0 votes
1 answer
12 views

Same Plugin tables between wordpress installations

I know that you can install two wordpress sites in the same database. However, what I am trying to achieve is that after doing that, specific plugins (that are common between the two websites) use the ...
user avatar
0 votes
0 answers
18 views

Is there any way to monitor a MySQL db and check what has changed?

I'm trying to understand the schema of woocommerce. It would be quite easy by monitoring the UPDATE, INSERT and DELETE query in a short time of period. Is there any way to achieve that?
user avatar
  • 289
0 votes
0 answers
24 views

Counting post and changing roles in mysql database. Query not code

Hello I'm struggling to find an answer talking specifically about counting post and changing roles but on mysql language not php in the wordpress source. I'm not creating a plugin neither I want to ...
user avatar
0 votes
0 answers
40 views

$wpdb->insert not inserting all rows

I'm doing a for loop and in the loop inserting items into a custom table in WP. I did some logging and it is inserting each post(returning a 1 for true) and even returning an ID, but when I look in ...
user avatar
0 votes
1 answer
47 views

How to rename custom table name programatically in wordpress?

in db there are custom table name like wp_wpdf_docs and want to change table name to wp_ccdm_docs as i am using $oldtable_name = $wpdb->prefix . "wpfd_docs"; $newtable_name = $...
user avatar
  • 5
0 votes
0 answers
17 views

corrupted URLs - can't leave starting page

I have a big problem with my WP installation: An access to my pages is (no longer) possible via (public) URL. All calls that originally worked end up on the home page. Also, visitors can't get away ...
user avatar
  • 1
2 votes
2 answers
72 views

Changing BIGINT to INT

We have a WP page running with a Buddypress network, which is highly dynamic. We are trying to identify every possible opportunity to reduce load and storage - and found that quite some tables use ...
user avatar
  • 152
0 votes
1 answer
27 views

Native timestamp on wp_options option

Does anyone know if the wp_options table have modified timestamps for their options? I have an option that has an object as the option value as shown below: The "Access Token" within the ...
user avatar
  • 15

1
2 3 4 5
50