MySQL is an open-source, relational database management system.

learn more… | top users | synonyms

3
votes
1answer
996 views

importing data from non-wordpress mysql db

I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as ...
3
votes
1answer
455 views

Return ID of authors who have at least one post

I found a great piece of code here that returns the ID's of users by role. What I would like to do is modify it so it only returns the ID's of the users who have at least one post. I have tried to ...
3
votes
2answers
111 views

Query meta field using between

I'm trying to Query some lattitude and logitude and then I get some long numbers and apperently the Query dont like that. Let says I have these in the database Meta-key: lat Meta-value: 54.3415000 ...
3
votes
3answers
572 views

Fulltext search in posts sorted by relevancy

I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword) Using MySQL docs I've built this query: SELECT ID FROM $wpdb->posts WHERE MATCH ...
2
votes
3answers
739 views

Programmatically changing role information; editing role name and deleting

I am making system where I am delegating a lot of functionality to the front end of a system using Wordpress. I have listed all the roles (most of the custom) and need to ability for a logged in user ...
2
votes
3answers
2k views

Retrieve featured image

We are building an Android app based on a Wordpress mysql database. We were able to get most of the information from the datase to display on to the app. Now all we have left is to retrieve the posts ...
2
votes
2answers
2k views

Get Previous & Next posts by Post ID

How can I go about getting the previous and next posts from outside the loop? Everything I try to do aside from the custom SELECT query (using get_posts or WP_Query) breaks stuff further down the ...
2
votes
1answer
1k views

How to Delete Old Comments by Date?

I run a contest/giveaway blog at www.mommylivingthelifeofriley.com and currently have over 160,000 comments on 1100 posts. I would like to find a way to delete all comments from my site which are ...
2
votes
2answers
1k views

If I consider changing my WordPress DB tables to InnoDB, will it have an effect on the way WordPress works?

I found a superb post here about optimising WordPress for large installs. One of the steps refers to lighthttpd which sounds excellent but isn't currently supported by DirectAdmin. Last time I messed ...
2
votes
2answers
835 views

modify all posts of a category to “no comments allowed”

I'm looking for a way to modify all posts of a certain category to be "no comments allowed" without going into each post settings, one by one, and modifying manually. Perhaps a MySQL statement? ...
2
votes
2answers
96 views

WordPress for a very large website

I've searched and searched but I did not find an answer online. Also, I've posted this on StackOverflow and apparently it wasn't ok and I reposted this here. I hope it's ok. I have this website which ...
2
votes
2answers
404 views

How to do a MySQL dump from production site without using a search and replace script for local development?

I performed a MySQL dump of my WordPress production database to be imported into my local development environment. I plan on frequently performing this database dump and import. Is it possible for me ...
2
votes
1answer
783 views

How to disable `SQL_CALC_FOUND_ROWS` [duplicate]

Possible Duplicate: wordpress query causing load In the site I'm trying to optimize, I noticed several queries that are rather slow and start with SELECT SQL_CALC_FOUND_ROWS Searching this ...
2
votes
1answer
588 views

How to change post format from Aside to Image for all posts?

I have a blog where all the posts had the post format Image. This morning I see that somehow they have all been changed to Aside. I'm still trying to figure out how this happened, but in the ...
2
votes
2answers
414 views

Database slowdown after update to 3.4.1

I own a wordpress installation, and Updated to 3.4.1. After the upgrade, I got a very strange slowdown to my wordpress. After all, I used the define('SAVEQUERIES', true); in my wp-config.php with ...
2
votes
1answer
309 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 ...
2
votes
2answers
374 views

sql query to put quotes around numbers in img tag

I have quite a few old posts that contain an img tag with height and width with no double quotes around the numbers. For example: <img height=319 alt="" ...
2
votes
1answer
54 views

Using $wpdb Class to Pull Recent Comments Across a Network

Been looking for a clean and simple way to produce comments from across a network using the $wpdb database class. I did find this answer, which has been protected, and is four years old. I wrapped ...
2
votes
2answers
480 views

Concurrent / simultaneous MySQL connections

I've been looking for the best WordPress hosting for me and I'm wondering how many MySQL connections at once WordPress requires? I know this is kind of general question but how does it look for you? ...
2
votes
1answer
874 views

Inserting Hundreds of Thousands of Posts at Once

I have a project in which I create an array of 200k+ lines w/ 25 fields that run the wp_insert_post and update_post_meta. To start it processes pretty fast the slows down a lot after 10k records or ...
2
votes
2answers
3k views

Where is the content of widgets stored in mysql table

I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website. How can I change it through phpmyadmin. Where are that widgets sidebar data ...
2
votes
2answers
216 views

Tons of Twitter rows in my database

I have 264,307 "http" (post_type = http) rows in my wp_posts table. 99% of those have them have this post_title: GET http://twitter.com/statuses/user_timeline/@xcentric.json?count=100 and "error" ...
2
votes
1answer
695 views

Problems with DBDelta with FOREIGN key?

I have the following sql I am using with dbDelta: $sql .= "CREATE TABLE " . $location_table . " ( location_id MEDIUMINT(9) NOT NULL AUTO_INCREMENT, name VARCHAR (100), ...
2
votes
1answer
466 views

Split a database will improve performance?

Hi to all I'm running a Wordpress MS installation and I would like to move a couple of heavy "sub" blogs on a different DB, will it encrease my performances? Actually I'm on a dedicated server with ...
2
votes
1answer
71 views

How to run scripts when a new blog is created in Buddypress?

I'd like to insert some mysql data into every new blog that's created on my buddypress system. How can I hook up to the newly created blog data? ID, for example, would allow me to insert it right from ...
2
votes
1answer
143 views

Ordering Post 2 Post admin meta box by meta from CPT

I've just started using Posts 2 Posts (brilliant plugin by the way) in combination with a custom post type called "Artist" and the WP Event Manager Plugin. My aim is to use P2P to link Artists to ...
2
votes
1answer
112 views

little help with a mySQL query to wp database

@t31os gave a very helpful response to: getting all values for a custom field key (cross-post) by providing this function if ( ! function_exists( 'get_meta_values' ) ) { function get_meta_values( ...
2
votes
1answer
2k views

Check if post of title already exists

I'm writing a plugin that takes an xml feed and posts it into WordPress using wp-cron Everything is working dandy, except it keeps adding the same posts over again. So, I'm working on a system to ...
2
votes
1answer
48 views

can database and media folder be moved to a different drive?

I have to move my site from Drive C:\ to Drive E:\. Is there a better way to do this than uninstalling the following: Wordpress PHP MySQL Apache and re-installing on Drive E:\? For example, how ...
2
votes
1answer
54 views

What is the most secure way to set up the MySQL user in WPMU?

I am setting up Subdomain based MU on my domain.Everything is hosted by me running on one CentOS/Webmin VPS. Will I be better off setting the MySQL user's domain as localhost, 127.0.0.1 or with a ...
2
votes
1answer
233 views

Multipart/formatted MySQL query problem

I'm creating a plugin and I want to automate the creation of a MySQL Trigger on a table. The problem seems to be that $wpdb->query doesn't appear to accept either multipart statements and/or formatted ...
2
votes
1answer
659 views

How many 'wp_insert_post' calls can be performed in one shot, in a very long 'for' loop?

I'm working on a plugin which has bulk post inserts using a spreadsheet. This spreadsheet can have multiple thousand rows, each row corresponding to a post. I'm parsing this spreadsheet, looping over ...
2
votes
1answer
2k views

Importing users to Buddypress with custom fields

Here's the setup: The client uses a proprietary custom-coded PHP CMS and is wanting to move to WordPress with BuddyPress. The old, custom CMS has a roster functionality, which I'm using BuddyPress ...
2
votes
2answers
103 views

Update a Wordpress post or page takes 60+ seconds

Since updating to Wordpress 3.5 I've had my updates of pages and posts become excessively slow. I've been timing them and they take 40-80 seconds to update. I've spent the last 2 hours reading and ...
2
votes
0answers
239 views

wp_admin edit.php slow with lots of queries

I have about 4,000 posts. Currently when I click on All Posts (edit.php) it's taking about 10 seconds to load and I'm showing approximately 1000 queries! Most of them look like... SELECT t.*, tt.* ...
2
votes
2answers
280 views

Grouping related postmeta data via SQL query

I am using someone else's WP plugin which stores lots of related data in wp_postmeta using an "artificial key". So effectively we hijack wp_postmeta to create a nested relational database. So one row ...
2
votes
0answers
239 views

How to let a user choose an authors and save it to the database?

I have a multi-author Wordpress site which reads different rss feeds and posts them to my page. I was wondering if it is possible to make a code that would provide an opportunity to registered user ...
2
votes
1answer
115 views

theme options echoing multiple times

I tried to strip down the Twenty Eleven theme options page and add my own fields correction: I followed a tutorial somewhere, but when I try to echo the data, it comes out multiple times. Here is my ...
2
votes
1answer
777 views

PHP/MySQL issues when running WP on EC2 cloud [closed]

I am trying to create a wordpress blog on an Amazon EC2 instance. The amazon base image had apache and php already installed. I installed MySQL manually in my user directory. I am able to login to the ...
1
vote
3answers
434 views

Insert all post IDs in new database table

I have a plugin which creates a new database table. Upon activating the plugin is there a way to insert all my posts ids into that table? Right now I'm using an action hook to immediately insert the ...
1
vote
3answers
474 views

Search and replace text across all posts

I had used the ZD Video Plugin for WP a long time, and now, since my move to WP 3.0.2, it doesn't work anymore. To embed a YouTube video using the plugin, I would just write ...
1
vote
1answer
679 views

Wordpress 3 - how are passwords stored and how do I compare to them?

For reasons I can't go into right now, I'm creating a form that will allow users to change their passwords for Wordpress by entering their current password and then entering the new password. I want ...
1
vote
3answers
98 views

Styling images coming from another blog

I had asked a question earlier, on getting post-thumbnails from another WP-site. There, the awesome Mike coded a SQL query whose results are then passes on to a PHP array. The piece of code from that ...
1
vote
2answers
889 views

what to do when your WordPress database is too large?

Well I have asked this question in WP Forums, StackOverflow, and GoDaddy community as well, but nothing worked out. Hoping something is in here. I used 2 separated subdomains for my blog and site ...
1
vote
2answers
718 views

How to create another version of my site based on the same database

I have created a site and would like to create another version of the same site using the same exact database (db location, users, everything). The two sites would share one database. I already have ...
1
vote
2answers
244 views

greatest() function returns undefined property

I'm using the mysql GREATEST() function to compare two table fields and display in a loop either one with the highest integer value. The 2 fields consist of vote scores for posts: UP or DOWN. ...
1
vote
3answers
911 views

Convert wordpress posts to products in Woocommerce

Is there anyway I could convert all the posts e have right now on our Worpdress install into products using some mysql query or something like that?
1
vote
1answer
439 views

Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)

It's something I noticed ever since I started working with WordPress. It's a universal issue, in the sense that it doesn't matter if the WP installation is on my shared hosting account (haven't tried ...
1
vote
3answers
331 views

Delete post revisions on post publish

Is it possible to delete post/page revisions from the database when a post/page is published? 11/05/12 Answer: See the plugin below by bueltge I want to do this on a site with 5,000 posts and ...
1
vote
1answer
727 views

the_author_meta not working

I'm trying to use the_author_meta to retrieve some links which users can set in their profile. I set up extra profile fields and they are saving to the database. On my author.php I have the ...