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

learn more… | top users | synonyms

1
vote
1answer
147 views

How can I (semi) automate a database export and import to a different location?

I'm attempting to move toward developing WordPress sites locally, rather than on a live server, and as part of that move I'd like the ability to have a local and a remote version of a site, and easily ...
0
votes
1answer
166 views

Load posts from external source if not found in database

I want to modify WordPress so that it requests content from a function if content is not found in the database. I want to edit the section of the code which requests and returns the post content ...
5
votes
1answer
2k views

Forcing nickname as display_name in custom edit profile template

Context I've created a front-end "edit profile" template. When I input a value into the nickname text box only the nickname is updated. The default WordPress forum has a select menu that allows/...
3
votes
2answers
89 views

Wordpress will not operate correctly

My website is ImASpy.com. If you click on the link, Findings, this takes you to my first Wordpress page. It appears to work fine until you click on comments, or you try to go to the about page, which ...
1
vote
1answer
2k views

Add Admin User via SQL

I gave my client the admin account to his wordpress install and I forgot to add an administrator user for myself. Now, I can no longer access the admin panel because they have changed their password. ...
0
votes
1answer
57 views

Updating seperate database when post attachment is changed

I have a seperate database with lists of users, brochures and brochure URL's, and timestamps of when a brochure was ordered, but I want my database to update everytime a brochure (PDF) attachment is ...
-1
votes
1answer
111 views

Custom wordpress SQL statement for a website

I'm trying to link specific columns from a few standard tables in a wordpress database. I specifically want to see a view/table that includes: post title post content guid meta value = image url ...
0
votes
1answer
65 views

Multi database link and mix and match email alert

I have a site witch is a large database of people that have different knowledge in different domain... think about teaching (match, french, science etc...) On the site there is a page where you can ...
2
votes
3answers
3k views

Import 10,000 Users into Wordpress WITH a specific ID for each user

I have a website which has about 10,000 users. I am converting this site over to Wordpress. The new site is ready to roll, but I have to bring over all the users. There are a number of plugins ...
0
votes
1answer
244 views

How to add a custom form to a plugin's setting page

I have a settings page for a plugin which I created using this function: function vsp_create_menu() { add_menu_page( 'Visitors Statistics', 'Visitors Statistics', 'manage_options', '...
0
votes
1answer
218 views

add featured image dialog box disappear

I have a test site here (with WordPress 3.2.1) Since I activate the multisite support, the add featured image disappear. I try to deactivate all the plugin and activate the default theme (twenty ...
8
votes
2answers
620 views

Why does get_term() require taxonomy? Are term_ids not unique?

A related WPSE question asks how to get the term by specifying ID only, without specifying taxonomy. My question is more philosophical. Generally, stuff in WP core is there for a reason. I'm trying to ...
0
votes
1answer
250 views

echo site_url() returns a different value than what is in the database siteurl field

I have just copied a WordPress site to a different domain, everything on the front-end and admin side displays and works smoothly except I found my category links are linking to the old site domain. ( ...
1
vote
1answer
6k views

How does $wpdb handle COUNT(*)

I understand how to do simple queries and display results using $wpdb. This is my process: <?php $sql = 'select * from wp_votes;'; ?> <?php $votes = $wpdb->get_results($sql); ?> <?...
0
votes
1answer
901 views

Just created a Wordpress Table can't get $wpdb get row to work - need help

I will begin by saying this is unfinished, and I am new to web programming. That being said, I am trying to create a javascript slide show that remembers the last slide a Wordpress (loggedin user) ...
0
votes
1answer
224 views

update_option creates an option, which empties on a blog reload

I am currently writing a plugin that allows all authors to be listed on a page. I've created an options page and wanted to create a function that allows administrators to exclude certain authors from ...
0
votes
1answer
69 views

What is wrong here? Issue with post_id and meta_value

I'm trying to create a loop to read all the meta_value records from a given post_id. The idea is to gather all the meta_value's data from wp_postmeta table related to post_id number and print them as ...
0
votes
1answer
2k views

Wordpress database error: [Query was empty] - using $wpdb->prepare()

I have edited my question, I'm now getting the error about checking my MySQL settings. I changed the $sql_dvalues variable to an array with the values instead of comma spaced values and now it is ...
0
votes
2answers
866 views

Add some fileds to the wp_posts table

I need to extend some wp tables (wp_posts, wp_comments, wp_users) to store some additional fields. I can't use metadata because I need to query those values directly via MySQL. I need an help to ...
0
votes
1answer
133 views

Array: What is this value based on?

I need to do an import of an array of checkboxes, but there is a value that I don't how it is determined. The array is based on a user meta option that I created that shows a list of category ...
1
vote
4answers
768 views

Retrieving a Value from a wp-database

why my sql statement is not returning any value.. is this wrong? <?php global $wpdb; $result = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->wp_frm_item_metas"))...
0
votes
3answers
16k views

wpdb->prepare and mysql UPDATE - how is it done?

Trying to set a 'removed' date time in a plugin query but I'm not sure how to use UPDATE SET with $wpdb->prepare. Here's my query: $cur_date = date('Y-m-d G:i:s'); $rows_affected = $wpdb->...
1
vote
1answer
3k views

store simple data in get_option()

I am trying to store simple data, a few links inside wp_options. Basically using the following way: update_option( 'simple_links', '<a href="">link 1</a>' ); my question is if it is ...
0
votes
3answers
889 views

Custom Database Table and foreach

I have just created a custom database table and would now like to output every inserted row from it into a predefined format using a foreach statement. Some guidance in this matter would be great. ...
1
vote
1answer
195 views

Adding Custom Forms

I'm looking to create a page for a wedding site that will have a form. The idea is that it is an RSVP page where a visitor will input a unique string that was on the invitation that they received and ...
2
votes
1answer
378 views

Is there a naming convention for database tables created by a plugin?

I have setup my plugin's table to use $wpdb->prefix but aside from that are there any conventions that you should name them; Maybe $wpdb->prefix.'plugin_'.$tablename or something. I can't find ...
0
votes
2answers
6k views

Create New Admin Menu Section - Like how custom post type works, in a way

I've been working with Wordpress off and on for years now, but I haven't gotten entirely immersed with the framework. I have no problem creating plugins that use custom post types, but I'm looking to ...
1
vote
1answer
167 views

Display SQL that wordpress is running

I am wanting to see the actual SQL that worpress is running to build certain pages, is there a debug method or some other way to outpout this or view it?
-1
votes
2answers
74 views

Updating WordPress [closed]

I have just update my WordPress page and I can't see it. A lot of plugins are giving errors, so I activate DEBUG. Then I have try to desactivate all plugins in the database. To make this I erase the ...
2
votes
1answer
422 views

How to create Sub Sub domain Multi User blogs?

Hi to all I would like to create a big Wordpress network with this structure: sitename.com (Main website) cat1.sitename.com (sub website) cat11.cat1.sitename.com (sub-sub website) cat12.cat2....
0
votes
1answer
80 views

Creating fields in the database

I am newbie to wordpress plugin and this is my first plugin which I am doing now. I want that when the plugin will be activate it will make some predefined fields in the database and also the same ...
0
votes
2answers
48 views

What can I do when an outside party hacks into my weblog and changes my display name?

Last night I wrote a mildly controversial blog post about religion on my weblog, and this morning I woke up to find that my display name had been changed to the name of a fanatic religious leader. The ...
0
votes
2answers
1k views

export individual posts to text files or a single csv file

I'd like to export my blog posts to plain text files so I can version control and update them using emacs org-mode via the org2blog package. However, I'm unfamiliar with SQL and the wordpress ...
0
votes
1answer
2k views

Displaying table data on a page

I would like to present content from a table located in Wordpress data base to a Wordpress page. Is there any plugin that i can use.If not,what is the simplest way to code it? Thanks, Ron
0
votes
1answer
274 views

Creating Tables on Network Activation

I'm working on a plugin which creates a new table. I've got it working fine on a single site install, but I'm not so sure about multisite. How do I create a table for each blog on network ...
6
votes
2answers
1k views

Using transients in conjunction with memcached

I was hoping someone could clear the air for me when it comes to using transients with memcached. When running a plugin like w3-total-cache, are there any actual performance advantages to using ...
2
votes
1answer
7k views

Connect forms in WP to external database

I want to use Wordpress for an existing site (coded in PHP). It has some forms (for member subscription, user can update their data etc.) which are connected directly to an existing database. I don't ...
0
votes
2answers
6k 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
1k views

AJAX wp-mysql running too slow

I have made a function of ajax, which returns all the posts starting with a particular alphabet, suppose a user clicks on letter A, then all the posts starting with letter A will be displayed, any how ...
0
votes
2answers
641 views

Allow users to enter and edit data in one-to-many configuration

We would want a user to login and be presented with a form that they would potentially have to submit multiple times (disclosures of any industry relationships, one form per disclosure). The ...
3
votes
1answer
4k views

how do I determine which image is the featured image in the database

I've queried all children of the post, and two records are shown. This is ok because there are 2 images in the gallery, but I can see no field in the database which makes it clear which one is the ...
0
votes
1answer
232 views

Is there a function to get post info for any publish_status by post ID?

I'm trying to, essentially, check whether a post exists and if it does (in published, draft or auto-draft states) return the post info. I'm finding get_post() doesn't seem to work with drafts, and ...
2
votes
2answers
549 views

What's the most efficient database method to add and query usermeta?

What's the most efficient way - concerning the database - to add and query extra usermeta fields to a profile? I need to add four additional fields of numeric and text data to a user profile and then ...
0
votes
1answer
197 views

How do you make relational post types in Wordpress? [duplicate]

Possible Duplicate: Linking Two Post Types I have a post type, referred to as "Press Release" and another called "People". I need to be able to connect the two together. MY end goal is to ...
0
votes
1answer
241 views

How to edit a published post?

I'm writing a plugin. Can anyone please show me how to edit the content of a published post? I've tried using this: function edit( $post_ID ) { $content = "Hello. This is a test."; $post_info = ...
12
votes
2answers
4k views

The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?

Lately I've been reading about MariaDB and Percona Server, two strong alternatives to MySQL that have gained popularity since Oracle bought Sun. As far as I know, both of them could be used with ...
0
votes
2answers
472 views

Efficiency of wp_options vs a new table

I'm building a WordPress theme framework, that will likely have many options as development progresses. I found a related question: When is it appropriate to create a new table in the WordPress ...
0
votes
3answers
591 views

muliple wordpress installs (network) on different databases

I've installed a network for the main domain and the sub.domain.com It works, but I do prefer to maintain in separate databases, how do I do this? Thanks
5
votes
1answer
304 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 ...
1
vote
2answers
298 views

Help running a MySQL query to update all wp_#_options tables in a Multisite install

I'd like to run a query through my WordPress database that updates the blog_public values on all individual sites. I'm stuck on how to have the statement look for wp_2_options, wp_3_options, etc. I ...