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

learn more… | top users | synonyms

0
votes
0answers
22 views

Associate multiple Database ID's

I am using a form plugin in a multi-seller woocommerce environment where each user (seller) utilizes this form which the values are stored in form's DB tables. My problem/question is: when a ...
0
votes
1answer
62 views

ERROR: “Table Prefix” must not be empty

I'm having trouble trying to setup WordPress for local development, I tried to install it, but even though I fill up the form to setup config file I still get the same error, I can connect to ...
0
votes
1answer
37 views

Form and database, plugin development

I'm developing my first plugin. It creates directories and save the path, level (if it is a subdirectory of other created directory) and name in a custom table, created at the activation. The plugin ...
0
votes
0answers
38 views

How to create a coupon in the database?

I added over 1000 coupons (schedule ones) in the database. I had one line in wp_posts and several wp_postmeta tables per coupon. To add, I've saw how a coupon was represented there and I've made ...
4
votes
1answer
65 views

Wordpress Unit Testing - Cannot Create Tables

I'm using PHPUnit to Unit Test my WP plugin on top of the WP testing suite. Everything works fine except that when I try to create a table via the setUp method, the table doesn't get created. Here's ...
0
votes
2answers
29 views

Get all images from this database table

This is my code. Where I'm wrong? <?php $connection = mysql_connect($DB_HOST, $DB_USER, $DB_PASSWORD); mysql_select_db($DB_NAME); $img = mysql_query("SELECT * FROM wp_bwg_image"); ...
0
votes
0answers
19 views

How to configure MySQL-SSL-Access to a MySQL Server 5.5 when a list of CIPHERS seems mandatory?

I have a MySQL 5.5 Server with SSL setup. I can connect with my MySQL user via command line from the webserver to the database server over TCP and verified the connection is encrypted. I figured out ...
0
votes
0answers
14 views

Query a custom post type from a different WordPress install?

I have a client who would like to only create his items on one domain, but have a specific taxonomy of that custom post type display on a different domain (this is not multi-site...they are separate ...
0
votes
0answers
19 views

How can visitors create appointment request to be accessed by all subscribers?

I need some guidance regarding an 'appointment request' implementation. I'm developing an online community as free university platform for patients to find free dental care in university clinics. ...
0
votes
0answers
13 views

Database table not created without error

I have this code to run on activation to create the table $table_name = $wpdb->prefix . "codes" function code_install() { $sql = "CREATE TABLE IF NOT EXISTS " . $table_name . " ( id ...
0
votes
1answer
37 views

I have include wp-config, should I add global $wpdb also?

Usually, In my wordpress website, when I modify template page file, it is done by only add global $wpdb for databse operation without including wp-config file. Now, I create my own php file in ...
0
votes
0answers
15 views

user_id increment?

I wanted an Admin account with user_id 999 in our database, so I changed some settings in the database according to ...
1
vote
2answers
60 views

Delete transients in website

We have so many error happen on website (WordPress and Woocommerce) error log and it will show the following error message WordPress database error Deadlock found when trying to get lock; try ...
0
votes
1answer
13 views

Surrogate ID for posts, is there an alternative field in the posts table?

I am copying some content between another CMS and Wordpress. I need to keep track of the original Id because I might have to update the copied content in the future. The old CMS will still be used for ...
5
votes
3answers
2k views

Database connection close

Is there any method to close connection similar to mysql_close() for $wpdb in WordPress? Is it not necessary to close connection for global $wpdb?
0
votes
1answer
36 views

Plugin Development: Storing and Manipulating Data That Fits JSON in Database

I am new to Wordpress plugin development but not web development in general. I have a website whose functionality I am trying to port over to Wordpress for a client that needs it in a custom plugin ...
6
votes
2answers
402 views

How to tell which database tables belongs to which multisite site

I have a local multisite installation I use for development with a relatively large number of sites set up. Every site has its own numbered database tables (i.e. wp_n_links, wp_n_options, ...
0
votes
0answers
40 views

WordPress database error Deadlock found

My website become slow due to this issue. WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE ...
0
votes
0answers
38 views

Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error

This is a bug in my WP install that has crept up unknowingly; I can't say for sure when it began. To describe it: there were menus created in the Appearance -> Menus page early in the site's history, ...
2
votes
0answers
35 views

Should I hint table index for search query on wp_post

I'm currently inspecting a WordPress setup with multiple custom post types that should be included into search results. The database query for a search after the word Search looks like this: SELECT ...
0
votes
3answers
4k views

How to delete all records from or empty a custom database table?

I can't seem to find a simple reliable way to do this - perhaps?: // delete row ## global $wpdb; $delete = $wpdb->query( $wpdb->prepare( "DELETE * FROM `wp_table_name`" ) ); ...
0
votes
0answers
41 views

get_the_terms is not working

After I updated WordPress, a function using get_the_terms() is not working. When I run get_the_terms() I'm not getting terms, but when I add before that call wp_cache_flush(); I'm getting terms so ...
0
votes
1answer
21 views

I have a form with a custom button ,i want to add the field data to an database when clicking the custom button

So im new to wp/themes,and coding, but love it and love trying to build sites, I used the form from the theme, extracted only the email field and added a button on that field basically inside of that ...
1
vote
0answers
21 views

Show all data in database table and make it into an interactive table

I have to make a table where my data from my database can be stored and rearranged with every row. The name of every row should be a link to the function mymanual_edit(). Look at the image for ...
0
votes
1answer
57 views

How to merge local and live databases?

We've been developing for Wordpress for several years and whilst our workflow has been upgraded at several points there's one thing that we've never solved... merging a local Wordpress database with a ...
1
vote
2answers
821 views

Form that sends data to an admin panel and can export it

Is there a way to have a form submit data to a admin control panel where the data is stored and can be rectified there? Could it also be able to export the data as excel for example?
0
votes
0answers
16 views

change data in mysql but don't change in admin

I have a problem, I have changed the content of my page in MySQL, but when I reopen the same page in the WordPress Admin panel, the content hasn't changed why is this? I'm using the interconnect ...
0
votes
1answer
86 views

Catchable fatal error in formatting.php

I'm running a WordPress 4.4.2. I have one site that's working fine. When I went to set up another site, I got the following error upon trying to save the "general" settings page: Catchable fatal ...
0
votes
0answers
16 views

Excerpt data from one page into another

I'm a comparative noob at working inside WordPress. I'm trying to do my homework before asking, but haven't been able to uncover answers to the following. I could use your expertise. I'm working ...
8
votes
3answers
333 views

Ignoring initial articles (like 'a', 'an' or 'the') when sorting queries?

I'm currently trying to output a list of music titles and would like to have the sorting ignore (but still display) the initial article of the title. For example if I had a list of bands it will be ...
0
votes
0answers
22 views

WordPress Database - wp_comments?

I am working on extracting data from a WordPress database to my own. I have managed to transfer all the comments from the wp_comments table. Every comment should have an image or attachment ...
0
votes
1answer
33 views

Improving wpdb queries with large data

My plugin will handle large amounts of data that could could result in the queries reading over 5000 items in a database query. The admin will provide a set of CSV files that get stored/organized in ...
0
votes
1answer
19 views

Include post_status check within $wpdb query

I've got a function that returns a count from the database for publish posts that match the product ID to the post meta ID (both are the product type). I've realized this query returns unpublished ...
3
votes
2answers
71 views

What is the added “complexity” of custom tables?

Wordpress Codex says: Think very carefully before adding a table because it adds complexity to your plugin that many users and site builders prefer to avoid. Why is it so? Adding more tables is ...
1
vote
0answers
21 views

Emojis replaced by '?' automatically

I just discovered that all emojis on my site were replaced by the ? char. I saw this on comments and posts. Tables like wp_comments or wp_posts had a utf8mb4_unicode_ci collation before and now, so ...
0
votes
0answers
23 views

Wordpress changes not showing

I'm wondering how to fix the website when the changes are not showing instantly? I tried the following fix: Installed W3 Total Cache and Super cache and cleared all the cache on the website Cleared ...
0
votes
0answers
22 views

log in form using a separate database

in the html code i have made this form: <form action="http://www.mySite.co/login.php" method="post"> <fieldset> <p><input type="text" name="uname" placeholder="Name" ...
1
vote
2answers
55 views

Create WP_Query to search for posts by their categories or their parent/child categories

Hello I am really sorry if this has been asked before but I couldn't find the exact solution I need. So here's the problem I want to create a search in my Wordpress page. Whenever a user submits the ...
1
vote
1answer
15 views

Is there a way to recover the table wp_term_relationships?

I'm trying to help a Non-Profit Organization with their site (which is built with Wordpress) that suddenly became "buggy"/odd: menus were missing, categories were empty, etc. I'm no expert around ...
0
votes
0answers
71 views

siteurl value getting populated with junk in wp_options table

My website was getting this error on every page : Catchable fatal error: Object of class WP_Error could not be converted to string in /home/juhisheth/public_html/wp-includes/default-constants.php on ...
0
votes
1answer
32 views

Localize strings from db

I'm using this method to translate strings in my template. The question is, what if some strings are dynamically loaded from the db? How can i translate them? I've been googling for days and even ...
6
votes
2answers
912 views

Is there a plugin that will override the “Error establishing a database connection” message? [closed]

My provider's database server recently had some downtime and my site was displaying the classic "Error establishing a database connection" message for about an hour. I knew what the problem was but ...
0
votes
1answer
36 views

multiple wordpress installation with shared usertable on an different database

I have multiple wordpress installation, and I would like them to share the same usertable. The wordpress installations are already up and running, and they all have their own database. Is it ...
1
vote
1answer
32 views

Unable to set a default serialized array using dbdelta()

I am trying to set up a table with dbDelta() and one of the columns will have as default a serialized array with predefined values. The issue here is that dbDelta() explodes the query using ...
0
votes
0answers
19 views

Processing a lot of $wpdb isn't insert all the data

In my plugin the user provides some CSV files that are processed and either inserted or updated based on a sku (which acts as a foreign key to my DB and a primary key for where the CSV comes from). I ...
0
votes
0answers
18 views

See site's database's schema

How can I have access to my wordpress site's database schema without SSH an access ? I need to see the tables and fields but couldn't find a way without SSH (my host doesn't provide SSH access).
1
vote
0answers
20 views

How to update the values when the featured image has changed?

I'm trying to implement this function. It saves in the database the dominant color of the image uploaded as featured image in a post. It's working perfectly BUT the problem is that it only works when ...
0
votes
0answers
22 views

Access a WordPress Table from Outside Project

I have a PHP project on example.com and I have a WordPress installation on example.com/blog. I need to get data for my PHP project from one of My WordPress table. Is it possible? If it is possible ...
0
votes
1answer
16 views

Query wp_postmeta into an array based on post_id

I know this might be a simple question but can someone explain to me how to query the WP database and pull in all the "meta_key" and "meta_value" from "post_id" into an array? I have looked at code ...
2
votes
2answers
434 views

Is there a shortcut to change bulk BMP images to JPG images in a site?

Images in WordPress posts, as I understand, are uploaded manually. They are uploaded by default to uploads folder. A client of mine reported that, in one of his site, he uploaded all the images in BMP ...