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

learn more… | top users | synonyms

3
votes
2answers
912 views

remove missing image attachments

Best way to programatically remove attachments that are missing images? I ask because after using a caching plugin, I have images that have been input in the database as attachments that don't ...
3
votes
1answer
1k 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 ...
3
votes
0answers
46 views

What is the correct way for plugins to create tables with special charset/collation considerations?

I'm using WordPress >=3.8. The default charset/collation values in wp-config.php are define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // Becomes utf8_general_ci I am in a situation where ...
3
votes
3answers
84 views

Uploading/Deploying a Multi Site Install

So I was looking to create a multi site for a clients since the goal is to have the same branded theme on several sub domains to deal with different countries (e.g. mysite.com, usa.mysite.com, ...
3
votes
1answer
233 views

Using Vagrant for customizable Wordpress Multi-sites

Background: My partner and I have a goal to create a customizable vagrant project that uses Wordpress multi site, as a local development environment. Ideal Use Case: Various developers on our team ...
3
votes
2answers
527 views

How might I retrieve a featured post image from an external WP site and display it as a link back?

I have two WP sites. I want to reach from one of them, into the other, and retrieve specific featured images for posts, and display them with a link to that post. I am using this line (with the ...
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
3answers
1k views

How to run Two Wordpress blogs with different themes and with single database and same content

How do you run two Wordpress blogs with different themes using one database where the content remains the same in both sites? The issue that I am getting is at the Domain mapping in both blogs.
2
votes
4answers
399 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 ...
2
votes
1answer
2k 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
1answer
2k 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 ...
2
votes
1answer
62 views

prefix table and plugins

I changed my prefix of my tables from the wp_ to something else for security reasons and good practice etc. I was curious most of new plugins installed take on the new prefix but I have one that ...
2
votes
2answers
950 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 ...
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
2answers
1k 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 ...
2
votes
1answer
183 views

Taking WordPress table prefixes into account

Given the code below how would I account for the table prefix that can change from installation to installation? Is there a better way to write it than an SQL query? Is there a variable I've missed ...
2
votes
2answers
231 views

$wpdb won't insert NULL into table column

When i try something like this $status = NULL; $wpdb->update( 'table', array( 'status' => $status, ), array( 'id' ...
2
votes
1answer
54 views

Text snippets shared across posts

I'd like to add a "fast facts" section to a wordpress site - an area in the sidebar where snippets of text are rotated. Where is the best place to store things like this? Widgets don't really allow ...
2
votes
2answers
3k views

Edit Custom Database Tables in Wordpress

I have a site that uses custom database tables to manage info that is inserted by a process completely independent from Wordpress. The data from the table is used in the Wordpress site but it is not ...
2
votes
2answers
115 views

The revisions table in my database is at 70% capacity and growing. What should I do?

I installed the Wordpress System Health Plugin and it says that the revisions table in my database is at 70% capacity with 994 rows. I don't fully understand what this means. I anticipate that my ...
2
votes
2answers
175 views

How to diagnose and keep in check encoding issues?

What we have for a project is: multiple sites (production, test, local development); migrated by multiple methods (PHPMyAdmin, Navicat, BackupBuddy); And the issue we are having is that while ...
2
votes
1answer
682 views

Advice needed for importing custom field data and database structure

Looking for advice for the best method to accomplish the following. I have a custom page template with several custom fields/taxonomy. The data needed for these custom fields actually resides in ...
2
votes
1answer
430 views

Corrupt Wordpress Database

The weirdest Wordpress problem ever I think. A clients site with a large database of posts has got a mind of it's own. One minute everything seems fine, the next posts, categories and tags are ...
2
votes
2answers
95 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
1answer
603 views

wp_users user_status field

I have found an answer to my question here but it's 7 years old. I simply want to know if I can use this column for my own purposes. I'm planning to use the user_activation_key column to store a ...
2
votes
1answer
120 views

Exporting Data from WordPress into a flat table

I need to be able to export the data within WordPress so that each object is contained in a single row, like a flat table. Imagine each post type as it's own database table, containing columns that ...
2
votes
1answer
371 views

Formatting of curly brackets array from WP database to get more readable output

E.g. when I want to edit something in my WP database, I get a headache, literally. Because I see something like this: ...
2
votes
1answer
100 views

Filter WordPress posts by between parameter

How to filter WordPress posts by a taxonomy and between parameter? Consider a mobile website with "memory size" taxonomy, I need to show posts that have more than 256 mb memory and less than 768 mb. ...
2
votes
2answers
201 views

Plugin development with unit tests

One of the things that my plugin does is creates a number of SQL tables as part of a versioning function (that is run under the admin_init hook as I couldn't find a better wordpress way of doing ...
2
votes
1answer
610 views

How to increase the character limit for post name of 200?

I have post name in Thai which uses UTF-8 character. Many of them encode into super long in ASCII e.g. วิธีการหลีกเลี่ยงข้อผิดพลาดทั้ง-8-ในชีวิตการแต่งงาน I've changed the type of "post_name" using ...
2
votes
2answers
184 views

Relationship between performance and database size

What's the relationship between performance and database size in WordPress? Does a bigger DB mean that my site will be slower? My DB size is currently 360mb. I also noticed that I have some tables ...
2
votes
2answers
106 views

Wordpress DB: options-table –> 32 gzipcompression?

I just wondered what this row in the Wordpress Database refers to? 32 gzipcompression 0 I stumbled upon it in the WP options table. What if I set the value to 1. I do already have ...
2
votes
2answers
657 views

WordPress Database Charset/Collate

Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?
2
votes
3answers
606 views

Best way to import users, post and categories from an external database

I need to migrate an existing website to WordPress. This website already has a basic database containing users and posts (with a category), but it also has a high number of records so it's not ...
2
votes
1answer
112 views

Is it wise to delete post revisions and autosaves from database?

I'm just wondering is it wise to delete all post revisions and autosaves from database every once in a while? I mean they take a lot of database space and apparently have no use after the post has ...
2
votes
1answer
718 views

How to use custom post type APIs, but use a different db table

We currently have a plugin that creates a new WP table, but it recreates the wheel when it comes to managing/updating data. It would be a good candidate for custom post types, but we don't want to ...
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
301 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
301 views

Is a direct or import approach safer for migration into WordPress?

We're in the process of migrating a site from an existing CMS system into WordPress. The existing CMS system has no direct integration tools with WordPress. I'm looking into the option of creating ...
2
votes
1answer
93 views

Is $wpdb->prepare escaping to much? How to use it properly?

Im pretty much confused by $wpdb->prepare. I want to use it to sanitize user input but it turned out that it destroys the query. I cannot imagine that this is how it's intended to work but I can't ...
2
votes
1answer
75 views

$wpdb->update has finished saving trigger?

I have a custom table that I am updating via wp_ajax action. I am inserting a row and inserting all of the values other than id which is an AUTO_INCREMENT. I have an ajax response that creates a new ...
2
votes
1answer
229 views

how to show database content in wordpress post

I'm a beginner for WordPress. I have a database app written in PHP and MySQL and I need to convert it to WordPress and also I what to post the database rows info by shortcode were id="x" like: ...
2
votes
2answers
673 views

How to modify post content before writing to database?

Hi~ I'm back again and I'm trying to add another function to the script I was working on a plugin that notify my friends of new post that mentions(@) them. Now I want to change the plain text of my ...
2
votes
1answer
81 views

What is the easiest way to implement cascading database upgrade for my plugin?

Lets assume following situation: I develop a plugin. The plugin requires custom database table to store some kind of information. From month to month I release new versions of my plugin. Different ...
2
votes
2answers
478 views

The plugin generated x characters of unexpected output, $wpdb not defined

I've written a simple Wordpress plugin to create a new database table. The new table ought to be created when the plugin is activated. When I try to activate the plugin, I get the following error: ...
2
votes
1answer
115 views

Wordpress database growing dramatically in size despite adding no new content

I have an old Wordpress site that I no longer maintain but keep online anyway. I have a cron job setup on the server that backs up the Wordpress database once a month. I am noticing a continuing ...
2
votes
2answers
711 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 ...
2
votes
2answers
138 views

Is it possible to import a wordpress backup from a single site in to a multi-site configuration?

I have a local development server with WordPress installed (my desktop Linux Mint 12 box). I'd like to use multi-site WordPress to manage my different client projects through one install, but I have a ...
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?
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. ...