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

learn more… | top users | synonyms

2
votes
1answer
581 views

WP 3.4 has missing photo data

I just updated to WP3.4 and discovered that previously available images are no longer "found" by the system. By this I mean that all the image files remain online and accessible, but WP has lost ...
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 = ...
1
vote
1answer
141 views

Organize WordPress site, so it can maintain with huge database

Intro: Hello, I am making coupon website and I need an advise. So, the structure at the moment is like this: Coupons ( posts ) Categories of coupons ( categories ) Shops ( tags ) In the near ...
0
votes
2answers
2k views

How to Query Database for posts with certain Taxonomy Term

I want to write a select query to return data on only posts which have are associated with the taxonomy term food-and-beverage SELECT wp_postmeta . * , wp_posts.post_name FROM wp_posts, wp_postmeta, ...
1
vote
2answers
1k views

How to initialize $wpdb?

I have a .php page in the theme root to check the data of one CUSTOM form. After receiving this data I need to do a query in a custom mysql table, so I need $wpdb, but I can't use it directly (or ...
0
votes
1answer
100 views

Making my plugin create a page?

I have created a plugin that creates a table in the database and allows users to add an Item to the table. I would like each item to also create a page for its self so that when the items are listed I ...
0
votes
3answers
78 views

Wordpress : Explain Plugins & Theme string value in database

i have installed wordpress and i i have installed couple of plugins and i have got two themes already came with wordpress. What i am asking about today is : what does the Plugins & Theme string ...
0
votes
1answer
89 views

What is the correct/safe way to delete all comments?

We've inherited a WordPress (3.3.2) site that has 13k pending comments, all of which are spam. To delete all these comments is it sufficient and safe enough to do: DELETE FROM wp_comments; DELETE ...
0
votes
2answers
748 views

Wordpress Settings Lost After Site Migration

I've done my fair share of migrating Wordpress sites, but today I am completely and utterly stumped. I've worked for many hours on this, and I cannot find a solution. I hope someone here can help. I ...
2
votes
2answers
108 views

I have a table I created, how do I make a form for a user to filter the data?

I have created a table, I now need to filter the data from that table when someone selects options from a form. Whats a good way to do that?
0
votes
1answer
115 views

Secure way to use name_save_pre?

I created a custom post where I need to change the post name regarding to the custom field and taxonomy values. This is how I did it: add_filter('name_save_pre', 'save_name'); function ...
3
votes
1answer
269 views

What is the advantage of separating wp_users and wp_usermeta table?

I want to know why Wordpress designed their database with two tables separating users and meta from each other. Wouldn't it be better if first_name, last_name, nickname, description, and capabilities ...
2
votes
1answer
868 views

How to edit/delete single row items in a table on my own menu page

I have successfully created a wp-LINKS-list-table that displays the output of WP's core "Links" table in the WP Dashboard, and I have it displaying on a menu page I created. Step 1 accomplished! ...
1
vote
3answers
157 views

Single database for multiple instances

I would like to create two instances of WP on a single domain. For example, I would like wp1.domain.com and wp2.domain.com to use a single database (same comments/posts). One for production and one ...
2
votes
1answer
72 views

How wordpress accesses its own database

Hi I'm just curious as to how Wordpress accesses it's own database, meaning that when I look into an admin page like link-manager.php or class-wp-list-table.php I don't see any occurences of $wpdb. ...
0
votes
1answer
314 views

How to query / DB requests?

what is the correct way to query the a Wordpress database, meaning to pull row and column info, and then place it into a corresponding table in the Wordpress admin? I'm wanting to do a query similar ...
2
votes
2answers
1k views

Have multiple local wordpress installs share a wp-content folder and database

On my local machine, I have multiple wordpress versions installed so I can test the themes and plugins I develop. I was wondering if I could somehow create a central wp-content folder and database, ...
0
votes
1answer
270 views

wpdb->insert not inserting first variable

I have a strange error here. im trying to write to the wordpress db but $wpdb->insert does not write the variable first name. Can any one spot the error in this code? function ...
10
votes
4answers
1k views

Is it bad practice to create own table for a plugin?

If I want to save settings for my plugin then it is pretty easy and straight forward. Now I would like to save to the database a bit more. A file name, and 3 other values that only apply to that ...
0
votes
1answer
123 views

restore a db after bad backup

i haven't got any experience in wordpress so please sorry me if answers seems too trivial. one upon a time i had a blog. then the hosting service expired and i get a backup in a hurry way: the bad ...
0
votes
1answer
67 views

Where is phpMyAdmin inside WordPress?

Even if I've been coding (mainly Java and Python) for some years, I'm totally new with web apps and PHP. So please forgive me if this is a novice question. I had a WordPress blog with a friend who ...
8
votes
3answers
573 views

What's a good strategy for planning Wordpress DB growth?

Hoping for some feedback on the topic of optimizing and staying on top of performance as a Wordpress database grows... to paint a picture.... let's say you have a wordpress / buddypress MU site that ...
0
votes
1answer
260 views

How to display results from a data table with an encrypted user id?

I'm trying to display a table of results for particular users who have submitted answers to quizzes. The problem is that the mysql database I am working with has a funky value for the user's ID. I'm ...
0
votes
1answer
153 views

How can i maintain permalink structure and avoid a 404 error when loading external content?

I created a page called Catalog and also a template called page-catalog.php. The url looks like this now: sitename.com/catalog So far so good, however i use some custom php stuff to list products ...
2
votes
3answers
2k views

Login in Wordpress using external database data

I have a WP site and also have a external DB (means not WP DB) with users. The insertion process at that table uses the same algorithm as WP uses. What I'm need to do here is login in WP but using ...
2
votes
1answer
325 views

How is the data stored in the database?

I have years of experience with PHP and MySQL, but just starting to develop plugins for WordPress and need some help. Currently, I am working on a plugin that will add extra functionality to another ...
0
votes
3answers
2k views

How do I add indexes to Wordpress Database?

I got a message from Hostgator about my account being suspended because of the load it put on their servers. This is about the fifth time this has happened. I am on a shared server. And they said it ...
0
votes
1answer
355 views

Custom post type Vs. data in own table

I'm trying to get started with WP development. So far I've been using it with other's people plugins and themes so I'm kind'a stuck. I've read many many many things about, but I can't find simple ...
12
votes
3answers
4k views

Keeping WP database synced across multiple developers using git

I'm working on improving my git workflow as it applies to my WordPress development projects. Often, when developing a content management system, I'll create a development server (like ...
0
votes
1answer
211 views

Displaying member join date on page

I added a custom field to the user profile that asked for the date users joined my club. How can i pull this data and display on a page to celebrate anniversaries of users? (for example: For may, ...
0
votes
2answers
9k views

How to display data from custom table in wordpress database?

I want to retrieve data from custom table, that I've made inside the wordpress database and display it in a wordpress page , like posts Thanks in advance
1
vote
1answer
99 views

page not updating with database

I have code which updates the database fine, but the page doesn't update correctly! I have to refresh the page a second time for it to update correctly. Here is the code below ...
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): ...
0
votes
1answer
275 views

How to change database values on theme update

I have a theme released into the wild but have not prefixed the post type appropriately. Yes, I know, it's a shame and I regret it :( So, I am currently using acme as the post type name, but I' like ...
1
vote
5answers
6k views

Will it break my site if I delete all transient records in wp_options table?

My site currently has an outrageous 500k+ transient records in the wp_options table. This causes the table to be crashed frequently and so be my site. I thought transient records will all expired ...
0
votes
1answer
112 views

Adding a filter to wp_edit_posts_query() to prevent hierarchical display of pages

So I have a Wordpress 3.3.2 installation with around 8k pages in it now. I seemed to have gotten past a threshold that causes edit.php and the page listing in the admin to take about 20 minutes to ...
0
votes
1answer
37 views

Checking for published posts in a certain post type

I run a website for a company with a careers section, with each vacancy posted as a custom post type. When vacancies are available, ie a post type of "vacancy" is published, we want to display a ...
3
votes
1answer
1k 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 ...
0
votes
1answer
719 views

Should I remove transients from the wp_options table?

I have been doing some cleaning up in the database of one of my WordPress installs, and I noticed that the wp_options table was about 2.1mb, and had 1200 rows. I've gotten it down to around 800 rows, ...
3
votes
2answers
10k views

Connect to database using wordpress wp-config file

How can I connect to the database using the wp-config.php file ? I'm trying to make a script more Wordpress friendly, and I need to connect to the database, but without installing the script as a ...
0
votes
2answers
2k views

Why is $wpdb->get_results failing on certain tables but not others (which have data)?

I'm trying to pull some custom data from a Cart66 table. My code works whenever I pull results from standard WP table in (my array is populated and the print_r shows that data), but not with any ...
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 ...
0
votes
2answers
1k views

How to use “TRUNCATE TABLE” MySQL statement?

I have tried dbDelta and $wpdb->query, they does not work. Does anyone has any ideas?
0
votes
2answers
163 views

migrate comments from old database to new database

i recently created a new wp site with some of the same content from my old wp site. is there a way to migrate comments from my old database to me new database? i tried importing old the wp_comments ...
0
votes
1answer
271 views

Default Plugin Settings Not Writing to Database

I have my plugin setup as such: Main plugin file mouldings.php <?php /* Plugin Name: Moulding Profiles Plugin URI: Description: Creates a 'Moulding Profiles' and 'Idea Gallery' custom post ...
0
votes
4answers
589 views

can't upgrade wordpress or install plugins, it seems to “think” it's still on a local installation

I'm pretty new to Wordpress, so sorry if this is an obvious mistake :) I've just moved a site from local installation on my computer to a live server. When I'm trying to install plugins or upgrade ...
0
votes
1answer
480 views

Re-creating a Wordpress database

In a moment of sheer stupidity, I deleted the wordpress database for a site of mine. Fortunately, it was a young site with only a few pages. Now, I understand that everything that was stored in that ...
0
votes
1answer
1k views

Database tables for sports betting integrated in Wordpress

I am currently building a sports betting website, and have problems creating database tables for tipsters who writes sports picks. All the picks should be stored in a database table, with information ...
0
votes
1answer
54 views

How can I query the db to access current post information?

Alright y'all. I want to dynamically display the information of the 2 most current posts to the screen. So far I have only been able to get results by hard coding the ID into the query. Is there a way ...
1
vote
1answer
284 views

How do I write this SQL statement for Posts written in last 24 hours?

Someone gave me this SQL code to count the number of posts (of post_type 'mixtapes') in the last 7 days. I tried to convert it to 'in the last 24 hours' as well, but it's giving the wrong number. ...