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

learn more… | top users | synonyms

3
votes
1answer
497 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
20k 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
21
votes
4answers
7k 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 ...
19
votes
8answers
15k 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 ...
15
votes
3answers
7k 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 ...
0
votes
2answers
68 views

Duplicate domain database to local - How?

I've noticed that my process is rather slow and i'd like to speed it up. I want to be able to duplicate my database from my domain which is blueharlequin.com and work locally thus speeding up the ...
13
votes
4answers
6k 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 ...
5
votes
1answer
253 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 ...
2
votes
2answers
738 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
3k 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 ...
11
votes
3answers
577 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
510 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 ...
6
votes
2answers
2k 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 ...
2
votes
1answer
3k views

Wordpress default menu in database

There are 3 menus in my wordpress(3.5) now. Main menu (default from wp) Footer menu (default from wp) Test menu Now I have kept test menu as default. Where does Wordpress store this thing? I ...
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 ...
4
votes
1answer
317 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
360 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
309 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
655 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
3k 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
413 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
3answers
66 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
253 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
202 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
108 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 ...
8
votes
3answers
15k views

How do I show data from gravity forms in my template? [on hold]

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 ...
7
votes
1answer
1k 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
1answer
290 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 ...
3
votes
2answers
429 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 ...
4
votes
3answers
736 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
338 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
297 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
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
488 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
3k 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
970 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 ...
4
votes
2answers
10k 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
2answers
2k views

Special characters in WordPress UTF-8 [closed]

I have a problem regarding special characters that are appearing messed up on the front-end . mainly the get converted to question marks, or something like �?) Example - Frédèric becomes Fr�d�ric. ...
3
votes
5answers
5k 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
440 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
120 views

Has anyone tried putting PHP ActiveRecord on Wordpress?

I have worked with Ruby on Rails and I was looking for some code that did something close to the wonderfull RoR's ActiveRecord. I stepped by this site. Its PHP-ActiveRecord! I found it amazing, and ...
1
vote
2answers
206 views

Efficiency on displaying random authors based on large database

I'm trying to display a list of 5 authors randomly. Here are some solutions I had found: http://stackoverflow.com/questions/5502609/get-authors-randomly ...
1
vote
1answer
6k 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
1k 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
1answer
712 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' ...