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

learn more… | top users | synonyms

0
votes
1answer
26 views

wpdb->insert adds too many rows

I have the following code in my functions.php $ar = array( 'price_content' => 'hello' ); $result = $wpdb->insert('hs_prices', $ar); // insert 'hello' into 'price_content' This should ...
0
votes
2answers
41 views

how can get database name in wordpress?

I want to get WordPress database name. I have also try to get database name from $wpdb but failed. When print the $wpdb it give an object array but i don't know how to get database name from object ...
0
votes
0answers
16 views

Does wordpress has Presentation, Data and Logic layer?

I am using wordpress to create websites for a long time but now I have an order that i don't know what technology to use. All the client requirements can be done using wordpress except one - the ...
1
vote
3answers
61 views

Duplicating Complete Wordpress Install for Development and then Redeployment?

What is the best way to duplicate an entire Wordpress site, including database, themes, plugins and all associated settings to another URL for development purposes, and then redeploying it back to the ...
1
vote
1answer
42 views

No wp-config.php file on local install of wordpress - site still displays

I've installed Wordpress locally using XAMPP and this step by step guide by Sunny Johal(Fifth post down on that page). The first time I used the step by step and ran all 3 of the SQL codes(UPDATE ...
0
votes
0answers
29 views

Change post category via MySQL

I'm currently building a management program that works separately from Wordpress but interacts directly with the Wordpress MySQL database. I have it working updating, adding and deleting posts and ...
0
votes
0answers
36 views

How to split the Wordpress database?

I have a site that is used to log client and meal information. It is based on Wordpress, but has quite a bit of custom code. We have custom taxonomies set for the client and meal data. Our problem ...
0
votes
1answer
165 views

Error establishing a database connection - when running multiple wordpress sites locally

Initially I was using MAMP and had only 1 wordpress site running locally on my Mac. I've set: document root to: documents/mywebsites/mysite1 In phpMyAdmin I created a DB called: mysite1 wp-config ...
0
votes
1answer
24 views

How are terms connected with posts in database?

In a multi-site environment, I have a special need to get post terms (on a custom taxonomy) without the expensive operation of "switching blogs". I thought I might write my own query to get terms ...
1
vote
1answer
182 views

Create custom column in post table in wordpress

I want to add two custom field to table wp_posts, and that I need for my plugin. now to enable these fields I have changed core file of wordpress wordpress/wp-admin/post.php $data = compact( array( ...
0
votes
0answers
33 views

Error establishing a database connection - WordPress Multistage in Sub-Folder

I have a website running on my production server which I moved to localhost. The folder structure is as follow: localhost/xxx/main - Here are the website files. I have updates the database by ...
0
votes
1answer
29 views

Extra field in wp_post instead of postmeta

Is there any advantage in terms of query performance, if I add an extra fields in wp_posts table, instead of using postmeta? I have already searched for these reasons, but without success.
0
votes
1answer
46 views

Voting System, database connections?

Basically I'm trying to make it so that all pending posts can be voted on if the user is logged in. once it gets to 10+ votes it will become published. OK so no longer using database connections and ...
0
votes
0answers
33 views

External json physician database to display results in WordPress

We're working on a physician network site in WordPress using the Divi template and we have most work completed. However, we've also been tasked to have a physician search that will bring up results ...
0
votes
1answer
23 views

Why this query is not showing any result on wordpresss home page?

I am learning wordpress database, And I have written this query for showing the data from the post table with id=2, but not showing anything. What is wrong with the following query? please help. ...
1
vote
2answers
172 views

WPDB Insert or if exists Update

I'm not crazy familiar with WPDB or SQL in general but I have a custom table for my project and I'm trying to assign some metadata to it. What I'd "like" to happen is if a row exists, update it and if ...
0
votes
0answers
23 views

RSS Feed has no Items (Possible Plugins Conflict)

I am the webmaster of the German WordPress website http://www.kunstplaza.de. Recently, I have noticed that there are no items in the RSS feed, although there should be some as I am posting new ...
0
votes
0answers
25 views

Update entry in WP database through backend form

I'm trying to find a way to UPDATE a entry in my WP DB via a form. My idea is to grab the current entry values, link to another page with another form and display them there inside containers. That ...
0
votes
2answers
267 views

WSOD 3.9.1 – Tried Everything so far

Hoping someone can help me troubleshoot my White Screen of Death. Site Info: WP 3.9.1 (just upgraded) PHP Version: 5.4 (just upgraded) Single Version Many other installs of WP on this server (with ...
0
votes
0answers
10 views

DTAP with wordpress + plugins [duplicate]

I'm struggling to find a good way to set up a DTAP street. We've have 4 separate environments (Development, Testing, Acceptance and Production) Codewise (so the .php files) migrating is trivially ...
1
vote
1answer
49 views

Select two sums with single get_var statement

I am trying the following global $wpdb; $sum = $wpdb->get_var("select sum(first), sum(second) from table where id > 1"); I am unable to get the values from each request. I have tried ...
0
votes
0answers
45 views

Would manually deleting the dumping data fix a “#1062 - Duplicate entry '1' for key 'PRIMARY'” phpMyAdmin error?

I'm new to PHP! I'm trying to import an SQL database file into myPhpAdmin for a WordPress I'm migrating, but I keep getting this error message: SQL query: `-- -- Dumping data for table ...
0
votes
1answer
654 views

phpMyAdmin error #1062 - Duplicate entry '1' for key 'PRIMARY'

I'm new to PHP! I'm trying to import an SQL file using phpMyAdmin through a GoDaddy cPanel(please don't make fun of me) Here's a full readout -- -- Dumping data for table `wp_commentmeta` -- INSERT ...
0
votes
1answer
44 views

phpMyAdmin displays error when importing database

I'm migrating a WordPress for a friend to a different server. I have already backed up all files and was given a copy of the database by the old server admin. The problem is that when I try and import ...
3
votes
1answer
269 views

How is custom menu hierarchy output handled?

I'm looking to pass custom nav_menus through an RSS feed so I can grab them on other sites to create the same custom menu on multiple sites. What I can't figure out by looking through the database is ...
4
votes
1answer
93 views

Dealing with Many Meta Values, 30+

I have a "Listing" post type with 30+ meta keys which I feel like can cause a strain on the database when there's 100+ posts. Usually what I do is save each meta value 1 by 1 like so: ...
1
vote
2answers
31 views

How to correctly add a table to the Wordpress MySQL database

I want to add a new table to the Wordpress database. I need this one for a specific section of my Wordpress website, that requires something a bit different than what I can achieve through custom ...
0
votes
2answers
48 views

Extracting the post_id via the wp_insert_post action (external db query)

i'm writing a little action plugin. everytime a new post is created, a new table should be created in an external db. The name of the table sholud reflect the post_id of the newly created post, but i ...
0
votes
2answers
3k views

Does WordPress MultiSite use separate MySql databases?

I ask because I cannot find the options from a plug-in I created on my second blog. Adding this plug-in to the main site and the options show up. I am confused because there is a column in ...
0
votes
1answer
213 views

Custom Post Type or Custom Tables

I am in the process of writing a plugin that allows end-users to submit a form that includes customer information. Upon submission, I am notified that a new customer has submitted the request form. ...
0
votes
1answer
117 views

Plugin: connect to external database without showing password

I am creating a WP plugin, which shows information from an external database. The plugin will be distributed, the external database is on my own server. I know the following code will connect to my ...
0
votes
1answer
67 views

Display single post inside accordion based on form submission results

*Note - for full background see previous question here: http://bit.ly/1gaF673 Ok, so after fixing the problem above and a couple of issues that followed. My form submission returns the results I ...
0
votes
2answers
33 views

Database custom table issues - incorrect result displayed

First things first: I've spent most of today going over these forums; the stackoverflow forums; the php.net manual; and a bunch of random sites I found through Google Search - so, if I've missed the ...
0
votes
2answers
54 views

Error establishing a database connection - Multi-site with subsite don't exisit

I have a multi site setup to which I have placed define( 'NOBLOGREDIRECT', 'http://www.example.com' ); In the wp-config.php file However when I visit a site which dose not exist (e.g. ...
0
votes
1answer
47 views

Add field to user meta table in database when link is clicked

I am working on function that enables registered users on my site to bookmark posts. I have searched for plugins but none seemed to do the job properly. I have a page where users can see their info ...
0
votes
0answers
52 views

Get thumbnail using wpdb from external wordpress database

I'm trying to get thumbnails from posts using a wpdb query where the wordpress database I'm querying is not the one from which the wpdb query is being called. That may be a little unclear, so here is ...
2
votes
2answers
231 views

$wpdb won't insert NULL into table column

When i try something like this $status = NULL; $wpdb->update( 'table', array( 'status' => $status, ), array( 'id' ...
0
votes
1answer
26 views

Cannot update custom database table row

I am trying to update a row in a custom database table by $wpdb->update();. In my opinion my code is right but for some reason my database row doesn't update. Can anyone help me with this? I want ...
0
votes
1answer
15 views

4th Network Site Database Errors?

4th site created but not available in the admin menu or the my sites screen. So the my sites screen /wp-admin/my-sites.php only shows three, not the 4th. The My Sites menu at the top also only shows ...
0
votes
1answer
24 views

How to add data from wordpress tables to new database tables you have created

I'm just learning this database stuff and so I am a bit confused and was hoping someone could push me in the right direction. I have managed to create users in the wp_tables I have created in my ...
0
votes
0answers
100 views

Check if values exists DB

I am getting nutts with this one. I want to check if the email introduced in the form already exists in the database before creating a new record. But for some reason the email is empty at search ...
1
vote
1answer
23 views

Is there a way to run upgrade.php for one blog?

I just ran the auto update to verion 3.9 today, but am having problems with the "Network Update". I seem to have a firewall or network problem with this error : Your server may not be able to ...
4
votes
3answers
6k views

WooCommerce with thousands of products - site is very slow - optimize db queries?

So far I've got around 8,000 products in my WooCommerce and the product page on the front end takes several seconds to load, even after caching. My VPS host says that I should have multiple ...
3
votes
0answers
45 views

What is the correct way for plugins to create tables with special charset/collation considerations?

I'm using WordPress >=3.8. The default charset/collation values in wp-config.php are define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // Becomes utf8_general_ci I am in a situation where ...
3
votes
3answers
84 views

Uploading/Deploying a Multi Site Install

So I was looking to create a multi site for a clients since the goal is to have the same branded theme on several sub domains to deal with different countries (e.g. mysite.com, usa.mysite.com, ...
0
votes
1answer
21 views

how to remove category from database

is there a way to remove the category from the database? I just moving my old wordpress blog (that has the category in url), to new domain (without category). I change everything except the ...
-1
votes
1answer
53 views

Connect to a remote database for wordpress in my own hosting server

Yesterday I had asked this question but it was down voted due to the rules of this forum. Anyway, this is my learning and I really thank to the moderators who down voted this as they helped me to gain ...
0
votes
2answers
49 views

When I click edit on a post, all the content disappear. Does anyone know how to fix this?

I am working on a site: greatlakesecho.org When I try to edit a post, the content just disappears from the visual editor. I am running the latest version of Word Press but this happened on the ...
0
votes
1answer
54 views

delete_option() and update_option() returning false

I know that when delete_option() or update_option() fail to perform their respective database interactions, they return false. Does anyone know why they wouldn't be able to perform these actions? ...
1
vote
0answers
27 views

Is there an atomic way to update_option in Wordpress (to ensure data integrity)?

I want to update an option which is an array by adding a new value, but there's no atomicity or guarantee of data integrity. EXAMPLE //Get the option value (an array) $val = get_option( ...