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

learn more… | top users | synonyms

0
votes
1answer
404 views

Help on conditional statement to accompany wp_insert_post function please?

I'm trying to programatically insert posts from an external MySQL database as posts on my wordpress blog, I've got something that works, but there is no way of wordpress checking to see if the post ...
0
votes
1answer
779 views

Why images are disappearing on WordPress web site?

I had this problem on 2 web sites (different versions of WP, different web hosts, different plugins), once in a while some images are disappearing from media library. Is it plugin-related issue, ...
1
vote
6answers
13k views

After server migration only the homepage works

I have recently changed hosting of my WordPress site to VPS.net. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of ...
-1
votes
1answer
208 views

custom post types containing a collection of items

i have a custom post type products.How can i add a collection of items to that custom post type like this: Product A title description price option1 option2 option3 option n Option items can be 0-n ...
3
votes
1answer
3k views

Not sure the best way to save custom plugin data

Doing my first plugin with 3.1 Everything is great, but I need to store the data now. My data is sufficiently complex that it requires custom tables (as opposed to options). So now I am wondering ...
0
votes
2answers
1k views

Importing Direct to DB - GUID Question

I've got a CSV file of new posts which I'll be importing straight into the database. Is it safe to give a GUID of http://domain/?p=[n] where [n] is any number, as long as it's not a duplicate of an ...
0
votes
2answers
290 views

WordPress as a data-store?

I would like to use WordPress to not only run my site, but also to manage users, handle authentication, and read/write content via a client application, but I would like to avoid writing everything ...
0
votes
1answer
661 views

Getting and calculating averge value of custom fields of the same tag

So basically i got this custom field value which is stored in $postrating - and under the database field customfield1. I want to grab the value of that field for all posts that have the tag currently ...
3
votes
2answers
4k views

How to delete outdated, wrongly sized images in _wp_attachment_metadata?

I've got several custom image sizes for my blog. One of these is setup as add_image_size( 'slide', 640, 290, true );. These are used in a header slideshow. My problem is I've upped the dimensions of ...
0
votes
1answer
2k views

Allow front end users to add data to a custom post type

Hay Guys , I'm currently making a plugin so that the administrator can manage "Subscriptions" to the website. I have made a custom post type and activated it within WordPress and only allowed the ...
1
vote
2answers
157 views

How do I reset a self-hosted Wordpress URL?

i was using a wordpress install on an ubuntu server virtual machine. At first the adapter was host-only at an address of 192.168.55.55. The host had this on a vboxnet0 subnet. i changed to bridged ...
0
votes
2answers
814 views

Remove “%” from strings in serialized arrays in wp_postmeta

In the course of converting a blog from Blogger to WP and running a script to grab hot-linked images for hosting, I ended up with some funky images names like act%252Bapandas-210x290.png These ...
3
votes
2answers
1k views

Is it a bad practice to go directly to the mysql database while developing a plugin?

This is a sample of the Vote it Up plugin: //Run this to create an entry for a post in the voting system. Will check if the post exists. If it doesn't, it will create an entry. function SetPost($...
4
votes
3answers
10k views

insert data in database table from plugin with WP3.1

I am quite new in WP Plugin World. I am trying to develop a plugin in WP 3.1 when I am trying to insert data into my table named "wp_enam" in the following way: $wpdb->insert($wpdb->enam, array(...
0
votes
3answers
4k views

How to get nav_menu_item_id and slug from wp database

Hi WordPress Experts please help me i want to get nav_menu_item_id and slug from wp database by given a page template like (store.php) this a page template and how we can get nave menu item id and ...
0
votes
1answer
1k views

Changing permalinks back to default ( ?p=123 )

I have a site with about 900 pages that I was using custom permalinks /%year%/%monthnum%/%postname%/ for. I have a custom nav menu with tons of items in it. This combination seems to be simply too ...
17
votes
3answers
4k views

Multiple developers / editors working on a site in progress

Background I'm nearing the final stages of constructing my first fairly large WordPress site, and I'm now encountering some friction. For the most part, the site was developed on my local machine and ...
1
vote
1answer
751 views

Is it possible to split database tables using HyperDB?

I'm looking for an answer from someone who's implemented HyperDB or has knowledge of it. I have a database which has just passed the 100mb mark a week or so ago, the problem is my host only allows ...
1
vote
3answers
633 views

Faulty restore of the database, encoding issue

I messed up the settings with W3 Total Cache (tried to import all the media to my library, didn't work out well, broke all my links to every picture). So I took my latest backup of the database, copy/...
4
votes
3answers
2k views

Moving Wordpress to new server: no posts found

I have a weird problem with moving a Wordpress installation to a new server (just the server changes, domain remains the same, I'm currently accessing the site on the new server via the same domain ...
0
votes
1answer
254 views

Only allow user to access a link once a year, based on their joining date

I am using Wordpress to run a membership site, and one of the features is that members can download a badge. However, they are only allowed to download the badge once per year, starting form the date ...
3
votes
2answers
1k 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 ...
10
votes
1answer
767 views

How do I make an HTML table from a database table?

is there a built-in wordpress function to make the HTML or should I use plain-old PHP?
6
votes
2answers
7k views

Checking if Database Table exists

I read the wordpress codex and professional wordpress. It seems both use something like if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { to determine if the table exists. Is ...
0
votes
3answers
650 views

Site does not work right, pages not showing up, even for root admin

I have a problem. My database server isn't working right. On a wiki, it gives an error, and on my wordpress site, the pages don't show up. I am wondering if WordPress caches the DB data in any way, ...
1
vote
1answer
1k views

Call to undefined function get_user_meta() - trying to access data in MySQL from custom fields

I am trying to access data from some custom fileds in my MySQL db so that I can add them to a webpage that will be printed out. The data is held in a column called "paypal_user" and I need to access ...
2
votes
1answer
2k views

Split WP install between 2 databases?

Is it possible for Wordpress to work from two databases? The reason I ask is that we're approaching our 100mb limit for database size on our host (1and1) but have up to 100 databases, so what I was ...
0
votes
1answer
495 views

Wordpress and MySQL: trying to print data using PHP from user_meta custom field data

I have some custom user_meta fields in my MySQL database. The data is stored in my DB as follows: the meta_key is called "paypal_user" and the info is stored in the meta_value column as: O:11:"...
0
votes
2answers
145 views

Need help restoring my Wordpress blog

I installed wp-cache to help with site speed. Shortly afterward, I was unable to access the site. Included below are the browser errors I receive. The site is hosted by GoDaddy. I asked them to ...
1
vote
4answers
5k views

Export wordpress table to excel

I have created PHP scripts before to export a database table to .xls format like this: $select = "SELECT * FROM tracking"; $export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) )...
10
votes
2answers
7k views

Wordpress Database Slow - should I switch to InnoDB?

I have a WordPress site with well over 10k posts, and things are starting to get very slow whenever I am adding and editing posts. Pages load nice and fast for users, along with the admin lists of ...
2
votes
3answers
370 views

WP Database Error (Windows Server 2008 & SQL Server)

I have a WP site up and running for my wife and she attempted to install a text widget that linked to her Twitter account (she says HTML was taken from Twitter.com). I am not sure exactly what she ...
0
votes
1answer
699 views

Is there an easy way of exporting posts with their category already asigned and pictures from localhost?

Every time I export a database using the Export Tool in wp-admin. There are two things left out: The category 'checked' (I have to do that all over again every time I export the posts). Also I can't ...
1
vote
3answers
3k views

How to retrieve the value stored in a multi-dimensional array and SUM the entries?

I'm trying to retrieve multidimensional values stored in user_meta where the meta key is my_posts and the meta_value is a:3:{i:0;s:2:"23";i:1;s:2:"20";i:2;s:1:"9";} Somewhere in the admin page ...
0
votes
3answers
969 views

How to find if a post with custom_field == X exists?

I need to find if a post with a custom field X equal to Y exists in a wordpress installation. Should I do it with a simple sql query or is there something build in that can help me achieve it?
0
votes
1answer
897 views

Connect to another WP install and grab post based on custom field

This is the set up: Two separate wordpress installs on two separate domains (not multi-site) This is what I want to do Query the posts from database one based on custom field and display them on the ...
33
votes
6answers
25k 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 ...
0
votes
3answers
1k views

What is the fastest way to generate a unique id number when registering a user

I have a client who wants to register users and give them a unique ID number when they complete registration. (Kind of a member number sort of thing) Can I just setup the WP member table to start id ...
0
votes
2answers
937 views

Have working sql query… trying to adjust it to use $wpdb

So I have this code that queries a custom plugin generated table in the wp database. It works perfectly as is. But I'm trying to adjust it to use $wpdb instead of the $con function I have set up. ...
2
votes
1answer
4k views

How to close wpdb connection?

Is there any method to close connection similar to mysql_close() for wpdb in wordpress? Is it not necessary to close connection for global wpdb?
0
votes
1answer
256 views

I've got a theme I can't update and won't let go

I created a custom theme for a client a while back and then it sorta mysteriously broke several months later by reverting to an early version that had a few links to my website hard coded into it. I ...
1
vote
1answer
294 views

In what part of the Wordpress core does the users table and usermeta table get joined?

I have been trying to work out just where in the massive jungle of Wordpress include classes the usermeta table is joined onto the users table and if so, how does it work? The one confusing thing ...
2
votes
2answers
2k views

Updating Wordpress - the best approach (updating wp core, plugins and db)

What is the best approach (steps) to update Wordpress when I have to update all of the following: wp core plugins database I came across this post http://codex.wordpress.org/Updating_WordPress ...
4
votes
3answers
942 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 ...
0
votes
1answer
2k views

Database structure cheatsheet

I am trying to create a custom search page for a site I developed, but I lack the information needed to create the custom sql queries. Are there any useful resources you guys might know of?
1
vote
2answers
214 views

Critical error in final stage of website launch - URLs are BROKEN!

We developed the wordpress site here: wwww.kirschfamilycomputerservices.com/sam/wheresthefairness ^^ URL does not exist now. When the website was done, we transferred the database & theme over ...
4
votes
2answers
3k 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 ...
0
votes
2answers
818 views

Best/Correct way to add an option to a category

I'm currently writing my first plugin, which will let the site admin/editor use a different image as a background/header for each post/page, and I would also like to have defaults for each category. ...
1
vote
3answers
985 views

Output custom content not from the posts table?

It would be best if I started out be explaining the situation: A while ago I created a Property/Real Estate management system using PHP and MySQL. It works great and I have a lot of customers using ...
0
votes
5answers
1k views

I have a 1300 line excel spreadsheet that needs to get into a wordpress site ASAP - Looking for ideas

I have an excel spreadsheet that needs to get on a WP site PDQ and IE is choking on it. I tried making an html table, but it's huge. I looked into some kind a database plugin that would let me ...