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

learn more… | top users | synonyms

3
votes
1answer
469 views

$wpdb->prepare() warning in WordPress 3.5

I am receiving this warning when I try to run a database query: Warning: Missing argument 2 for wpdb::prepare() The offending query is: $result = $wpdb->get_var( $wpdb->prepare( ...
17
votes
6answers
16k views

Using wpdb to connect to a separate database

I want to connect wpdb to another database. How do I create the instance and pass it the database name/username/password? Thanks
19
votes
4answers
6k views

Database synchronization between dev/staging and production

I have a problem with WP database synchronization between development and production and I am wondering how other people solving it. I am aware about this question but it doesn't really cover the ...
18
votes
8answers
12k views

Why is my database import losing text widget data?

I've created a site in WordPress on our development machine. In the theme we're using there are numerous widget zones to display text in (sidebar and front page). I've used simple Text widgets in all ...
14
votes
3answers
5k views

MySQL Database User: Which Privileges are needed?

The short installation instruction for WordPress ("5 Minutes") state that: Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and ...
13
votes
4answers
5k views

Post meta vs separate database tables

When developing plugins that requires data storage, what's the pros and cons of using one method or another ? The explanation given in the codex is not detailed: Before jumping in with a whole ...
2
votes
2answers
645 views

Shared Members between two different wordpress installations with different databases

I have two wordpress installations with same host with different folders. Each installation uses its own database. I mean, database are separated. I am not using one database for two wordpress ...
12
votes
1answer
2k views

Should I use custom post types or a custom database tables for plugin development?

I'm fairly new to writing wordpress plugins, but I've jumped in the deep end already and I want to make sure I'm doing it "right" on my upcoming big project. I'm going to be heavily extending ...
10
votes
3answers
562 views

Performance of my permalink structure?

I have read the discussion on the performance of different permalinks on the wp hackers mailinglist, THIS forum and around Google. I could however not really deduce if the permalink structure I have ...
6
votes
2answers
437 views

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

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 ...
3
votes
2answers
2k views

Displaying content from one WP site on separate WP site

I have two totally separate WP websites setup. Different domains, different databases. I manage both of them and they are both hosted on a dedicated server. I am trying to include some basic ...
3
votes
1answer
282 views

Writing a plugin that notify my friends of new post that mentions(@) them

For example, I write a new post with content "Today I'm happy, because I finally met the girl that @David told me about bla blah..." Once the post is published, there should be an email notification ...
3
votes
2answers
324 views

Custom database or Custom Post Types?

I have been searching throughout the web for the best way to implement what I need but just cannot find a best solution as there always seems to be some drawback. I'd prefer to do it right the first ...
3
votes
2answers
3k views

Transient RSS feeds in wp_options not removed automatically?

I just noticed 55.000 entries(!) in my wp_options table. I had not been there for a while. So I ran: delete from `wp_options` where `option_name` like '_transient_timeout_rss%' delete from ...
2
votes
0answers
276 views

comment_post_ID 0 (cannot remove from dashboard)

Ran across something a bit odd that I haven't seen before. A client has a pretty active blog and uses Akismet (paid) to protect against spam. At least once a day, they're reporting a spam comment that ...
1
vote
2answers
481 views

how to transfer wordpress sql/database from local to live

So for backing up any/all my wordpress sites i use a tool called "BACKUP BUDDY" and its a great tool and all but lately its been really buggy and today finally it went kaboom! Usually my workflow is ...
4
votes
2answers
2k views

where is permalink info stored in database?

I see that I can edit permalink information in wp-admin page > settings > permalinks. However, where is that information actually stored in the database?
2
votes
4answers
383 views

Long option names fail silently?

This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason. After much much pain and experimentation I ...
1
vote
1answer
178 views

Accessing two databases

I have two databases on my server, and wanted to know is there a way to access both databases from wordpress? My thought is adding the second set of credentials to the wp-config.php.
0
votes
1answer
95 views

save new data to wp_options non-post form

I have a form on my front-page. It sends the entered address to Google API and returns the JSON to wp_options. That works fine. I am using update_option to do that, so it rewrites the meta_key each ...
0
votes
3answers
106 views

How does WP decide how to evaluate database integrity

I've upgraded a handful of WPMU sites from 2.9 to WP3. I've never had problems with that process .. until today, when all of a sudden, one install tells me that the DB is missing some tables. The ...
7
votes
1answer
814 views

When is the 'post_content_filtered' column in database cleared by WordPress?

Some WordPress plugins (although very few) use the post_content_filtered column in database to save some data related to a post. For example, Markdown on Save stores the markdown version of a post ...
7
votes
4answers
1k views

How can I delete orphan keys in WordPress database tables?

In particular in table wp_options. After almost 2 years of blog production it seems increased a lot, and I don't know how many crap is in there. Do you know a plugin that works with WordPress 3.0 or ...
6
votes
3answers
2k views

WordPress sharding: which multi-DB plugin to use?

I've got a WordPress multisite installation that's hosting enough blogs I need to shard the database. I see there are three plugins available to spread WordPress across multiple databases: ...
3
votes
2answers
350 views

Sharing database for collaborative development

Is there a straightforward way to share/sync multiple WP instances with a single database? I work collaboratively with several developers on custom themed sites. We use git to keep our files in order ...
8
votes
3answers
10k views

How do I show data from gravity forms in my template?

Preface I've installed gravity forms, created a form and users are submitting data to my site. What I want to do is show the data users are submitting to my site on one of my pages. I know there's ...
6
votes
2answers
1k views

Default table collation on plugin activation?

I'm following this to make my plugin auto-create a table when the plugin is activated, but what happens is that while all the tables (the whole db) are utf8_general_ci, the newly created table is ...
4
votes
3answers
693 views

Performance tips for a large user base [closed]

I’m preparing a site with many users (100.000+). Since the output depends on the current user’s relation to some custom post types and taxonomies a static cache won’t help much. Besides using a ...
3
votes
3answers
1k views

Creating two database tables via plugin

I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips. In Codex it suggests to use an if statement to see if the table has ...
0
votes
2answers
326 views

Moving an entire wordpress site from one domain to a new domain and database

I have done all the steps requiered to import the dump.sql file to new database, and copiey the entire content from the old domain over to the new one. When i login to mydomain/wp-admin, i'm ...
5
votes
2answers
280 views

WordPress database scalability from the code perspective

I have read through multiple questions here on StackExchange that concern WordPress scaling and the common opinion is that WordPress is indeed highly scalable provided you have the infrastructure to ...
5
votes
1answer
229 views

When is it appropriate to create a new table in the WordPress database?

For a client we'll need 29,000 terms (all the highschool's in the US) and each term needs 6 meta items (address, phone...). My initial thought was to store the term meta information as suggested in ...
5
votes
2answers
4k views

DB connection error after copying a WordPress Multisite instance to a second location

Here's my setup. I have a Multisite instance running at http://example.com, and I want to do development and staging. Moving an existing Multisite instance of WP onto localhost is a nightmare, so I'm ...
5
votes
8answers
480 views

Backup the Database and Restore from the Backup?

I am using WordPress 3 and would like to backup the database to my computer (a Mac). My webhost is using PHP safe mode, so that sometimes limits what plugins I can use. What is a good way to do a ...
2
votes
1answer
2k views

Update Option Stored in Multi-Dimensional Array

I have data in the wp_options table currently stored as a multi-dimensional array (profile_element_order): ...
2
votes
2answers
902 views

Migrating data between local and development server

I've been working away at a medium-size WordPress site. So far I've just been hosting the site on my local machine and showing it to internal consultants over our local network. Things are working ...
3
votes
5answers
4k views

Site stuck in “Database Update Required” loop

I just updated to 3.1.3 and now when I go to the admin I get the "Database Update Required" /wp-admin/upgrade.php screen. I click 'Upgrade Now' and it says it's done, but then trying to access ...
2
votes
2answers
371 views

Using Disqus, how to stop storing comments in wp database?

I'm using disqus comments system, but it keeps storing the comments in the wordpress database as well. Is there way to disable option to store comments in wordpress database because I don't see any ...
1
vote
1answer
3k views

Insert data in database using form

I am writing a simple plugin that create a table with name "newsletter" in database and provide a shortcode to put a registration form in pages. the form contain "name" and "email". i have problem ...
1
vote
1answer
2k views

How to build a movie database with wordpress?

I'm looking for a plugin to build a movie database like Popcritics The plugin would permits me to add custom info (like CustomPress can do) about a movie. Ultimately, the plugin could permit users ...
1
vote
1answer
810 views

How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?

Can anyone explain how to interpret and make sense of the active_plugins option_value string in WordPress. And then use this string/ array to disable and activate specific plugins? Here is an ...
0
votes
0answers
22 views

signup to one site and get access to all affiliate sites

Currently i am using WP network for my multi-site blog, but i am a tutorial site just like Tuts+ (not that much good, but a little). I want to know the performance issues regarding 1. single WP ...
0
votes
1answer
599 views

Front-end update_post_meta with ajax

as written in title I'm trying to update a post_meta using Ajax. Actually I'm a complete newbie to Ajax and how it works so, if it is possible, I would appreciate if someone could 'take me by hand' ...
4
votes
2answers
8k views

How to get the post publish date outside the loop?

I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date. Here is my code: global $wpdb; $post_ids = ...
3
votes
4answers
443 views

How many users can WordPress handle?

I want to design a member login site in WP but I have a doubt that is WordPress can handle more than 40000 users on same database? I am not sure about this so I am stooping my work here. So please ...
3
votes
2answers
350 views

Does dbDelta delete columns as well?

I created a table using the dbDelta function and then removed a few columns and added a few. The new columns did get created but the old columns did not get deleted from the table. Is there a ...
3
votes
2answers
363 views

How to delete custom field “suggestions” from dropdown list

When you use a standard custom field in WP you have to write the name of the cusotm fields the first time. The second time you use a custom field it sticks to the custom fields dropdown list. But, ...
3
votes
1answer
981 views

How to convert regular categories to custom taxonomy?

I have a big list of categories/subcategories (around 60 in all). It now makes sense that instead of these categories being available to any post type's category list, these categories should be moved ...
2
votes
1answer
52 views

Text snippets shared across posts

I'd like to add a "fast facts" section to a wordpress site - an area in the sidebar where snippets of text are rotated. Where is the best place to store things like this? Widgets don't really allow ...
2
votes
2answers
518 views

WordPress Database Charset/Collate

Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?