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

learn more… | top users | synonyms

0
votes
0answers
13 views

wpdb giving different results then query in SQL Editor

I'm trying to read candidates and the relation with expertises from 2 custom tables in my WP Database. This is my WPDB query : $candidates = $wpdb->get_results(" SELECT * FROM ...
0
votes
1answer
34 views

Checking if the data already exsis in the wp database - custom plugin

I'm trying to insert a user input to a custom table in wp and I don't want to have a duplicate entries. So my code to check that is: global $wpdb; $tablename=$wpdb->prefix."students"; ...
0
votes
0answers
13 views

Return search for custom post type name

It is easy to write code that will only return posts from a certain custom post type. However, I haven't been able to find a way to return posts that search for the actual name of the custom post ...
0
votes
1answer
7 views

dbDelta not installing database

I'm not sure why this isn't running. When I output dbDelta it says that it created the table, but it doesn't. I think my SQL is valid. Taking everything out between id and UNIQUE KEY results in the ...
0
votes
0answers
14 views

Version 3.1.3 to 4.2.2: Exporting old DB and importing new User/Admin credentials [on hold]

Live site is hosted at GoDaddy and was done years ago. Version 3.1.3. My plan is to setup a fresh install of the latest on my desktop with MAMP and get that one-to-one as to the theme/functionality ...
0
votes
0answers
17 views

Brandoo WordPress Unable to Update to WordPress 4.2.2

I have two Brandoo WordPress sites on Azure. Today I recieved a security alert from Microsoft to update to 4.2.2. However, when I try to update WordPress gets stuck in an infinite loop between two ...
0
votes
0answers
14 views

Deleted empty posts - menu gone

I just discovered that my site had a lot of posts with no title and content. I thought it was empty posts I had created when misclicking on create post instead of create page, so I sent them to trash. ...
0
votes
1answer
22 views

Alternative functions for mysql_free_result and mysql_ping in wordpress functions

what are the alternative function for mysql_free_result and mysql_ping in WordPress functions , does WordPress function provides all the functions like php ? is it necessary to Free result memory for ...
-2
votes
0answers
13 views

Executing a query on a database with form information

I tried searching for the answer but I could not find it. Is there a simple way to run a query on a database on my server using the information found in a form? The user will enter their information, ...
0
votes
0answers
14 views

Wordpress Update Get error message

I update latest version of wordpress get error message The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try ...
0
votes
2answers
25 views

How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?

I have a custom post type named store and I have a custom taxonomy city, I also have a meta box with a field that is stored with update_post_meta( $post_id, 'store_postal_code', $postal_code ); it ...
1
vote
1answer
23 views

How to share plugin created database tables between two WordPress sites

I have two WordPress installs. One is a subdomain (Blog 2) and the other is the root domain (Blog 1). All tables are installed in same database. I am already sharing the users table, but am also ...
0
votes
1answer
23 views

Function to retrieve IDs of posts, cache results, and improve wp_query

I'm looking to optimize db performance by creating a function that retrieves IDs of posts in a certain category and caches results. So instead of having a query like: SELECT … WHERE 1=1 AND ...
1
vote
1answer
21 views

Can I store my custom comment_type into wp_comments table?

I'm developing a system where a post can have multiple replies/feedbacks. As of now I's storing each of the comments as a serialized postmeta. But just today I figured out that I can use the existing ...
0
votes
1answer
39 views

WordPress and SQL - Update and Insert from another table if column value doesn't exist

Stuck with some mysql for my wordpress site. All within 1 DB. I am attempting to update wp_options table from wp_2_options (Multisite). They both have option_name (unique_key) and option_value ...
0
votes
0answers
22 views

count click on link class on posts and add it to custom field

I have 4 links on each of my posts (facebook, twitter, etc ...), what I'm trying to do, is that everytime someone click on one of this link, i'll have a counter incremented, and store the reslut in a ...
0
votes
1answer
31 views

live site do not update after importing sql database

My live website is not updating after importing sql database from wamp local server until last time all went perfect but last night I was not able to see the changes live made in local. what I did: ...
0
votes
2answers
26 views

Deleting a category from WordPress admin does it remove it completely from the database?

When you delete a category in the admin of WordPress does it completely remove it from the database? I had a few categories with the same naming conventions (different slugs) but now deleting any ...
0
votes
1answer
24 views

Error message on blog posts only on my local environment [closed]

I copied all my WP files from the server to my local WAMP as a dev-environment. Everything works smoothly except when viewing a blog post. I get a good output of all the ...
0
votes
1answer
22 views

Embed a Google Sheet as you view it in a separate tab?

Is it possible to embed a Google Sheet as you view it in a separate tab like in this website? I have tried to use Publish to the web or the plugin Inline Google Spreadsheet Viewer but it just embed ...
0
votes
1answer
19 views

Transforming an wp_options database array into a javascript obect?

In my WP code I grab my options information as such $options = get_option("kaipo_plugin_options"); The array that I print out looks as follows ...
0
votes
1answer
17 views

Sending WordPress database information to cross domain the safe way?

I want to send my options and WP_user database information to my AWS server from my WP site's database. I heard using PHP'cURL is not recommended. I want a safe solution so please aid me in the right ...
0
votes
0answers
13 views

How to show same posts on different WordPress installs?

I have 2 websites using WordPress on the same server and the same database with spesific prefixes. I want to show the posts of the first site in the second site. For example: I have 100 posts in ...
0
votes
0answers
15 views

How to import wp_options rows from Wordpress admin?

Is there any plugin, script or solution to importing rows from wp_options into another Wordpress site via the Wordpress admin? For example import a .sql file that has the rows needed that upon ...
2
votes
2answers
34 views

Shared table across network

Im currently creating a plugin that will read an xml file and import the data into 4 tables on a wordpress multisite. the tables are rather large, with ALOT of columns, so the post table is not ...
0
votes
1answer
29 views

Can not manually create a database ( db, user, pass ) for a plugin

So I was working on a plugin and I needed to cache some third party API access, and I needed to manually create a database upon plugin activation or upgrade. The caching stuff needs a database host ( ...
0
votes
1answer
21 views

how to read database fields

Can someone please explain how to read the letters, numbers, and colons in the wordpress database? For example: a:1:{s:13:"administrator";b:1;} in the wp-capabilities table. Thanks!
0
votes
2answers
54 views

Inserting dynamic content into a page

I see this subject comes up regularly but have not seen an answer to my specific requirement yet. I'm trying to use a WordPress page as a template and insert database-sourced content (about 20 or so ...
0
votes
1answer
32 views

Media library images “missing” after migrating them using SQL

I am migrating a lot of posts from an old site to a new site, and these posts have a lot of Advanced Custom Field "relationship" data attached to them. Because of this, I want to keep all of the ids ...
0
votes
1answer
10 views

Include plugin form in the home page

I created a Wordpress plugin, which allows the admin to add information through a form, and it is saved in the database. I'm trying to link each photo that I upload in the Media library with a form. ...
5
votes
3answers
478 views

Why WordPress choose data serialization over json_encode?

In my little age with WordPress, I've seen WordPress itself and its friendly plugins are using PHP serialize() in storing data into db in many cases. But in a recent search I found a serious community ...
0
votes
0answers
19 views

Return image urls with specific base string?

I have two wordpress sites on the same server (for ref call them site1 and site2). site2 hotlinks some images from site1. The problem is I recently used a CDN on site1 and told the CDN to disable ...
0
votes
0answers
21 views

dbDelta Not Working

I have some code with dbDelta that I'm trying to use to create a new database table for my plugin: <?php global $mm_importer_version; $mm_importer_version = '1.0'; function mm_install() { ...
0
votes
0answers
21 views

version control for wordpress? (wordpress folder and database at same time)

I am familiar with version control to some extent. I have been using git and github for school purposes. Now when I use wordpress it makes sense that I can use git when developing on my local ...
0
votes
1answer
24 views

How to relate 3 wordpress components with each other (Create database relationships)

Alright, so I have these 3 website parts: Gallery (that has) Artist Place A gallery can have only one artist and one place An artist can have many galleries A place can have many galleries When I ...
0
votes
1answer
33 views

Selecting NULL value from the database

I have a database with columns that are allowed to be NULL. Whenever I run a query against this database using $wpdb->get_results the columns that are NULL are always returned with an actual ...
0
votes
0answers
34 views

Link wordpress with a SQl + MongoDB + .NET

This may sound a bit crazy, I have a website using different DB, One SQl; one MongoDB, and a .net API I would really really love to be able to move this to a wordpress installation ( or Magento). ...
0
votes
2answers
48 views

Optimising amount of calls to custom fields

I have this code fragment in my codebase: foreach($this->adverisers as $adveriser) { $this->data[$adveriser->name]['image'] = bfi_thumb(get_post_meta($adveriser->ID, ...
0
votes
0answers
37 views

What am I doing wrong here? WordPress database error

I'm just trying to insert values into custom table of wordpress and it throws me this error WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to ...
0
votes
0answers
23 views

How to make post title determine category in wordpress

Is there any way to assign a post automatically to a category depending on the title of the post ! Suppose : Post title - This is a test post I want the post to automitically assign to category ...
0
votes
1answer
31 views

Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values

I have created a custom post type named “Rating” that I’m using to add customer rating sections to my website. Each rating post has the ability to have a: Title Comment section Featured Photo ...
0
votes
0answers
64 views

API to push post data to WordPress and populate custom fields

I've been looking around for related posts and such in the codex and other Q&A sites for several hours now, but haven't really come up with much so I thought I'd ask all you fine people out there ...
0
votes
0answers
17 views

Adding Database Tables for Reviews functionality that incorporates Tags/Categories

I'm wanting to build onto to the Wordpress database in order to give myself the functionality to create/retrieve customer reviews based upon tags/categories. More specifically, the reviews are not ...
1
vote
1answer
61 views

Get data from database using $WPDB

I'm missing something here. I simply want to get data from my database. So I tried this but keeps giving me an error. global $wpdb; $sql = "SELECT * FROM $wpdb->postmeta WHERE group='$group'"; ...
0
votes
1answer
20 views

How to Generate a list of Most Commented post?

I'm trying to call a list of most commented post. But the call to the DB returns always the same post (the first one in the loop) This is my code in functions.php function ...
0
votes
1answer
33 views

How to connect remote database in wordpress?

I have already wordpress website. i want split my existing database into two parts and store into remote database. So how can i set up remote database connection for existing wordpress ? If its not ...
0
votes
3answers
46 views

How to intercept update_option() before it saves data?

I am working with redux framework and need to save theme option values to a file right before it is saved in DB. Is there a way to intercept update_option() right before it saves data in DB?
0
votes
1answer
58 views

Sharing users across multiple sites, each on their own database

I have read many solutions out there for sharing users and checked out the other posts on here, but can't find specifically what I'm after, as they all talk about users on the same database. ...
0
votes
0answers
17 views

get_results is not working properly

I tried to find an answer in many forums for this problem, but it has been impossible. My problem is that when I do $wpdb->get_results in an empty table, mi webpage immediately stops working. ...
0
votes
1answer
30 views

Wordpress site URL changed; how to fix it without database access?

we would like your assist on an error that occurred during some changes on the admin panel. We have this site called Caid.gr , it's for a non-profit company. We changed the Wordpress site URL by ...